Create a deployment called nginx-deploy with image nginx:1.16 and 1 replica. Record the version. Next upgrade the deployment to version 1.17 using rolling update. Make sure that the version upgrade is recorded in the resource annotation

First, create the deployment:

Next, update the deployment to version 1.17:

Verify the deployment:

Where is this question from? It sounds old; the --record flag no longer works in recent versions of kubernetes for kubectl create deploy.

1 Like

--record still works. It doesn’t apply to create but does apply to modifications, e.g.

controlplane $ k set image deployment/nginx nginx=nginx:1.17 --record
Flag --record has been deprecated, --record will be removed in the future
deployment.apps/nginx image updated

The flag has been deprecated for at least 6 years, but still not removed.