# List all images (without registry) running in the cluster
kubectl get pods --all-namespaces --field-selector=status.phase=Running -o jsonpath="{..image}" | tr ' ' '\n' | sed 's/.*\///' | sort -u
# List images used per namespace
kubectl get pods --all-namespaces --field-selector=status.phase=Running -o=jsonpath='{range .items[*]}{"\n"}{.metadata.namespace}{":\t"}{range .spec.containers[*]}{.image}{", "}{end}{end}'
# Peek into a helm deployment config
kubectl get cm staging.v1 -o jsonpath='{.data.release}' | base64 -d | gunzip | vim -
# Or a TLS certificate
kubectl get secret certificate-by-issuer -o jsonpath='{.data.tls\.crt}' | base64 -d | openssl x509 -noout -text -in -
# List all RBAC "Groups" referenced in the cluster
kubectl get clusterrolebindings.rbac.authorization.k8s.io,rolebindings.rbac.authorization.k8s.io -A -o go-template='{{range $i :=.items}}{{range $i.subjects}}{{if eq .kind "Group"}}{{$i.metadata.namespace}}/{{$i.metadata.name}} emerges group: {{ .name }}{{"\n"}}{{end}}{{end}}{{end}}'
# Get all pods and their priorities
kubectl get po -A -o jsonpath='{range .items[*]}{@.metadata.namespace}/{@.metadata.name} {@.spec.priority}{"\n"}{end}'