You can drill down interactively by using yq filtering queries.
yiq uses yq internally, and it requires you to have yq in your PATH.
T.B.D.
Either prebuilt binary for your system (and make sure to chmod +x it first) or install/compile with Go:
go get github.com/zoetrope/yiq/cmd/yiq
If you don't have yq installed, follow instructions at https://github.com/mikefarah/yq/releases and make sure to put it in your PATH.
cat > sample.yaml <<EOF
apiVersion: apps/v1
kind: Deployment
metadata:
name: sample
labels:
app: ubuntu
spec:
replicas: 2
selector:
matchLabels:
app: ubuntu
template:
metadata:
labels:
app: ubuntu
spec:
containers:
- name: ubuntu
image: ubuntu:18.04
EOF
cat sample.yaml | yiq