Filter documents in a manifest stream.
Section: Select and inspect documents
Select Kubernetes documents by kind
bash
bash
yq 'select(.kind == "Deployment")' stack.yamlExplanation
A fast way to inspect or extract just one type of resource from a large manifest.
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 Select and inspect documents
Render Helm templates to YAML
Generate YAML output for inspection before deployment.
Apply a multi-document manifest
Send several Kubernetes resources in one file.
Split YAML documents into separate files
Write each YAML document to its own output file.
Two YAML documents in one file
Use `---` to separate resources or configs.
Explicit document end marker
Use `...` to mark the end of a document when needed.