nigelpoulton / TheK8sBook

YAML files for use with The Kubernetes Book
822 stars 665 forks source link

Ports suggested in Chaprt 5 do not work without port forwarding #38

Open Antsthebul opened 1 year ago

Antsthebul commented 1 year ago

On Win 11, using Docker Desktop v4.22.

Issue

  1. Attempting to connect to the localhost:31112 (pg 72?), as suggested, and this does not work.
  2. And this of course would be applied to (pg. 64?) after running kubectl apply -f sidecar-local.yml

    "...If your cluster is on you laptop, point your browser to localhost:30001.."

Resolution

Continuing with the namespace tutorial (point 1), I needed to run kubectl port-forward -n shield svc/the-bus 31112:8080 and I was then able to access the html page.

Not sure if I overlooked anything, but Im guessing it has to do with the host configuration, that should be listening on 0.0.0.0 (like Docker)