Skip to content

Instantly share code, notes, and snippets.

@bfrancom
Last active April 27, 2023 14:08
Show Gist options
  • Save bfrancom/123392464386fcc1005c44da328d8c1c to your computer and use it in GitHub Desktop.
Save bfrancom/123392464386fcc1005c44da328d8c1c to your computer and use it in GitHub Desktop.
Get all environment variables with URI's in Kubernetes to find 3rd party services used
#should get all uri's (including url's) for things like s3, postgres, ftp, etc.
kubectl get pods --all-namespaces -o=jsonpath='{range .items[*]}{.spec.containers[*].env[*].value}{"\n"}{end}' |grep -io "[[:alnum:]]*://[^ ]*" |sort |uniq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment