I am going through the Kubernetes quick start on Ubuntu 16.04 running in a VirtualBox VM on a Windows 10 host.
It has a NAT network adapter with a static IP address of 192.168.133.75. I can ping this address from my host machine.
I have the "sock-shop" running my VM. This is what I get when I run kubectl describe svc front-end -n sock-shop
:
Name: front-end
Namespace: sock-shop
Labels: name=front-end
Selector: name=front-end
Type: NodePort
IP: 10.104.66.95
Port: <unset> 80/TCP
NodePort: <unset> 30001/TCP
Endpoints: 10.32.0.18:8079
Session Affinity: None
So when I go to 10.104.66.95
on my VM, I see the website and all is good, not so much on my host.
I have setup port forwarding on the network adapter as follows (I know IP addresses are options, I've also tried without them, but it didn't work):
What am I doing wrong?
Try accessing the NodePort
on your host, access the site via: 192.168.133.75:30001
Ref: https://kubernetes.io/docs/user-guide/services/#type-nodeport