Cheatsheet Pages / kubectl Cheatsheet
How to access a cluster service from your laptop — kubectl port-forward
A service is not exposed publicly but you need it in your local browser.
Placeholders follow the cheatsheet: web is a deployment/pod name and app.yaml is your manifest. Most commands act on the current namespace — add -n <ns> to target another one.
kubectl port-forward svc/web 8080:80 # now open http://localhost:8080
kubectl port-forward pod/web-6d9f7c5b4-x2abc 8080:80
Good to know
Map a cluster service to your laptop, then open it locally.
