Kubernetes YAML Cheat Sheet/Preview manifest changes

See what apply would change.

Section: Manifest Basics

Preview manifest changes

bash
bash
kubectl diff -f app.yaml
Explanation

Use this before apply in CI or during review-heavy workflows.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Manifest Basics
Apply YAML file
Create or update resources from a YAML file.
OpenIn sheetbashsame section
Apply YAML directory
Apply all manifests in a directory.
OpenIn sheetbashsame section
Minimal Pod manifest
Smallest practical Pod YAML shape.
OpenIn sheetyamlsame section
Multiple resources in one YAML file
Separate resources with `---`.
OpenIn sheetyamlsame section
Get resources by label selector
Use labels to query related objects.
OpenIn sheetbash1 tag match
Explain a field path
Discover valid YAML fields from kubectl.
OpenIn sheetbash1 tag match