I tried to send request 192.168.49.2:31083, but it did not work. I'm using Kubernetes with Docker.
kubectl expose deployment k8s-web-hello --port=3000 --type=NodePort
kubectl get service
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
k8s-web-hello NodePort 10.109.32.222 <none> 3000:31083/TCP 9m54s
kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 7d
minikube ip
192.168.49.2
How do I fix it?
Edited:
minikube service k8s-web-hello
|-----------|---------------|-------------|---------------------------|
| NAMESPACE | NAME | TARGET PORT | URL |
|-----------|---------------|-------------|---------------------------|
| default | k8s-web-hello | 3000 | http://192.168.49.2:31083 |
|-----------|---------------|-------------|---------------------------|
Starting tunnel for service k8s-web-hello.
|-----------|---------------|-------------|------------------------|
| NAMESPACE | NAME | TARGET PORT | URL |
|-----------|---------------|-------------|------------------------|
| default | k8s-web-hello | | http://127.0.0.1:45767 |
|-----------|---------------|-------------|------------------------|
Opening service default/k8s-web-hello in default browser...
❗ Because you are using a Docker driver on linux, the terminal needs to be open to run it.
Opening in existing browser session.
I do not understand why i can not access via first URL with IP address of the Minikube virtual machine but the second URL with local IP can ?