hardkubectl
Create a NodePort service that forwards traffic to a specified target port
command
kubectl create service nodeport SERVICE --tcp=PORT:TARGET_PORTalso accepted
kubectl create service nodeportcommand
kubectl create service nodeport SERVICE --tcp=PORT:TARGET_PORTalso accepted
kubectl create service nodeportPart of the Kubernetes CLI (kubectl) — Services category.
| Flag | Purpose |
|---|---|
--tcp | Set to: PORT:TARGET_PORT |
Test your recall — not just your reading.
Practice with interactive quiz →