Static website, mission 4 of 7
Look inside
beginner, about 8 minutes, in the Kubernetes Simulator
Opens once you pass Give it an address.
The briefing
web is up and behind its Service — but a ClusterIP is only reachable from inside the cluster, and you'd like to see the site for yourself.
kubectl exec POD -- COMMAND runs a command inside a running container and prints what it printed: the way to look at the files a pod actually has. kubectl port-forward svc/web 8080:80 connects port 8080 on your machine to one of the Service's pods, so curl localhost:8080 reaches it.
What you'll do
- Read the page nginx serves, from inside a pod
- Forward local port 8080 to the web Service
- Fetch the page with curl localhost:8080
- Bonus star: Find out exactly which nginx is running with nginx -v
The mission checks the cluster, not your keystrokes: any fix that works, passes.
More Static website missions
- 1. Your first pod
- 2. Pods that heal
- 3. Give it an address
- 4. Look inside
- 5. Launch day
- 6. Ship v2
- 7. The 3am page