Service LoadBalancer
Run a Hello World application in your cluster:
The preceding command creates a Deployment and an associated ReplicaSet. The ReplicaSet has five Pods each of which runs the Hello World application.
Display information about the Deployment:
Display information about your ReplicaSet objects:
Create a Service object that exposes the deployment:
Display information about the Service:
Display detailed information about the Service:
In the preceding output, you can see that the service has several endpoints: 10.0.0.6:8080,10.0.1.6:8080,10.0.1.7:8080 + 2 more. These are internal addresses of the pods that are running the Hello World application.
To verify these are pod addresses, enter this command:
Use the external IP address (LoadBalancer Ingress) to access the Hello World application:
curl http://:
or
go to browser and type the Load Balancer IP Ingress IP Address.
Cleaning up
To delete the Service, enter this command:
To delete the Deployment, the ReplicaSet, and the Pods that are running the Hello World application, enter this command:
Last updated