Duration 3:00
Each Pod has a unique IP address - but the address is ephemeral. The Pod IP addresses are not stable and it can change when Pods start and/or restart. A service provides a single access point to a set of pods matching some constraints. A Service IP address is stable.
Create the frontend service:
[vagrant@rhel-cdk kubernetes]$ kubectl create -f frontend-service.yaml
service "frontend-ui" created
And check it:
[vagrant@rhel-cdk kubernetes]$ kubectl get services
NAME CLUSTER_IP EXTERNAL_IP PORT(S) SELECTOR AGE
frontend-ui 172.30.252.52 80/TCP app=frontend-ui 7s