Set resource requests and limits
Changes requests and limits of a running deployment without editing YAML
kubectl set resources deployment/<name> -c <container> --requests=cpu=100m,memory=128Mi --limits=cpu=500m,memory=512Mi -n <ns>
- tool
- kubectl73 commands
- tags
- deploymentsconfig
More kubectl commands
-
kubectl run tmp --image=nicolaka/netshoot -it --rm --restart=Never -n <ns> -- bashTemporary pod for debugging; deleted when you exit
-
kubectl get nodes --show-labelsLists all labels on each node
-
kubectl uncordon <node>Allows scheduling again on a node that was cordoned
-
kubectl get hpa -ACurrent and desired replicas and metrics of each Horizontal Pod Autoscaler
-
kubectl describe resourcequota -n <ns>Used vs hard limits for CPU, memory and object counts in the namespace