May 2018
Intermediate to advanced
554 pages
13h 51m
English
Let's take a look at the insight of the service using describe in the kubectl command. We will create one Kubernetes service with the type LoadBalancer, which will dispatch the traffic into two endpoints, 192.168.79.9 and 192.168.79.10 with port 80:
$ kubectl describe service my-first-nginxName: my-first-nginxNamespace: defaultLabels: run=my-first-nginxAnnotations: <none>Selector: run=my-first-nginxType: LoadBalancerIP: 10.103.85.175Port: <unset> 80/TCPTargetPort: 80/TCPNodePort: <unset> 31723/TCPEndpoints: 192.168.79.10:80,192.168.79.9:80Session Affinity: NoneExternal Traffic Policy: ClusterEvents: <none>
The port here is an abstract service port, which will allow any other resources to access the service within the cluster. ...