Page MenuHomePhabricator
Authored By
JMeybohm
Nov 5 2021, 8:58 AM
Size
1015 B
Referenced Files
None
Subscribers
None
# 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 "Group" available 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}}'

File Metadata

Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
9230253
Default Alt Text
kubectl (1015 B)

Event Timeline