1

I have a POD and service of type ClusterIP deployed on Minikube.

If my understanding is correct, service ClusterIP isn't available from outside of the cluster, but should be available inside Minikube.

So I do:

kubectl describe service mk-backend

and get

Name:              mk-backend
Namespace:         default
Labels:            <none>
Annotations:       <none>
Selector:          app=mk-backend
Type:              ClusterIP
IP Family Policy:  SingleStack
IP Families:       IPv4
IP:                10.98.69.245
IPs:               10.98.69.245
Port:              <unset>  8080/TCP
TargetPort:        8080/TCP
Endpoints:         172.17.0.10:8080,172.17.0.8:8080,172.17.0.9:8080
Session Affinity:  None
Events:            <none>

Now I'm joining minikube by ssh:

minikube ssh

and here I expect the following to be working:

curl http://mk-backend:8080

But this gives me an error:

curl: (6) Could not resolve host: mk-backend

I also tried the following

curl mk-backend.svc.cluster.local:8080/
curl 172.17.0.10:8080/
curl 10.98.69.245:8080/

but none of them works. I checked service and POD are up and running. What am I doing wrong?

A cup of tea
  • 404
  • 1
  • 4
  • 13
  • What is the output of last three command ? also please use following structure and paste output here; curl -v telnet://: – Kağan Mersin Nov 17 '21 at 14:38
  • Could you please try running the following command to get the services “kubectl get services” and once you receive the port number, try to run the command like below “curl http://cluster-ip:port” and share the output here. – Tatikonda vamsikrishna Nov 17 '21 at 15:52

0 Answers0