Kubernetes Networking Concepts: Difference between revisions
No edit summary |
No edit summary |
||
Line 3: | Line 3: | ||
* https://medium.com/google-cloud/understanding-kubernetes-networking-pods-7117dd28727 | * https://medium.com/google-cloud/understanding-kubernetes-networking-pods-7117dd28727 | ||
* https://medium.com/google-cloud/understanding-kubernetes-networking-services-f0cb48e4cc82 | * https://medium.com/google-cloud/understanding-kubernetes-networking-services-f0cb48e4cc82 | ||
=Internal= | =Internal= | ||
* [[Kubernetes_Concepts#Subjects|Kubernetes Concepts]] | * [[Kubernetes_Concepts#Subjects|Kubernetes Concepts]] | ||
=Pod Networking= | |||
=Service Networking= | |||
=DNS Support= | |||
Revision as of 02:41, 19 March 2020
External
- https://medium.com/google-cloud/understanding-kubernetes-networking-pods-7117dd28727
- https://medium.com/google-cloud/understanding-kubernetes-networking-services-f0cb48e4cc82
Internal
Pod Networking
Service Networking
DNS Support
Kube-proxy
Pod Network
Every pod in the Kubernetes cluster has its own IP address, which is routable on the pod network, so every pod on the pod network can talk directly to every other pod.
The DNS Service
Each Kubernetes cluster has an internal DNS service, with a static IP address that is hardcoded into every pod on the cluster. Every new Service is automatically registered with the cluster's DNS service so cluster components can find services by name. StatefulSets and the individual pods managed by a StatefulSet are also registered with the DNS service.
The DNS service is built on CoreDNS.
Testing name resolution:
kubectl run -it --rm --restart=Never --image=infoblox/dnstools:latest dnstools
Also see:
Network Plugin
Flannel
Flannel is the default network plugin that comes with Kubespray. Flannel is an L2 overlay network solution. An L2 solution is difficult to troubleshoot due to packet encapsulation. Also, every node in the network is state-heavy (VLANs, tunnels).
Calico
Calico is a pure L3 fabric solution.