Skip to content

Instantly share code, notes, and snippets.

@Elektordi
Created October 27, 2023 14:59
Show Gist options
  • Save Elektordi/136aa94292efcc30207cb9ac12512073 to your computer and use it in GitHub Desktop.
Save Elektordi/136aa94292efcc30207cb9ac12512073 to your computer and use it in GitHub Desktop.
Import kube secret into env
source <(kubectl get -n xxxnamespacexxx secret xxxnamexxx -o json | jq -r '.data | to_entries[] | ["export " + .key + "=\"" + (.value | @base64d) + "\""] | join("\n")' | xargs -d '\n')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment