Kubernetes

kubectl diff

SafeDiff before apply

kubectl diff -f <manifest>

Shows what apply *would* change — mandatory pre-flight that also exposes out-of-band edits.

Examples

  • kubectl diff -f deploy.yamlPreview the change

Syntax

kubectl diff -f <file|dir> / -k <dir>

Before you run it

Diff only.

Related commands

The same reference, with no signal at all

Every command and flow from this site, held on your device and searchable with no connection. Free to install, no ads.

Get it free on the App Store