Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the example to include NodePort and accessability #409

Merged
merged 1 commit into from
Feb 7, 2017

Conversation

cdrage
Copy link
Member

@cdrage cdrage commented Feb 3, 2017

This updates the example we have on the website to include NodePort in
the "labels" section as well as instructions on how to access the
service.

This updates the example we have on the website to include NodePort in
the "labels" section as well as instructions on how to access the
service.
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 3, 2017
@cdrage
Copy link
Member Author

cdrage commented Feb 3, 2017

ping @ngtuna @sebgoa @kadel

@cdrage
Copy link
Member Author

cdrage commented Feb 7, 2017

Going to merge for now since the index page is the main page people are hitting and this is a common problem (how do I access the example?).

Let me know if there are any outstanding issues / problems!

@cdrage cdrage merged commit 5bb2d74 into kubernetes:gh-pages Feb 7, 2017
@kadel
Copy link
Member

kadel commented Feb 8, 2017

Hmm, I'm not sure if we should encourage people to use nodePort. Using LoadBalancer would be much better.

@cdrage
Copy link
Member Author

cdrage commented Feb 8, 2017

@kadel Only problem is that LoadBalancer is not supported in Minikube and those who want to try it would have to use a cloud provider with that supported 👎

What if I leave a note though on what the label is (reference to the document we have) as well as outlining that if you're on GCE / AWS / etc use LoadBalancer instead?

@surajssd
Copy link
Member

surajssd commented Feb 9, 2017

@cdrage actually even if you convert the service as LoadBalancer it is still exposed as NodePort, so it's upto the user to provision a LoadBalancer and the values of it's IP address to be populated, but even if it's values are not populated the service should do just fine.

@kadel
Copy link
Member

kadel commented Feb 9, 2017

If you are using minikube and you have LoadBalancer service you can access it using minikube service <service name>

This is basically same think that @surajssd is talking about it is taking advantage of NodePort, but user doesn't have to know about it.

I don't like using NodeBalancer for accessing services directly from "outside", it won't work on most production clusters.

@cdrage
Copy link
Member Author

cdrage commented Feb 9, 2017

@kadel

Okay. So basically, switch to LoadBalancer in the example and in the tutorial tell them to simply check kubectl get svc for IP?

@kadel
Copy link
Member

kadel commented Feb 9, 2017

Yes.
I think that switching to LoadBalancer would be better.
Than for minikube keeping minikube service frontend and for other cases kubectl get svc ....

@cdrage
Copy link
Member Author

cdrage commented Feb 9, 2017

@kadel Okay, #409 opened.

@kadel
Copy link
Member

kadel commented Feb 9, 2017

btw. one useful, but ugly command 😉 :

kubectl get svc frontend -o template --template "{{(index .status.loadBalancer.ingress 0).ip}}:{{(index .spec.ports 0).port}}"

this is will display public ip and port for frontend service. Tested on GKE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants