kubectl set
Update fields of existing application resources. More information: https://kubernetes.io/docs/reference/kubectl/generated/kubectl_set/.
- Update the image of a container in a deployment:
kubectl set image / =
- Update the image of all containers in a deployment:
kubectl set image / *=
- Set resource limits (CPU and memory) on a deployment:
kubectl set resources / --limits cpu=,memory=
- Set an environment variable on a deployment:
kubectl set env / =
- Remove an environment variable from a deployment:
kubectl set env / -
- Import environment variables from a secret or ConfigMap:
kubectl set env --from / /
- Update the service account of a deployment:
kubectl set /
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
