Create or update Kubernetes resources from YAML.

Section: Kubernetes YAML patterns

Apply a manifest

bash
bash
kubectl apply -f deployment.yaml
Explanation

One of the most frequently used YAML-related commands in real 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 Kubernetes YAML patterns
Preview resource changes
Show what would change before applying a manifest.
OpenIn sheetbashsame section
Minimal Kubernetes Deployment
Define a basic Deployment resource in YAML.
OpenIn sheetyamlsame section
Minimal GitHub Actions workflow
Define an automation workflow in YAML.
OpenIn sheetyamlsame section
Inspect Kubernetes manifest fields
Read documentation for manifest fields from the terminal.
OpenIn sheetbash2 tag match
Lint a Helm chart
Validate templated YAML before rendering or deploy.
OpenIn sheetbash1 tag match
Render a composed YAML config
Validate and resolve a Compose file.
OpenIn sheetbash1 tag match