CK.V · CKAD practice question

Which kubectl command exposes an existing Deployment named web on Service port 80 targeting container port 8080 as a ClusterIP Service?

Choose one answer
Check answer and explanation

Correct answer: kubectl expose deployment web --port=80 --target-port=8080

Explanation

kubectl expose deployment --port= --target-port= creates a ClusterIP Service using the Deployment's selector.

Common trap

kubectl expose deployment --port= --target-port= creates a ClusterIP Service using the Deployment's selector.

Source: Original unofficial practice; not an official CKAD exam item
Checked against the cited text on 2026-11-30.

Report an error in this question