This tutorial assumers that minikube kubernetes is already installed. Steps to access service IP endpoint using curl
- Instal minikube and kubernetes
- create multi replica deployment
- Find service cluster IP
kubectl get svcNAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE hello-minikube LoadBalancer 10.106.113.247 <pending> 8080:30116/TCP 4h21m kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 18h
- Ssh to minikube VM (one of the nodes)
minikube ssh
- Run curl to access endpoint
curl SERVICE_INTERNAL_IP:8080
curl 10.106.113.247:8080
Request served by hello-minikube-7ddcbc9b8b-nmc2c HTTP/1.1 GET / Host: 10.106.113.247:8080 Accept: */* User-Agent: curl/7.68.0 docker@minikube:~$ curl 10.106.113.247:8080 Request served by hello-minikube-7ddcbc9b8b-t2wll HTTP/1.1 GET / Host: 10.106.113.247:8080 Accept: */* User-Agent: curl/7.68.0
You will see multiple value of pod name when you run above command multiple times.