Server-side dry-run

Validate manifest against live API without applying changes

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

tool
kubectl73 commands
tags
config

More kubectl commands

  • 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

  • kubectl cordon <node>

    Mark node as unschedulable — no new pods land here

  • kubectl drain <node> --ignore-daemonsets --delete-emptydir-data

    Gracefully evict all pods before maintenance

all 73 kubectl commands