salaboy / platforms-on-k8s

Platform Engineering on Kubernetes :: Book Examples
https://www.salaboy.com
Apache License 2.0
211 stars 113 forks source link

chapter 2: please add port-forward step that is prerequsite to seeing the localhost #60

Closed dereknHBO closed 2 months ago

dereknHBO commented 3 months ago

missed this twice when i ran the helm install, would be good to also have it in the docs.

currently: The Pod RESTARTS column shows that maybe Kafka was slow, and the service was started first by Kubernetes, hence it restarted to wait for Kafka to be ready.

Now you can point your browser to http://localhost/ to see the application.

suggested: The Pod RESTARTS column shows that maybe Kafka was slow, and the service was started first by Kubernetes, hence it restarted to wait for Kafka to be ready.

Running port-forward will allow you to see the application on localhost kubectl port-forward svc/frontend -n default 8080:80

Now you can point your browser to http://localhost/ to see the application.

salaboy commented 3 months ago

@dereknHBO thanks for reaching out.. adding port-forward is not necessary, as KinD is doing the port mapping. The reason why port-forward might seems to be working is because, kubectl will bypass the ingress and connect directly to the pod. What you want most of the time is to go through all the hoops that your end users will go, in this case going through the ingress. Does that make sense?