← Back
Mischa Vandenburg May 13, 2025 18m

Kubernetes Networking Explained

Read full transcript 14 segments
  1. When I started learning Kubernetes years When I started learning Kubernetes years ago, the networking part was the most ago, the networking part was the most ago, the networking part was the most overwhelming one. It was the hardest one overwhelming one. It was the hardest one overwhelming one. It was the hardest one to learn for me. So, in this video, I'm to learn for me. So, in this video, I'm to learn for me. So, in this video, I'm going to give you a beginners's guide or going to give you a beginners's guide or going to give you a beginners's guide or a fundamentals of Kubernetes networking a fundamentals of Kubernetes networking a fundamentals of Kubernetes networking so that you can maybe have a more an so that you can maybe have a more an so that you can maybe have a more an easier start than I had. So, let's jump easier start than I had. So, let's jump easier start than I had. So, let's jump in. Kubernetes networking may seem very Kubernetes networking may seem very overwhelming when you dive into these overwhelming when you dive into these overwhelming when you dive into these things like ingress and CNI and and things like ingress and CNI and and things like ingress and CNI and and services. But when you get some some services. But when you get some some services. But when you get some some practice with it when you have created practice with it when you have created practice with it when you have created some pods and you've done some debugging some pods and you've done some debugging some pods and you've done some debugging then it will become a lot easier. So then it will become a lot easier. So then it will become a lot easier. So let's start with pods then. So pods are let's start with pods then. So pods are let's start with pods then. So pods are the most fundamental basic unit in the most fundamental basic unit in the most fundamental basic unit in Kubernetes. It's basically where your Kubernetes. It's basically where your Kubernetes. It's basically where your applications are running. So a pod will applications are running. So a pod will applications are running. So a pod will contain several containers and then the contain several containers and then the contain several containers and then the networking is happening on the pod networking is happening on the pod networking is happening on the pod level. So each pod gets its own IP level. So each pod gets its own IP level. So each pod gets its own IP address in the Kubernetes cluster. And address in the Kubernetes cluster. And address in the Kubernetes cluster. And by default when you create a Kubernetes by default when you create a Kubernetes by default when you create a Kubernetes cluster and then you have multiple pods cluster and then you have multiple pods cluster and then you have multiple pods in them like this then by default all in them like this then by default all in them like this then by default all the pods can connect with each other.

  2. the pods can connect with each other. the pods can connect with each other. There is no sort of limitation um in There is no sort of limitation um in There is no sort of limitation um in there. So all pods can connect with each there. So all pods can connect with each there. So all pods can connect with each other. Now if you want to limit the other. Now if you want to limit the other. Now if you want to limit the connect connectivity between those pods. connect connectivity between those pods. connect connectivity between those pods. So every pod is all those pods are in So every pod is all those pods are in So every pod is all those pods are in name spaces then still you don't have a name spaces then still you don't have a name spaces then still you don't have a any way of limitation in there by any way of limitation in there by any way of limitation in there by default. You will have to install default. You will have to install default. You will have to install something called network policies which something called network policies which something called network policies which we'll dive into a bit later. So by we'll dive into a bit later. So by we'll dive into a bit later. So by default all the pods can connect to all default all the pods can connect to all default all the pods can connect to all pods on all nodes and then the pods on all nodes and then the pods on all nodes and then the containers in the pods can communicate containers in the pods can communicate containers in the pods can communicate with each other through local host. So with each other through local host. So with each other through local host. So remember a pod is just a collection of remember a pod is just a collection of remember a pod is just a collection of containers. It often has just one but it containers. It often has just one but it containers. It often has just one but it has a it can have multiple containers. has a it can have multiple containers. has a it can have multiple containers. And then this pod here will have its own And then this pod here will have its own And then this pod here will have its own IP address. IP address. IP address. And then if this container wants to And then if this container wants to And then if this container wants to reach reach this container, it can do reach reach this container, it can do reach reach this container, it can do that by local host. However, each of that by local host. However, each of that by local host. However, each of these containers will need to have a these containers will need to have a these containers will need to have a separate port. They only can have they separate port. They only can have they separate port. They only can have they cannot have duplicate ports. So they cannot have duplicate ports. So they cannot have duplicate ports. So they would have to have individual unique would have to have individual unique would have to have individual unique ports. But here this container can reach ports. But here this container can reach ports. But here this container can reach this one by going to localhost 9,000.

  3. this one by going to localhost 9,000. this one by going to localhost 9,000. This is how the containers can This is how the containers can This is how the containers can communicate with each other inside of a communicate with each other inside of a communicate with each other inside of a pod. So when we let's say we have a few pod. So when we let's say we have a few pod. So when we let's say we have a few pods here. Do I have no I have no pods pods here. Do I have no I have no pods pods here. Do I have no I have no pods yet. So if I run hello yet. So if I run hello yet. So if I run hello uh image is engine x and if I run world uh image is engine x and if I run world uh image is engine x and if I run world image is engine x then now I have two pods here. They x then now I have two pods here. They are now being created. So if I do k get are now being created. So if I do k get are now being created. So if I do k get pods o wide then here we see that each pods o wide then here we see that each pods o wide then here we see that each pod has been assigned its own IP pod has been assigned its own IP pod has been assigned its own IP address. Make it a little bit smaller so address. Make it a little bit smaller so address. Make it a little bit smaller so it gets a bit more easy to see. So we it gets a bit more easy to see. So we it gets a bit more easy to see. So we have the pod hello which has IP address have the pod hello which has IP address have the pod hello which has IP address 12 and world which has IP address 13. So 12 and world which has IP address 13. So 12 and world which has IP address 13. So this pod can reach this pod here. But if this pod can reach this pod here. But if this pod can reach this pod here. But if I would have multiple containers in this I would have multiple containers in this I would have multiple containers in this pod then I would I could use local host. pod then I would I could use local host. pod then I would I could use local host. But I couldn't use local host to reach But I couldn't use local host to reach But I couldn't use local host to reach the world pod from hello. Then I would the world pod from hello. Then I would the world pod from hello. Then I would need to assign this I would need to use need to assign this I would need to use need to assign this I would need to use this IP address if that makes sense. So this IP address if that makes sense. So this IP address if that makes sense. So pod the networking happens on the pod pod the networking happens on the pod pod the networking happens on the pod level. Now how is that implemented then?

  4. level. Now how is that implemented then? level. Now how is that implemented then? How how does the cube API server know How how does the cube API server know How how does the cube API server know where all of the these pods are living where all of the these pods are living where all of the these pods are living and how can they connect with each and how can they connect with each and how can they connect with each other? Well, this is done by the CNI other? Well, this is done by the CNI other? Well, this is done by the CNI plugin. CNI stands for container plugin. CNI stands for container plugin. CNI stands for container networking interface. It sound very hard networking interface. It sound very hard networking interface. It sound very hard to me in the beginning, but basically to me in the beginning, but basically to me in the beginning, but basically what it is, it's just a plugin to what it is, it's just a plugin to what it is, it's just a plugin to Kubernetes. It's an something that you Kubernetes. It's an something that you Kubernetes. It's an something that you install into your Kubernetes cluster install into your Kubernetes cluster install into your Kubernetes cluster that's not there by default generally that's not there by default generally that's not there by default generally and that will provide network and that will provide network and that will provide network connectivity to containers. It's connectivity to containers. It's connectivity to containers. It's basically the the brain the networking basically the the brain the networking basically the the brain the networking brain in the Kubernetes cluster. If you brain in the Kubernetes cluster. If you brain in the Kubernetes cluster. If you don't have a CNI, then the pods cannot don't have a CNI, then the pods cannot don't have a CNI, then the pods cannot communicate with each other. communicate with each other. communicate with each other. So these the CNI configures network So these the CNI configures network So these the CNI configures network interfaces in containers. So when you if interfaces in containers. So when you if interfaces in containers. So when you if you're used to working with VMs then a you're used to working with VMs then a you're used to working with VMs then a VM in Azure for example always has a VM in Azure for example always has a VM in Azure for example always has a nick a network interface attached to it nick a network interface attached to it nick a network interface attached to it and then the nick gets an IP address and and then the nick gets an IP address and and then the nick gets an IP address and then this is how the the virtual then this is how the the virtual then this is how the the virtual networks are able to communicate with networks are able to communicate with networks are able to communicate with each other and to reach the VM address.

  5. each other and to reach the VM address. each other and to reach the VM address. Well, this basically works the same on Well, this basically works the same on Well, this basically works the same on the pod level in Kubernetes. And the the the pod level in Kubernetes. And the the the pod level in Kubernetes. And the the the the mechanism that assigns these IP the the mechanism that assigns these IP the the mechanism that assigns these IP IP addresses and these network IP addresses and these network IP addresses and these network interfaces is done through the CNI, the interfaces is done through the CNI, the interfaces is done through the CNI, the container networking interface. So it container networking interface. So it container networking interface. So it assigns IP addresses and sets up the assigns IP addresses and sets up the assigns IP addresses and sets up the routes. So and this is done through IP routes. So and this is done through IP routes. So and this is done through IP tables on nodes. if you know what IP tables on nodes. if you know what IP tables on nodes. if you know what IP tables is, if you have a Linux tables is, if you have a Linux tables is, if you have a Linux background. So the networking is done on background. So the networking is done on background. So the networking is done on the node level, on the Linux level the node level, on the Linux level the node level, on the Linux level actually. So it's implemented by CNI actually. So it's implemented by CNI actually. So it's implemented by CNI plugins and a few examples of these are plugins and a few examples of these are plugins and a few examples of these are called Flano, Flannel, Calico, and called Flano, Flannel, Calico, and called Flano, Flannel, Calico, and Celium. So if you install K3S for Celium. So if you install K3S for Celium. So if you install K3S for example, which I have made videos about example, which I have made videos about example, which I have made videos about on my channel, then Flannel is going to on my channel, then Flannel is going to on my channel, then Flannel is going to be the default CNI plugin that's being be the default CNI plugin that's being be the default CNI plugin that's being installed for you because it's very installed for you because it's very installed for you because it's very easy, simple, lightweight, and it will easy, simple, lightweight, and it will easy, simple, lightweight, and it will work. Now, if you need to implement work. Now, if you need to implement work. Now, if you need to implement network policies like I mentioned in the network policies like I mentioned in the network policies like I mentioned in the beginning of the video, then you will beginning of the video, then you will beginning of the video, then you will need something more elaborate. Then you need something more elaborate. Then you need something more elaborate. Then you will either need to go for Calico or you will either need to go for Calico or you will either need to go for Calico or you need to go for Psyllium. And Celium is need to go for Psyllium. And Celium is need to go for Psyllium. And Celium is one that I would recommend learning.

  6. one that I would recommend learning. one that I would recommend learning. Celium is a um very interesting CNI Celium is a um very interesting CNI Celium is a um very interesting CNI plug-in which is based on the EBPF plug-in which is based on the EBPF plug-in which is based on the EBPF protocol. If you don't know what that protocol. If you don't know what that protocol. If you don't know what that means, it doesn't matter. But uh if you means, it doesn't matter. But uh if you means, it doesn't matter. But uh if you are serious about becoming a Kubernetes are serious about becoming a Kubernetes are serious about becoming a Kubernetes engineer and going for multi-tenency, engineer and going for multi-tenency, engineer and going for multi-tenency, multicloud Kubernetes environments for multicloud Kubernetes environments for multicloud Kubernetes environments for example, then Celium is definitely the example, then Celium is definitely the example, then Celium is definitely the way to go. This is what I'm running in way to go. This is what I'm running in way to go. This is what I'm running in my home lab as well and it's it's it's a my home lab as well and it's it's it's a my home lab as well and it's it's it's a big learning curve but it is very big learning curve but it is very big learning curve but it is very rewarding. So I highly recommend going rewarding. So I highly recommend going rewarding. So I highly recommend going for that one. Um now there is the for that one. Um now there is the for that one. Um now there is the the concept of services in in in in the concept of services in in in in the concept of services in in in in Kubernetes networking. There's services Kubernetes networking. There's services Kubernetes networking. There's services and there is ingress. Now services solve and there is ingress. Now services solve and there is ingress. Now services solve a particular problem and that is the a particular problem and that is the a particular problem and that is the fact that pods are ephemeral. So if I go fact that pods are ephemeral. So if I go fact that pods are ephemeral. So if I go to my Kubernetes cluster again and if I to my Kubernetes cluster again and if I to my Kubernetes cluster again and if I delete my delete my delete my pod pod pod hello and if I now create another pod hello and if I now create another pod hello and if I now create another pod called hello and if I do k get pods o called hello and if I do k get pods o called hello and if I do k get pods o wide again then we see that the hello wide again then we see that the hello wide again then we see that the hello pod which previously had the IP address pod which previously had the IP address pod which previously had the IP address of 12 as you see up here it has now of 12 as you see up here it has now of 12 as you see up here it has now received the IP address ending in 14. So received the IP address ending in 14. So received the IP address ending in 14. So even though it is the same pod, it is I even though it is the same pod, it is I even though it is the same pod, it is I used the exact same specification for used the exact same specification for used the exact same specification for this this this pod, the cube API server actually

  7. pod, the cube API server actually pod, the cube API server actually created a complete new instance of it created a complete new instance of it created a complete new instance of it and thus also assigned a new IP address and thus also assigned a new IP address and thus also assigned a new IP address to it. So if I have an application to it. So if I have an application to it. So if I have an application running that needs several pods in my running that needs several pods in my running that needs several pods in my Kubernetes cluster. So if you are Kubernetes cluster. So if you are Kubernetes cluster. So if you are running several microervices as is might running several microervices as is might running several microervices as is might be called you have your database and you be called you have your database and you be called you have your database and you have your front end and your back end have your front end and your back end have your front end and your back end for for for example then you cannot be networking example then you cannot be networking example then you cannot be networking through IP addresses because these through IP addresses because these through IP addresses because these change all the time that is the the the change all the time that is the the the change all the time that is the the the big problem that you would have if you big problem that you would have if you big problem that you would have if you did if you were doing it with IP did if you were doing it with IP did if you were doing it with IP addresses. Pods are ephemeral. You addresses. Pods are ephemeral. You addresses. Pods are ephemeral. You should not expect a pod to have a long should not expect a pod to have a long should not expect a pod to have a long lifespan because things scale up and lifespan because things scale up and lifespan because things scale up and down in Kubernetes. That's the whole down in Kubernetes. That's the whole down in Kubernetes. That's the whole point. And they're constantly changing point. And they're constantly changing point. And they're constantly changing and being moved across nodes. So when and being moved across nodes. So when and being moved across nodes. So when you do a Kubernetes upgrade, then all of you do a Kubernetes upgrade, then all of you do a Kubernetes upgrade, then all of your pods are actually being switched your pods are actually being switched your pods are actually being switched around and be put on new upgraded nodes around and be put on new upgraded nodes around and be put on new upgraded nodes for example. So how will the system keep for example. So how will the system keep for example. So how will the system keep track of all these constantly changing track of all these constantly changing track of all these constantly changing IP addresses? Now this is where the IP addresses? Now this is where the IP addresses? Now this is where the concept of services come in. So a concept of services come in. So a concept of services come in. So a service offers a consistent address to service offers a consistent address to service offers a consistent address to access a pod or a set of pods. So you access a pod or a set of pods. So you access a pod or a set of pods. So you instead of needing to go by IP address instead of needing to go by IP address instead of needing to go by IP address as you might as you might as you might expect rather you get a service which expect rather you get a service which expect rather you get a service which then is responsible to route that then is responsible to route that then is responsible to route that traffic to the um assigned pods. So my

  8. traffic to the um assigned pods. So my traffic to the um assigned pods. So my service has a certain IP address or service has a certain IP address or service has a certain IP address or location and then I can in my location and then I can in my location and then I can in my application I can say okay the front end application I can say okay the front end application I can say okay the front end service the the front end service the the front end service the the front end um the let's say the backend service so um the let's say the backend service so um the let's say the backend service so these are my this is my backend these are my this is my backend these are my this is my backend API when whenever you need to reach the API when whenever you need to reach the API when whenever you need to reach the backend backend backend API then you can talk to this this API then you can talk to this this API then you can talk to this this address Instead of going for the the pod address Instead of going for the the pod address Instead of going for the the pod address, this front end container will address, this front end container will address, this front end container will just talk to hey, I need something from just talk to hey, I need something from just talk to hey, I need something from the back end. Well, I will just talk to the back end. Well, I will just talk to the back end. Well, I will just talk to that service and then this service is that service and then this service is that service and then this service is responsible for routing the traffic to responsible for routing the traffic to responsible for routing the traffic to the right pod. So if this pod is deleted the right pod. So if this pod is deleted the right pod. So if this pod is deleted and and this one too and then a new one and and this one too and then a new one and and this one too and then a new one comes in its place with a new IP comes in its place with a new IP comes in its place with a new IP address, well the service is just going address, well the service is just going address, well the service is just going to handle that routing. All we need to to handle that routing. All we need to to handle that routing. All we need to do is just say hey front end look at do is just say hey front end look at do is just say hey front end look at backend service and then the back end backend service and then the back end backend service and then the back end make sure that these are routed there.

  9. make sure that these are routed there. make sure that these are routed there. So that's how Kubernetes solve that So that's how Kubernetes solve that So that's how Kubernetes solve that problem which is a very beautiful way of problem which is a very beautiful way of problem which is a very beautiful way of doing it in my opinion. So there are doing it in my opinion. So there are doing it in my opinion. So there are different types of services and before I different types of services and before I different types of services and before I go into that I just wanted to mention go into that I just wanted to mention go into that I just wanted to mention that this drawing that I'm talking that this drawing that I'm talking that this drawing that I'm talking through it's actually a part of my through it's actually a part of my through it's actually a part of my Kubernetes fundamentals course and they Kubernetes fundamentals course and they Kubernetes fundamentals course and they the YouTube video is basically not long the YouTube video is basically not long the YouTube video is basically not long enough to do justice to Kubernetes enough to do justice to Kubernetes enough to do justice to Kubernetes networking. So if you want to go deeper networking. So if you want to go deeper networking. So if you want to go deeper into this I highly recommend you jump into this I highly recommend you jump into this I highly recommend you jump into my CubeCraft DevOps community. We into my CubeCraft DevOps community. We into my CubeCraft DevOps community. We are over 500 engineers, most of them are over 500 engineers, most of them are over 500 engineers, most of them already senior, looking to help other already senior, looking to help other already senior, looking to help other people get into the industry. And in people get into the industry. And in people get into the industry. And in there you will also get access to my there you will also get access to my there you will also get access to my Kubernetes fundamentals course where Kubernetes fundamentals course where Kubernetes fundamentals course where amongst other things there is the amongst other things there is the amongst other things there is the networking module which is about an networking module which is about an networking module which is about an hourong where we go deeper into this and hourong where we go deeper into this and hourong where we go deeper into this and where I'm also going to be showing you where I'm also going to be showing you where I'm also going to be showing you hands-on examples where we create pods hands-on examples where we create pods hands-on examples where we create pods and then connect to them um to each and then connect to them um to each and then connect to them um to each other and curling and and pinging and other and curling and and pinging and other and curling and and pinging and making sure that you really understand making sure that you really understand making sure that you really understand how these services actually work and how these services actually work and how these services actually work and exploring all of these use cases uh exploring all of these use cases uh exploring all of these use cases uh together and furthermore in this course together and furthermore in this course together and furthermore in this course you will learn more about Kubernetes you will learn more about Kubernetes you will learn more about Kubernetes itself storage and then in the classroom itself storage and then in the classroom itself storage and then in the classroom there is so much more this is basically there is so much more this is basically there is so much more this is basically everything you need to become a DevOps everything you need to become a DevOps everything you need to become a DevOps engineer or to upskill yourself in engineer or to upskill yourself in engineer or to upskill yourself in Kubernetes if that is what you are Kubernetes if that is what you are Kubernetes if that is what you are looking for also there are Q&A calls you

  10. looking for also there are Q&A calls you looking for also there are Q&A calls you can reach me every single day I'm always can reach me every single day I'm always can reach me every single day I'm always here I I have a full green status bar here I I have a full green status bar here I I have a full green status bar here I'm here every day helping people. here I'm here every day helping people. here I'm here every day helping people. So if you want to learn from me So if you want to learn from me So if you want to learn from me directly, if you want to really take directly, if you want to really take directly, if you want to really take your skills to the next level, then go your skills to the next level, then go your skills to the next level, then go to to to school.com/cubcraft and check out my school.com/cubcraft and check out my school.com/cubcraft and check out my community. So this service that I have community. So this service that I have community. So this service that I have been describing here that that is what been describing here that that is what been describing here that that is what we would typically call a cluster IP we would typically call a cluster IP we would typically call a cluster IP service. So it's basically a a service service. So it's basically a a service service. So it's basically a a service that is that is that is um responsible for routing traffic to a um responsible for routing traffic to a um responsible for routing traffic to a set of pods in the back end and this is set of pods in the back end and this is set of pods in the back end and this is done based on labels if you know what done based on labels if you know what done based on labels if you know what that is. Now this the a second type of that is. Now this the a second type of that is. Now this the a second type of service is a node port service. So service is a node port service. So service is a node port service. So instead of just having an internal IP instead of just having an internal IP instead of just having an internal IP address for that is convenient for address for that is convenient for address for that is convenient for routing, a node port service exposes a routing, a node port service exposes a routing, a node port service exposes a port on each node allowing direct access port on each node allowing direct access port on each node allowing direct access to the service through any node's IP to the service through any node's IP to the service through any node's IP address. So if you have a network address. So if you have a network address. So if you have a network situation where you might have a situation where you might have a situation where you might have a Kubernetes cluster like this and then Kubernetes cluster like this and then Kubernetes cluster like this and then you have several um nodes in that you have several um nodes in that you have several um nodes in that cluster. So these are all nodes. Now if cluster. So these are all nodes. Now if cluster. So these are all nodes. Now if I have a Linux VM over here and if I I have a Linux VM over here and if I I have a Linux VM over here and if I wanted to reach something on that uh wanted to reach something on that uh wanted to reach something on that uh node directly then I could node directly then I could node directly then I could potentially expose the um IP

  11. potentially expose the um IP potentially expose the um IP address of this node and then the port address of this node and then the port address of this node and then the port will be assigned uh from the node port will be assigned uh from the node port will be assigned uh from the node port and then I with from this VM if my and then I with from this VM if my and then I with from this VM if my network is configured that way I can network is configured that way I can network is configured that way I can reach that service out from outside of reach that service out from outside of reach that service out from outside of the Kubernetes cluster and straight into the Kubernetes cluster and straight into the Kubernetes cluster and straight into there. So, this is a way of doing it, there. So, this is a way of doing it, there. So, this is a way of doing it, but in general, this is not recommended but in general, this is not recommended but in general, this is not recommended to to do at all, especially not in to to do at all, especially not in to to do at all, especially not in production because hey, you're exposing production because hey, you're exposing production because hey, you're exposing the some ports on your nodes directly. the some ports on your nodes directly. the some ports on your nodes directly. This is not the way you want to go about This is not the way you want to go about This is not the way you want to go about it, but it is a functionality that is it, but it is a functionality that is it, but it is a functionality that is available, but I would only use it as a available, but I would only use it as a available, but I would only use it as a last resort. And then finally, there is last resort. And then finally, there is last resort. And then finally, there is a load balancer. So this is typically a load balancer. So this is typically a load balancer. So this is typically used in cloud environments. So when used in cloud environments. So when used in cloud environments. So when you're in a cloud provider then if you you're in a cloud provider then if you you're in a cloud provider then if you have an AKS cluster then um usually an have an AKS cluster then um usually an have an AKS cluster then um usually an AKS cluster will sit inside of a virtual AKS cluster will sit inside of a virtual AKS cluster will sit inside of a virtual network like this a cloud network to say network like this a cloud network to say network like this a cloud network to say it simply. Now in order for the services it simply. Now in order for the services it simply. Now in order for the services to be available to this cloud network to be available to this cloud network to be available to this cloud network you typically use something that's you typically use something that's you typically use something that's called a load balancer in in cloud called a load balancer in in cloud called a load balancer in in cloud environments. And this will then well environments. And this will then well environments. And this will then well basically it acts like a cluster IP you basically it acts like a cluster IP you basically it acts like a cluster IP you could say it it is a you this load could say it it is a you this load could say it it is a you this load balancer has a certain IP address and balancer has a certain IP address and balancer has a certain IP address and then from wherever I am in this uh cloud then from wherever I am in this uh cloud then from wherever I am in this uh cloud network it's actually inside of the network it's actually inside of the network it's actually inside of the network I should say. So wherever I am

  12. network I should say. So wherever I am network I should say. So wherever I am in this network, I can talk to this load in this network, I can talk to this load in this network, I can talk to this load balancer from a VM and then this load balancer from a VM and then this load balancer from a VM and then this load balancer will then route the traffic balancer will then route the traffic balancer will then route the traffic towards pods inside of my Kubernetes towards pods inside of my Kubernetes towards pods inside of my Kubernetes cluster for example. So in a cloud cluster for example. So in a cloud cluster for example. So in a cloud environment, this is very useful because environment, this is very useful because environment, this is very useful because then you are leveraging the cloud then you are leveraging the cloud then you are leveraging the cloud infrastructure and you're letting them infrastructure and you're letting them infrastructure and you're letting them handle the IP address assignment of this handle the IP address assignment of this handle the IP address assignment of this and then this way your Kubernetes and then this way your Kubernetes and then this way your Kubernetes cluster the services on your Kubernetes cluster the services on your Kubernetes cluster the services on your Kubernetes cluster become reachable for other cluster become reachable for other cluster become reachable for other services that you might be using and uh services that you might be using and uh services that you might be using and uh you can then use your cloud DNS provider you can then use your cloud DNS provider you can then use your cloud DNS provider for example to then attach a fully for example to then attach a fully for example to then attach a fully qualified domain name to the IP address qualified domain name to the IP address qualified domain name to the IP address of the load balancer which will then of the load balancer which will then of the load balancer which will then route it to the correct service in your route it to the correct service in your route it to the correct service in your Kubernetes Kubernetes Kubernetes cluster. It can also be used uh on onrem cluster. It can also be used uh on onrem cluster. It can also be used uh on onrem bare metal bare metal bare metal situations. For this you typically need situations. For this you typically need situations. For this you typically need to do some more configuration and you to do some more configuration and you to do some more configuration and you would use something called metal lb. But would use something called metal lb. But would use something called metal lb. But what's really cool with selium is that what's really cool with selium is that what's really cool with selium is that pselium can handle this load balancer on pselium can handle this load balancer on pselium can handle this load balancer on bare metal environments as well. This is bare metal environments as well. This is bare metal environments as well. This is what I have running here in my home lab.

  13. what I have running here in my home lab. what I have running here in my home lab. I'm using psyllium and I've configured I'm using psyllium and I've configured I'm using psyllium and I've configured that to basically act as metal lb and that to basically act as metal lb and that to basically act as metal lb and psyllium is able to assign addresses psyllium is able to assign addresses psyllium is able to assign addresses from my internal network to services in from my internal network to services in from my internal network to services in the Kubernetes cluster which are then the Kubernetes cluster which are then the Kubernetes cluster which are then reachable all over my network. So it's a reachable all over my network. So it's a reachable all over my network. So it's a very neat way of doing it and I've very neat way of doing it and I've very neat way of doing it and I've explained all of this in my CubeCraft explained all of this in my CubeCraft explained all of this in my CubeCraft community if you're interested in community if you're interested in community if you're interested in learning more about that. So I wanted to learning more about that. So I wanted to learning more about that. So I wanted to make this video as concise as possible make this video as concise as possible make this video as concise as possible and it's only served as an introduction. and it's only served as an introduction. and it's only served as an introduction. Uh I I don't think I will even go into Uh I I don't think I will even go into Uh I I don't think I will even go into ingress because that's a much broader ingress because that's a much broader ingress because that's a much broader topic as well. This is just meant to get topic as well. This is just meant to get topic as well. This is just meant to get you on your way and to basically start you on your way and to basically start you on your way and to basically start start you up with the fundamental start you up with the fundamental start you up with the fundamental concepts of Kubernetes networking. So concepts of Kubernetes networking. So concepts of Kubernetes networking. So the most important thing to continue the most important thing to continue the most important thing to continue with is to start applying these things. with is to start applying these things. with is to start applying these things. create pods in your cluster and then create pods in your cluster and then create pods in your cluster and then create services and then start create services and then start create services and then start interacting with them. Really go into interacting with them. Really go into interacting with them. Really go into the pods uh use curl, use ping and and the pods uh use curl, use ping and and the pods uh use curl, use ping and and create network policies and you really create network policies and you really create network policies and you really have to spend time to to basically get have to spend time to to basically get have to spend time to to basically get to know this and get it in your blood to know this and get it in your blood to know this and get it in your blood because you can read about this. You can because you can read about this. You can because you can read about this. You can watch videos as much as you like, but watch videos as much as you like, but watch videos as much as you like, but you're only going to learn properly when you're only going to learn properly when you're only going to learn properly when you get your Kubernetes cluster up and you get your Kubernetes cluster up and you get your Kubernetes cluster up and running and you start using these running and you start using these running and you start using these concepts and you start applying them.

  14. concepts and you start applying them. concepts and you start applying them. That's the only way the real learning That's the only way the real learning That's the only way the real learning will happen. And if you need a little will happen. And if you need a little will happen. And if you need a little bit of guidance in that, if you want to bit of guidance in that, if you want to bit of guidance in that, if you want to have the structure, then check out my have the structure, then check out my have the structure, then check out my CubeCraft DevOps community. The CubeCraft DevOps community. The CubeCraft DevOps community. The Kubernetes fundamentals course is set up Kubernetes fundamentals course is set up Kubernetes fundamentals course is set up in such a way where as if we are sitting in such a way where as if we are sitting in such a way where as if we are sitting together in the same room and I'm just together in the same room and I'm just together in the same room and I'm just teaching you okay well let's create a teaching you okay well let's create a teaching you okay well let's create a pod here let's let's let's see how can pod here let's let's let's see how can pod here let's let's let's see how can we reach this service etc. So this is we reach this service etc. So this is we reach this service etc. So this is the way that I set up these courses. the way that I set up these courses. the way that I set up these courses. It's all very practical. And after It's all very practical. And after It's all very practical. And after Kubernetes fundamentals, you can go into Kubernetes fundamentals, you can go into Kubernetes fundamentals, you can go into Kubernetes mastery in which you will Kubernetes mastery in which you will Kubernetes mastery in which you will learn how to set up a Kubernetes home learn how to set up a Kubernetes home learn how to set up a Kubernetes home lab from scratch with GitOps uh exposing lab from scratch with GitOps uh exposing lab from scratch with GitOps uh exposing services to the internet safely. And uh services to the internet safely. And uh services to the internet safely. And uh as you know, I'm in here all the time. I as you know, I'm in here all the time. I as you know, I'm in here all the time. I have Q&A calls every week and I'm here have Q&A calls every week and I'm here have Q&A calls every week and I'm here to answer your questions when you get to answer your questions when you get to answer your questions when you get stuck. So check out stuck. So check out stuck. So check out school.com/cubcraft if you want to take school.com/cubcraft if you want to take school.com/cubcraft if you want to take your Kubernetes skills to the next

Summary

This video provides a beginner's guide to Kubernetes networking, focusing on the fundamental unit of a pod. It explains that each pod gets its own IP address and by default, all pods can communicate freely, with intra-pod container communication happening via localhost. The practical takeaway is that understanding basic pod networking is the first step to demystifying more complex Kubernetes networking concepts like ingresses and CNIs.

View original episode ↗