← Services527 / 640
hardkubectl

Expose a single pod as a LoadBalancer service with an external IP

command

kubectl expose pod POD_NAME --port PORT --type LoadBalancer

also accepted

kubectl expose pod

Command breakdown

Part of the Kubernetes CLI (kubectl) — Services category.

kubectlexposepodPOD_NAME--portPORT--typeLoadBalancer
FlagPurpose
--portBoolean flag
--typeBoolean flag

Test your recall — not just your reading.

Practice with interactive quiz →