question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
marcosnilscommented, 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

1reaction
collabnixcommented, Apr 7, 2019

Quick suggestions:

  1. The URL https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/alternative/kubernet es-dashboard.yaml is no longer valid. The correct link is:

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

Also, the default port is 8443 and NOT 9090. Hence you might need to correct it to:

sed 's/targetPort: 8443/targetPort: 9090\n type: LoadBalancer/' 

Hope it helps

Read more comments on GitHub >

github_iconTop Results From Across the Web

Docker Tip #59: Difference between Exposing and Publishing ...
Then you can optionally publish a port back to your Docker host with -p so the outside world can connect to your service....
Read more >
Container networking - Docker Documentation
To make a port available to services outside of Docker, or to Docker containers which are not connected to the container's network, use...
Read more >
Docker Expose Port: What It Means and What It Doesn't Mean
Docker has two tools for managing ports: Docker expose port and Docker port ... you need to expose one or more ports to...
Read more >
How to use docker container as apache server? - Stack Overflow
By default Docker containers can make connections to the outside world, ... it is available in the docker container and your host port...
Read more >
Pivoting - Port forwarding - Tunneling · Total OSCP Guide
These machines are connected to other networks, so we can use them to pivot. # Windows ipconfig /all route print #Linux ifconfig ifconfig...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found