kubectl diff -f deploy.yaml

Category: Kubernetes & Containers

kubectl diff -f deploy.yaml

Show differences before applying

Compares the manifests in deploy.yaml against what is live on the cluster and prints the diff, like git diff for Kubernetes. Nothing is changed, making it a safe dry run. Apply when satisfied with kubectl apply -f deploy.yaml.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.