Kubernetes figure out the "Three Kinds of IP"

IP address of Node node: Node IP

Pod IP: IP address of Pod

Cluster IP: IP address of Service

First, Node IP is Kubernetes cluster IP address (server) physical network adapter for each node, which is a real physical network (which may also be a virtual machine network), can communicate over the network between each node (server) machines in the machine outside the cluster the cluster is Kubernetes communicate via this network.

Secondly, each Pod Pod IP is the IP address, which is assigned in accordance with Docker Engine docker0 IP network segment, usually a virtual Layer 2 network, the default Pod on the different Node Kubernetes cluster can not communicate, it is necessary cluster network management, ensure that you can communicate with each other, communicate before Pod is forwarded by Node IP physical network adapter between Pod.

Finally, Servicede Cluster IP, which is the virtual IP, only acting on the Service object by kubernetes management and distribution. Cluster Ip can not be ping, because there is no "real network objects" in response.

Cluster IP only in conjunction with Service Port composition of the particular communications port, they belong to a closed space such kubernetes clusters, cluster nodes outside access if needed, requires special handling.

In order for users outside of cluster nodes or access Service (micro-services), we need to be developed to micro NodePort services that can be accessed via + NodePort Node IP.

 

Guess you like

Origin www.cnblogs.com/Eleven-Liu/p/11415853.html