Closed l0n3star closed 4 years ago
This is normal (with the docker driver), you will have to use "minikube tunnel" or "kubectl port-forward" to access the application.
With other drivers, you will get a real minikube ip
instead of the bogus 127.0.0.1
(localhost) which only works for some ports.
I ran minikube tunnel
but still not sure how to get nodePort
to work. This is my service:
k8s kubectl get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
hello-svc NodePort 10.110.6.68 <none> 8080:30001/TCP 70m
kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 4h31m
I tried curl 10.110.6.68:30001
but get no response. A ping to that IP gives request timeout:
k8s ping 10.110.6.68
PING 10.110.6.68 (10.110.6.68): 56 data bytes
Request timeout for icmp_seq 0
Or maybe this only works for LoadBalancer
service ?
Switching to docker desktop with k8s.
Steps to reproduce the issue:
OSX 10.15.5 Docker version 19.03.8 kubectl version 1.16.6-beta.0 minikube version 1.11.0
I started minikube with:
minikube start --driver=docker
I deployed this deployment:
I deployed this service:
The app is a trivial nodejs web app that runs on port 8080:
The app is running:
But if I curl from macOS it doesn't work:
If I switch the driver to hyperkit it works fine but I have to disconnect from VPN. As I'm working from home due to covid19 this is very inconvenient.
Full output of failed command:
curl 127.0.0.1:30001 curl: (7) Failed to connect to localhost port 30001: Connection refused
Full output of
minikube start
command used, if not already included:k8s minikube start --driver=docker 😄 minikube v1.11.0 on Darwin 10.15.5 ✨ Using the docker driver based on user configuration 👍 Starting control plane node minikube in cluster minikube 🔥 Creating docker container (CPUs=2, Memory=8100MB) ... 🐳 Preparing Kubernetes v1.18.3 on Docker 19.03.2 ... ▪ kubeadm.pod-network-cidr=10.244.0.0/16 🔎 Verifying Kubernetes components... 🌟 Enabled addons: default-storageclass, storage-provisioner 🏄 Done! kubectl is now configured to use "minikube"
❗ /usr/local/bin/kubectl is version 1.16.6-beta.0, which may be incompatible with Kubernetes 1.18.3. 💡 You can also use 'minikube kubectl -- get pods' to invoke a matching version ➜ k8s
Optional: Full output of
minikube logs
command: