Create or update resources from a YAML file.
Section: Manifest Basics
Apply YAML file
bash
bash
kubectl apply -f app.yamlExplanation
`kubectl apply` accepts YAML or JSON and creates the resource if it does not exist yet. `kubectl diff -f ...` is useful before applying changes.
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