← Services88 / 640
hardkubectl

Create a service to expose a deployment's pods to network traffic

command

kubectl expose deployment DEPLOYMENT_NAME --port PORT --type TYPE

also accepted

kubectl expose deploymentkubectl expose deploykubectl expose deploy DEPLOYMENT_NAME --port PORT --type TYPE

Test your recall — not just your reading.

Practice with interactive quiz →