Set image on deployment
Rolling-update the container image without editing YAML
kubectl set image deployment/<name> <container>=image:tag -n <ns>
- tool
- kubectl73 commands
- tags
- deployments
More kubectl commands
-
kubectl rollout history deployment/<name> -n <ns>Show all revisions with change cause (requires --record or annotations)
-
kubectl rollout restart deployment/<name> -n <ns>Trigger zero-downtime pod rotation without changing spec
-
kubectl create namespace <ns>Create a new namespace; idempotent with --dry-run=client | apply
-
kubectl set resources deployment/<name> -c <container> --requests=cpu=100m,memory=128Mi --limits=cpu=500m,memory=512Mi -n <ns>Update resource requests and limits on a running deployment
-
kubectl run tmp --image=nicolaka/netshoot -it --rm --restart=Never -n <ns> -- bashEphemeral pod for debugging; deleted on exit