kubectl expose deployment web --type=NodePort --port=80
Expose a deployment as a service
Creates a service (stable network endpoint for a set of pods) of type NodePort that publishes the deployment on a cluster-wide port. On local clusters, minikube service web opens the URL in a browser. For HTTP routing, consider an ingress instead.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.