This is a...
Problem:
Tutorial includes curl host01:$NODE_PORT. This works fine in-tutorial, but following along on my own machine, host01 is not defined.
Proposed Solution:
Identify where host01 comes from and add a note about what the equivalent is when running minikube locally (on OS X, in my case).
Page to Update:
http://kubernetes.io/docs/tutorials/kubernetes-basics/expose-interactive/
module 4 step 1
Thank you for the feedback. Host01 is the name of the Docker Host. We'll look at a way to make this clearer for running locally
Hi BenHall ,
How can i get name of docker host when i use minikube .
Edited:
I know what it is . ( ip of minikube)
Thanks
If the cluster is on minikube, it provides a handy way to direct to the exposed service:
โฏ minikube service kubernetes-bootcamp
Opening kubernetes service default/kubernetes-bootcamp in default browser...
This will work
$ kubectl cluster-info
Kubernetes master is running at https://192.168.99.100:8443
kubernetes-dashboard is running at https://192.168.99.100:8443/api/v1/proxy/namespaces/kube-system/services/kubernetes-dashboard
I have found this to work also (after having followed all the steps of the tutorial successfully) issue on terminal:
curl http://$(minikube ip):$NODE_PORT
You should see:
Hello Kubernetes bootcamp! | Running on: kubernetes-bootcamp-390780338-h3wfb | v=1
minikube ip works for me but takes 20 seconds to respond. Any idea why it would take so long?
minikube ip works perfectly and for me it takes 1-2 seconds to work. I'm surprised that this issue is closed with no solution provided. I bet there are many people out there that do not want to complete tutorials in a browser but on their local on their own
@steveperry-53, why'd you close this? https://kubernetes.io/docs/tutorials/kubernetes-basics/expose-interactive/ still uses host01 with no explanation of where or why it's defined, and you've not posted any explanation of why you closed it immediately after being assigned.
@ExplodingCabbage Host01 is the name of the machine running. We can make this clearer in the explanation.
If you run hostname you will see how it's been assigned.
$ hostname
host01
$ kubectl cluster-info
Kubernetes master is running at https://172.17.0.23:8443
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
$ minikube ip
172.17.0.23
Update:
We've made a change to the scenario content at https://github.com/katacoda-scenarios/kubernetes-bootcamp-scenarios/commit/42b95d98f66f21c93924d35ae8400d43ffce8a15
@ExplodingCabbage, Sorry about closing this. I don't remember why. I think I probably hit Close by mistake.
@steveperry-53 I've made some changes to help here - katacoda-scenarios/kubernetes-bootcamp-scenarios@42b95d9
@BenHall
I've made some changes to help here
... except that if I follow the tutorial locally on my Mac, I can't connect to the service on $(hostname):$NODE_PORT, but rather have to connect on $(minikube ip):$NODE_PORT. Both work in the interactive tutorial, but I don't know why.
@ExplodingCabbage Oh, I see your point! Yes, that's much better. Updated the content to use minikube ip. Thanks!
https://github.com/katacoda-scenarios/kubernetes-bootcamp-scenarios/commit/f33bbbd53a34bdb61a725b09010dcda6dbd0fab6
https://github.com/katacoda-scenarios/kubernetes-bootcamp-scenarios/commit/55f969d9bdd801edd270360e25c1e3f1b9ed892f
I believe the reason $(hostname):$NODE_PORT doesn't work on your mac is because Minikube is running within VirtualBox (or similar VM) where as the interactive scenario is running on Linux so doesn't need a separate VM.
LGTM @BenHall. I figure this issue can now be closed.
/close
Most helpful comment
I have found this to work also (after having followed all the steps of the tutorial successfully) issue on terminal:
curl http://$(minikube ip):$NODE_PORTYou should see:
Hello Kubernetes bootcamp! | Running on: kubernetes-bootcamp-390780338-h3wfb | v=1