Skip to content

Instantly share code, notes, and snippets.

@zulhfreelancer
Created August 19, 2024 04:00
Show Gist options
  • Save zulhfreelancer/1facd1b5e3dbdc3882478aa546fa858d to your computer and use it in GitHub Desktop.
Save zulhfreelancer/1facd1b5e3dbdc3882478aa546fa858d to your computer and use it in GitHub Desktop.
Find pods that use specific image pull secret
# Replace the THE_SECRET_NAME
k get pods -A -o json | jq -r '.items[] | select(.spec.imagePullSecrets!=null) | select(.spec.imagePullSecrets[].name=="THE_SECRET_NAME") | {namespace: .metadata.namespace, name: .metadata.name}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment