Scale deployment

Immediately change replica count

kubectl scale deployment/<name> --replicas=3 -n <ns>

tool
kubectl73 commands
tags
deployments

More kubectl commands

  • kubectl get events -A --sort-by='.lastTimestamp'

    Recent cluster events, oldest first — great for post-incident review

  • kubectl apply --server-side --dry-run=server -f file.yaml

    Validate manifest against live API without applying changes

  • kubectl get deployment/<name> -n <ns> -o yaml

    Current live state with managed fields stripped; useful as a base

  • kubectl delete pod <name> -n <ns> --grace-period=0 --force

    Remove a Terminating pod immediately (use with caution)

  • kubectl cp <ns>/<pod>:/remote/path ./local-path

    Extract a file from a running container

all 73 kubectl commands