Kubernetes YAML Cheat Sheet/Show last-applied configuration

Inspect the apply annotation on a live resource.

Section: YAML Validation and Troubleshooting

Show last-applied configuration

bash
bash
kubectl apply view-last-applied deployment/api

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 YAML Validation and Troubleshooting
Server-side dry run
Validate a manifest against the API server without persisting it.
OpenIn sheetbashsame section
Explain a field path
Discover valid YAML fields from kubectl.
OpenIn sheetbashsame section
Apply YAML file
Create or update resources from a YAML file.
OpenIn sheetbash1 tag match
Apply YAML directory
Apply all manifests in a directory.
OpenIn sheetbash1 tag match
Apply deployment manifest
Create or update the Deployment.
OpenIn sheetbash1 tag match
Minimal Pod manifest
Smallest practical Pod YAML shape.