You have a working Deployment and need a ClusterIP Service quickly for in-cluster callers. Which kubectl helper creates a Service from that Deployment?
Select an answer to reveal the explanation.
Short Explanation
kubectl expose is the shortcut that wraps a Service around an existing Deployment—port, target port, type, done. You’re not cordoning nodes or attaching a TTY; you’re just publishing a stable VIP for the app.
Full Explanation
kubectl expose can create a Service that selects a Deployment’s Pods using the Deployment’s labels, with flags for port, targetPort, and type. kubectl attach attaches to a running container, kubectl auth can-i checks authorization, and kubectl cordon marks nodes unschedulable—none of those create a Service for the app.