CmdID

CmdID / Commands

kubectl-set

Update fields of existing application resources. tldr-pages

On several platforms

Opens CmdID with your command. It is read in your browser and sent nowhere.

Several platforms

from tldr-pages, CC BY 4.0

Update the image of a container in a deployment

kubectl set image [deploy/deployment_name container_name=imageIdentify

Update the image of all containers in a deployment

kubectl set image [deploy/deployment_name *=imageIdentify

Set 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 reference

Set an environment variable on a deployment

kubectl set env [deploy/deployment_name variable_name=valueIdentify

Remove an environment variable from a deployment

kubectl set env [deploy/deployment_name variable_name-Identify

Import 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 reference

Update the service account of a deployment

kubectl set [sa [deploy/deployment_name service_account_nameIdentify