Kubernetes services - (Understanding Kubernetes Networking Part 4)
Vložit
- čas přidán 26. 04. 2021
- This video, Kubernetes services is the fourth installment in the "Understanding Kubernetes Networking" series. In this video, we start off by learning about Kubernetes Control Plane and visually will go through the process of when a deployment occurs and how PODs are created. We will then learn about various Kubernetes survives such as ClusterIP, NodePort, LoadBalancer, headless services, and services without selectors and detailed discussion on how service load balancing is accomplished through "iptables". We will conclude by examining how CoreDNS provides service discovery.
Complete playlist for these series: • Kubernetes Networking ...
**Note: In this video, we will not go through setting up a Kubernetes cluster and installing Calico, I have covered that in other courses: "Setup a "Docker-less" Multi-node Kubernetes Cluster on Ubuntu Server: • Setup a "Docker-less" ...
And, "Step by Step Instructions on Setting up Multi-Node Kubernetes Cluster on CentOS": • Step by Step Instructi...
Keywords: Kubernetes services, ClusterIP, NodePort, LoadBalancer, Headless Services, Services without Selectors, iptables, CoreDNS, Kube-Proxy, Kubernetes Control Plane
My Other Videos
► Cilium Kubernetes CNI Provider, Part 1: Overview of eBPF and Cilium and the Installation Process • Cilium Kubernetes CNI ...
►Cilium Kubernetes CNI Provider, Part 2: Security Policies and Observability Leveraging Hubble
• Cilium Kubernetes CNI ...
► Cilium Kubernetes CNI Provider, Part 3: Cluster Mesh
• Cilium Kubernetes CNI ...
► What is VXLAN and How It is Used as an Overlay Network in Kubernetes?
• What is VXLAN and How ...
► Managing Linux Log-ins, Users, and Machines in Active Directory (AD): Part 2- Join Linux Machines to AD:
• Managing Linux Logins,...
► Managing Linux Log-ins, Users, and Machines in Active Directory (AD): Part 1- Setup AD:
• Managing Linux Logins,...
► Sharing Resources between Windows and Linux:
• Sharing Resources betw...
► Kubernetes kube-proxy Modes: iptables and ipvs, Deep Dive:
• Kubernetes kube-proxy ...
►Kubernetes: Configuration as Data: Environment Variables, ConfigMaps, and Secrets:
• Kubernetes: Configurat...
►Configuring and Managing Storage in Kubernetes:
• Configuring and Managi...
► Istio Service Mesh - Securing Kubernetes Workloads:
• Istio Service Mesh - S...
► Istio Service Mesh - Intro
• Istio Service Mesh (si...
► Understanding Kubernetes Networking. Part 6: Calico Network Policies:
• Understanding Kubernet...
► Understanding Kubernetes Networking. Part 5: Intro to Kubernetes Network Policies:
• Understanding Kubernet...
► Understanding Kubernetes Networking Part 3: Calico Kubernetes CNI Provider in-depth:
• Understanding Kubernet...
► Understanding Kubernetes Networking. Part 2: POD Network, CNI, and Flannel CNI: Plug-in: • Understanding Kubernet...
►Understanding Kubernetes Networking. Part 1: Container Networking: • Video
► A Docker and Kubernetes tutorial for beginners:
• A Docker and Kubernete...
► Setup a "Docker-less" Multi-node Kubernetes Cluster on Ubuntu Server:
• Setup a "Docker-less" ...
►Step by Step Instructions on Setting up Multi-Node Kubernetes Cluster on CentOS: • Step by Step Instructi...
►Setup and Configure CentOS Linux Server on A Windows 10 Hypervisor - CZcams: • Setup and Configure Ce...
►Setup NAT (Network Address Translation) on Hyper-V: • Setup NAT (Network Add...
► Enable Nested Virtualization on Windows to run WSL 2 (Linux) and Hyper-V on a VM: • Enable Nested Virtuali...
►Setup a Multi-Node MicroK8S Cluster on Windows 10:
• Setup a Multi Node Mic... - Věda a technologie
One of the best set of videos (maybe the best). Describing all aspects of the networking in kubernetes in details. I really enjoyed by watching the series and suggest it to all.
Many thanks for your positive feedback and glad it was helpful!
Still watch this every time I need a refresher. Best series and teacher for K8s.
Excellent and detailed one. Looking forward for more topics.
I found the best kubernetes networking lecture. thanks very much!🙏
I am done with 4th part.. thanks a lot for putting such wonderful content..
Thank you for videos, one of the best to understand Kubernetes networking!
one of the best series. keep educating. thank u
Fantastic set of courses, thank you very much.
Hi Alex, thanks very much and glad you like them!
@@TheLearningChannel-Tech Thanks you Garry.
I pretty much wasted time watching the other videos, not many question left after your courses.
I was looking for a exhaustive K8s video and this is the best video that i have ever seen.... Thanks...
Thank you and glad it helped!
You are a k8s scientist sir!!! You shared a great level of understanding about packet flow in k8s. It helps to visualize whole packet flow when i am trying to create pod or service. Thank you very much for your efforts of making such informative video.
Thank you sir~ Your video is really helpful for understanding the essential part of Kubernetes !
Hi, thank you very much! Glad it was helpful!
Great videos series for kuberenets.
All concepts are crystal clear.. Thanks a lot for these series of videos..
Thank you very much! Glad you like them!
100% agree with all comments here , your teaching style is impeccable!! There is something about how you bring everything together !! im hooked to your content outstanding !!
Hi Pat, many thanks for your kind words and glad you found them useful. Thanks again!
best course on k8s networking i have seen and have seen dozens
Hi Ariel, many thanks for your kind words and glad you found it helpful. Thanks again!
Really fantastic course, really really thanks to share it. Kubernetes Networking explained in details but also in enjoying manner!!!!
Hi Michele, thank you very much for your kind words, much appreciated! Glad it was helpful. Thanks again!
Best explanation on K8s neworking on the internet
Thanks. Glad it was helpful.
very great series
amazing session as usual
kudos to you for great series!!
Many thanks for your comment and thank you for watching!
Very detailed information video about kubernetes & CNI I have taken many courses across Udemy , CZcams etc found the best explaination on kubernetes thanks ,,, keep rocking 😊😊
Thank you for your feedback, much appreciated!
excellent set of videos, many thanks, every K8S guy shall see it
Thanks!
@@TheLearningChannel-Tech You may just think of adding Ingress Networking to complete the series ! 🙂
Thank you so much for materials you make! They are much useful among other materials about k8s.
You're very welcome!
Excellent course ..actually the best course that explains every bits and bytes about Kubernetes Networking. you are fantastic.
Thank you!
@@TheLearningChannel-Tech I only commented when I reached Part4, I work for a top-notch Telecom Provider and deploy 5G SA using the Kubernetes technology, and was lost about the networking part until I found your series.
@@ahmedgouda1094 Thanks Ahmed for your feedback and glad these helped. Thanks again!
I think this series of the course is the best course to learn k8s networking and it is completely free, rather than any paid course in Udemy which I already purchased. Hats off sir, you are incredible talented when explaining this.
Thank you and glad you found them helpful.
Great video!
Thank you!
Keep making kubernetes videos!!!
Very useful video
Glad you liked it
best video of K8
Many thanks for your kind words!
Thanks
Thanks for wonderful session. Its one of detail and easy to understand the concept. Really appreciate ur efforts. Just one doubt. I believe POD network namespace is created by CRI with the help of pause container. And after then CRI call CNI plugins as per CNI config file.
Hi, correct, this is a simplified explanation. Thanks.
I have been learning a lot from this Networking Series, thanks for sharing, is there anyway we can get the slides used in the series.Thanks again
Welcome and thanks for feedback. Sorry, I don't share the slides.
Hi, Again great content, thanks you so much for your work.
Does this cluster IP is same for all the nodes in cluster ?
You have mentioned that cluster service IP (virtual ip) which is created by kube-proxy, Since each worker node having kube-proxy, I am wonder how they know there is already virtaul IP is created (by kube-proxy of other worker node in cluster) or not (In case if cluster IP is same across all the node in cluster)
Thanks
Hi,
Kube-proxies on all nodes check the API Server (etcd) periodically to check if a new service is created, if so, each Kube-proxy will create the same identical ClusterIP on all their respective nodes.
For the NodePort service, in the video at 37:50
In the the host network namespace of kube-node2, are you sure that Nodeport=10.0.0.135( IP of kube-node1) ?
It should be the IP of kube-node2, Nodeport=10.0.0.164 right ? ( and different ClusterIP maybe)
Or am i missing something?
No, the NodePort IP is a single IP. That IP is really a load balancer that picks one of the servers in round robin fashion.
very much informative knowledges on k8s networking form all perspective, please could you provide the link for the list of commands being executed, which is available in VisualStudioCode, many thanks
Hi, here you go: github.com/gary-RR/myCZcams-video-kubernetes-services
yeah 🕺
Thanks for the great series!! I have a question, when you say that cni's like flannel and calico provides an overlay network to overcome the complexity of a direct communication between the different nodes (when they sit in a different subnets/networks). how does an overlay network manage to overcome this complexity without changing the underlying network?
and another request, what is the command to configure iptables to loadbalance the traffic destined for the clusterip between all service endpoints?
Hi, as I believe suggested in your other post, watch my VXLAN video to get an understanding of what an overlay network is and how overlay network providers such as VXLAN work and why they are important: studio.czcams.com/users/videoWMLSD2y2Ig4/edit
Why would you want to construct it by hand? Kubernetes does that for you. You can query the iptables to see how Kubernetes creates the services.
I had exactly the same question, I was not able to comprehend how does an overlay network here reduces the complexity. Thanks for the vxlan video
Also, does IPtable use other than random method to select the pod ip like round robin or something. Is there any video to understand iptables or is it covered in vxlan video?
How did you synthesize the network logic of these more fundamental kubernetes workflows? By capturing packets and studying the differences between them in certain contexts and then looking at various logs and ip table entries or? That's what I'd like to understand is how you came by the knowledge of how these networking workflows transpire? Or did you just read documentation haha? I don't think most of this is covered in docs, but maybe I'm wrong.
Hi, a lot of research, experimentation, and experience using the product. As you probably know Kubernetes in general, and its networking in particular is very complex. Through these series I've tried to cover concepts using animation to hopefully make the subject matter a little easier for the viewer to understand. I hope I have achieved that goal. Thanks for watching and your comment!
can we docs for the videos..?
I 've never such details anywhere.
Thank you, glad you found it helpful!
thanks for your great course, how we can access the code?
Hi, thank you. You can find the scripts here: github.com/gary-RR/myCZcams-video-kubernetes-services
Good video! How do you copy line from editor and paste it to terminal? :)
Hi,
Thanks. In vscode you can bind a function key to automatically execute a command typed in the editor command in the terminal. In my case, I bind F8 to "Terminal: Run Selected Text In Active Terminal". This will execute the line that the cursor is on or highlighted in the terminal.
To do this:
1) In vscode, click "File" (if you are on Windows) or "Code" (if you are on MAC) and click select "Preferences/keyboard shortcuts"
2) In the dialog box type and search for "Terminal: Run Selected Text In Active Terminal".
3) Click on the pen icon and when the edit dialog box opens, click on a function key (like F8) to bind it to.
4) Go back to vscode main menu and click on "Terminals/New terminal" to open a new terminal.
5) You can now type any command in vscode editor and press your chosen bound function key to automatically execute in the terminal.
Hope this helps.
@@TheLearningChannel-Tech Sir, you are so kind 😇 Your Kubernetes videos are awesome 😃
@@Jaynext2 Thank you.
Is there a video talking about Ingress, Ingress controller etc... ?
A new Cilium mesh video which includes ingress will be released soon.
@@TheLearningChannel-Tech thank you
could you please add section install IPVS on kubernetes. Thank you
@vtvvn ha, hi and thanks for your suggestion. I will add it to my list of future videos. Currently I'm working on a couple of new videos s it may take a little bit of time to get to it. Thanks again!
Hi, sorry it took a while to get around it but just published it: czcams.com/video/lkXLsD6-4jA/video.html
Hi,
Could you please help me to understand
What is difference between External IP and LoadBlancer IP wrt cloud and on-rem cluster deployment ?
Thanks
The Loadbalancer service type is typically implemented by the cloud providers such as Azure, Google, AWS, etc. The cloud provider automatically provisions a load balancer that maps an external VIP to a Kubernetes service hosted on Kubernetes nodes.
In the external IP case, it is your responsibility to map an IP address to a node IP or group of nodes (you'll need to set up a load balancer in this case). You can then include that IP in your service definition in the form of:
spec:
.......
externalIPs:
- xxx.xxx.xxx.xxx
@@TheLearningChannel-Tech For Managed kubernetese in AWS The Loadbalancer service type is typically implemented by the AWS EKS.
while using EC2 servers (Native kubernetes on AWS) , we can launch ELB and map that to cluster IP
or
we have to use ELB/ALB and map the target nodes to Load balancer
ClusterIPs are not visible outside the cluster, a better option would be to use a "NodePort" service. The NodePort service is callable through the IP address of cluster servers and a random port number. You could then set up a load balancer that maps a virtual IP address/name and say port 80 to one of the cluster's server and the NodePort service's port in a round-robin fashion.
Hi
Can pls add this ppt PDF and command or script in your GitHub rep
Please share the link
Here you go: github.com/gary-RR/myCZcams-video-kubernetes-services/tree/main. This is raw, make sure you change the IPs, etc. to match your Cluster.
@@TheLearningChannel-Tech u are amazing thanks
@@ravikiranravada1059 Welcome!
Pod Test is not a part of hello-world deployment
??. Could you clarify exactly what you mean please? Thanks.