Question No 11 What kubectl command can be used to do a Deployment update kubectl set image kubectl rollout undo kubectl rollout status kubectl rollout image

Correct Answer:

kubectl set image

Analyzing the Answer:

The kubectl set image command is used to update the image of one or more containers in a Deployment. It’s the most straightforward way to trigger a rolling update for a Deployment. The command specifies the Deployment name and the new image for the container(s). Kubernetes then handles the rolling update process, ensuring minimal downtime.

Analysis of other options:

A: kubectl rollout undo This command rolls back a previous deployment update, not initiates a new one.
B: kubectl rollout status This command displays the status of a deployment rollout, showing its progress but not initiating an update.
C: kubectl rollout image This command does not exist in the standard kubectl command set.

Read more here: Source link