Set resource requests/limits

Update resource requests and limits on a running deployment

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> -- bash

    Ephemeral pod for debugging; deleted on exit

  • kubectl get nodes --show-labels

    See all labels assigned to each node

  • kubectl uncordon <node>

    Re-enable scheduling on a previously cordoned node

  • kubectl get hpa -A

    Horizontal Pod Autoscaler current/desired replicas and metrics

  • kubectl describe resourcequota -n <ns>

    Used vs hard limits for CPU, memory, object counts in namespace

all 73 kubectl commands