Understanding Kubernetes Networking - Kubernetes Basics

Understanding Kubernetes Networking, kubernetes networking, kubernetes networking basics, kubernetes networking concepts, basics of kubernetes networking

This post will explain you about Kubernetes Networking concepts and how it helps us for the communication and its types.

Networking in any architecture or technology is very essential to understand if you want to deploy the applications over the network and also understanding how the network works that will  help you to troubleshoot if you have any network issue. So we must know exactly what is happening in the network and how all the connections are establishing for the communication over the network.

If you are new to kubernetes and want to learn about kubernetes from basics, Refer the below links and also you can checkout all tutorial videos for free on YouTube and do subscribe for more free videos.

What is Kubernetes - Learn Kubernetes from Basics
How to Install Kubernetes on Linux (RedHat / CentOS)
How to Install Kubernetes On Ubuntu 16.04 LTS
How to Create Kubernetes Deployment, Services & Pods Using Kubectl
How to Create Kubernetes YAML for Deployment, Service & Pods
Kubernetes Volumes Explained with Examples
Kubernetes Persistent Volumes and Claims Explained

Also You can Watch this Entire Tutorial video with more examples on our YouTube Channel. Make use of it.
[youtube src="KtHKSyGzqvo" height="315" width="560" /]

Lets get started.

This is a basic kubernetes architecture where you have some worker nodes, and few pods are running on it with couple of containers.  When you have these many components, how all these components are establishing its connection to make the application accessible over the network.? The answer is that happens only through kubernetes networking.
Kubernetes Networking basics

[ads-post]
Types of Kubernetes Networking

1. Container to Container Communication:
When you have one or more containers within a pod that shares the same host networking. So pods will get its own IP address, All container shares same ip address but it works on different port. Communication between containers happens within the pod itself on different port. So all containers will be able to communicate each other by default.

2. Pod to Pod communication:
As said earlier, Each pods will get its own ipaddress. there are sub types within Pod to Pod communcation, that is.

Intra-node Pod Network - Communication of pods running on a single node.
Inter-node Pod Network - Communication of pods running in different nodes.

On the first case, each pod running on single worker node will have the communication by default, because All ip address of pods will be different and assigned from your local network. since it shares the same host.
On the second case, when you have pod running on multiple worker nodes, communication between these pods happens through network plugin that will create some route tables. It forwards the traffic from any pod to any destination pods.

3. Pod to Service Communication:
Service is kubernetes resource type that expose our application to outside the cluster. Through which pod can send the traffic to services.

4 External to Service Communication:
In order to access our application from outside the cluster, external traffic should be allowed to reach the server within the cluster.. This can be achieved using these different types.
a. ClusterIP
b. NodePort
c LoadBalancer
d. Extername

Each types has its own function and purpose.
Cluster IP - It is the default kubernetes service used for internal communcation within the cluster.
Nodeport - It will open a ports on each nodes and traffic will be forwarded  to the service through random port.
Loadbalancer - It is a type that forwards all external traffic to a service through this type.
External Name - it is a type used to access a service internally that is hosted outside cluster through DNS CName or A record..

Hope you have got an idea about kubernetes networking.

Also refer below related articles and checkout all tutorial videos for free on youtube.

What is Kubernetes - Learn Kubernetes from Basics
How to Install Kubernetes on Linux (RedHat / CentOS)
How to Install Kubernetes On Ubuntu 16.04 LTS
How to Create Kubernetes Deployment, Services & Pods Using Kubectl
How to Create Kubernetes YAML for Deployment, Service & Pods
Kubernetes Volumes Explained with Examples
Kubernetes Persistent Volumes and Claims Explained

Keep practicing and have fun. Leave your comments if any.
Support Us: Share with your friends and groups.

Stay connected with us on social networking sites, Thank you.
YouTube | Facebook | Twitter | Pinterest | Rss
Incoming searches: Basics of Kubernetes Networking Explained, kubernetes networking, kubernetes networking basics, kubernetes networking concepts, learn kubernetes networking, basics of kubernetes networking, kubernetes networking types, kubernetes networking tutorial, kubernetes networking commands, k8s, kubernetes, kubernetes tutorial, kubernetes networking example, kubernetes networking examples, kubernetes networking explained, kubernetes networking explained with examples, kubernetes full tutorial, kubernetes volume explained, kubernetes volumes explained, kubernetes volume local, kubernetes hostpath, real time kubernetes scenario, kubernetes tutorial for beginners, kubernetes beginner tutorial, kubernetes free online tutorial, kubernetes online free tutorial, kubernetes best tutorial, kubernetes videos, Understanding Kubernetes Networking
May 08, 2020

Post a comment

[disqus][facebook][blogger]

Contact Form

Name

Email *

Message *

Powered by Blogger.
Javascript DisablePlease Enable Javascript To See All Widget