I’m trying to create a service from minikube with virtualbox as hypervisor driver. It is able to create endpoints for matching pods with cluster ip address. But endpoint for outside the cluster is not being made even though it’s nodeport type service. In VM hosting this minikube cluster, I checked all sockets but the one to access service from outside the cluster is not really being created.
- protocol: TCP
- check that the selector
app:sample-app is one of the pods label
- can you please send the output of:
kubectl get ep sample-service -n <namespace>
Yea. That’s not a problem.
Name: sample-service Namespace: default Labels: Annotations: Subsets: Addresses: 172.17.0.10,172.17.0.11,172.17.0.4,172.17.0.5,172.17.0.7,172.17.0.8,172.17.0.9 NotReadyAddresses: Ports: Name Port Protocol ---- ---- -------- 8080 TCP Events:
what is the machine’s IP address? is it one of the IPs you listed?
No, all of them are cluster IPs only. VM’s eth IP address is 192.168.59.102
The VM NIC is not considered an endpoint the way pods are. The selector only selects pods.
That’s right. Pods would be final endpoints but by endpoint, I meant socket on node which would let one access service from outside cluster as expected from nodeport type service. So these logical cluster specific endpoints are being made but one on node is not.
When I try to curl nodeport from host machine it says ‘site refused to connect’ and actually socket is not being created on node.