You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
kubectl apply -f kubernetes/ # Run this from project root to deploy the stack
Expose/Access App
via NodePort (Docker Desktop)
NODE_PORT=$(kubectl get svc -l app=nginx -o go-template='{{range .items}}{{range.spec.ports}}{{if .nodePort}}{{.nodePort}}{{"\n"}}{{end}}{{end}}{{end}}') # get NodePort of NGINX
curl -X GET http://localhost:$NODE_PORT; echo # access service
via Port-Forward
kubectl port-forward deployment/nginx-deployment 8080:80 # forward local port 8080 to NGINX pod port 80 within cluster
curl -X GET http://localhost:8080; echo # access service from a different terminal
Destroy
kubectl delete -f kubernetes/ # Run this from project root to destroy the stack