Section: Go Templates, Custom Columns, and jq-Friendly Patterns

Search YAML output

bash
bash
kubectl get deployment web -n payments -o yaml | yq '.spec.template.spec.containers[].image'
Explanation

Extract YAML fields with yq.

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 Go Templates, Custom Columns, and jq-Friendly Patterns
Node capacity custom columns
Show capacity data in a concise table.
OpenIn sheetbashsame section
Go template pod phase
Render output using Go templates.
OpenIn sheetbashsame section
Pretty JSON with jq
Pipe kubectl JSON into jq for flexible filtering.
OpenIn sheetbashsame section
Generate configmap YAML dry-run
Generate YAML that can be committed into Kustomize overlays.
OpenIn sheetbash1 tag match
List pod names
Print all pod names in a namespace.
Render kustomization
Build a kustomization without applying it.