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

Connect to a published port from the outside world : difference between PWD and PWK #259

Closed
yogeek opened this Issue May 4, 2018 · 6 comments

Comments

Projects
None yet
3 participants
@yogeek

yogeek commented May 4, 2018

Hi,

There is a difference in the FAQ between "master" tag and "k8s" tag concerning access to published port :

master README.md (PWD)

If you need to access your services from outside, use the following URL pattern http://ip<hyphen-ip>-<session_jd>-<port>.direct.labs.play-with-docker.com (i.e: http://ip-2-135-3-b8ir6vbg5vr00095iil0-8080.direct.labs.play-with-docker.com).

k8s README.md (PWK)

If you need to access your services from outside, use the following URL pattern http://pwd<underscore_ip>-<port>.<host#>.labs.play-with-docker.com (i.e: http://pwd10_2_135_3-80.host3.labs.play-with-docker.com/).
  1. hyphen or underscore ?
  2. 'ip' or 'pwd' prefix ?
  3. 'play-with-docker.com' or 'play-with-k8s.com' suffix ?

I am trying to display kubernetes dashboard on PWK as advised in #258 but does not manage to have the right URL...
Are these differences normal and what is the right configuration to access K8S dashboard after deploying it and starting 'kubectl proxy --port=8080' ?

Thanks

@marcosnils

This comment has been minimized.

Contributor

marcosnils commented May 4, 2018

@yogeek can you share how you're deploying the dashboard please?

@yogeek

This comment has been minimized.

yogeek commented May 4, 2018

@marcosnils I followed the README :

$ kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml

$ kubectl proxy --port=8080
@marcosnils

This comment has been minimized.

Contributor

marcosnils commented May 9, 2018

Try deploying the dashboard service and expose it as either NodePort or LoadBalancer. You can use this command to dynamically change it in the kubectl apply.
curl -L -s https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/alternative/kubernetes-dashboard.yaml | sed 's/targetPort: 9090/targetPort: 9090\n type: LoadBalancer/' | kubectl apply -f -

That should populate the blue badge at the top so you can click in there

@marcosnils marcosnils closed this May 9, 2018

@yogeek

This comment has been minimized.

yogeek commented May 9, 2018

@marcosnils Indeed I tried that and it works but I had to manually change the protocol to "https" to access to the dashboard. I cannot reproduce though because the connection to PWK does not seem to work anymore for the time being...
To conclude on the initial topic, are the differences in the URL to access a published port between PWD and PWK are normal or an error in the README ?

@rahgadda

This comment has been minimized.

rahgadda commented Jun 17, 2018

Now blue badge is not getting displayed. Can you please help
no blue link

@yogeek

This comment has been minimized.

yogeek commented Oct 3, 2018

Try deploying the dashboard service and expose it as either NodePort or LoadBalancer. You can use this command to dynamically change it in the kubectl apply.
curl -L -s https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/alternative/kubernetes-dashboard.yaml | sed 's/targetPort: 9090/targetPort: 9090\n type: LoadBalancer/' | kubectl apply -f -

That should populate the blue badge at the top so you can click in there

@marcosnils This command displays the following error message :

[node1 install]$ curl -L -s https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/alternative/kubernet
es-dashboard.yaml | sed 's/targetPort: 9090/targetPort: 9090\n type: LoadBalancer/' | kubectl apply -f -
serviceaccount "kubernetes-dashboard" created
role "kubernetes-dashboard-minimal" created
rolebinding "kubernetes-dashboard-minimal" created
deployment "kubernetes-dashboard" created
error: error converting YAML to JSON: yaml: line 13: did not find expected key

Do you have a new way to be able to use the dashboard in PWK ?

Plus, I ma sorry but my initial question about the differences between PWD and PWK instructions in README remains unanswered... Can you please explain these differences ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment