kubectl-set
Update fields of existing application resources. tldr-pages
On several platforms
Several platforms
Update the image of a container in a deployment
kubectl set image [deploy/deployment_name container_name=imageIdentifyUpdate the image of all containers in a deployment
kubectl set image [deploy/deployment_name *=imageIdentifySet resource limits (CPU and memory) on a deployment
kubectl set resources [deploy/deployment_name --limits cpu=cpu_limit,memory=memory_limitIdentify--limitsThe resource requirement requests for this container. kubectl referenceSet an environment variable on a deployment
kubectl set env [deploy/deployment_name variable_name=valueIdentifyRemove an environment variable from a deployment
kubectl set env [deploy/deployment_name variable_name-IdentifyImport environment variables from a secret or ConfigMap
kubectl set env --from secret/resource_name [deploy/deployment_nameIdentify--fromThe name of a resource from which to inject environment variables kubectl referenceUpdate the service account of a deployment
kubectl set [sa [deploy/deployment_name service_account_nameIdentify