Skip to content

Instantly share code, notes, and snippets.

@tranphuoctien
Created March 16, 2021 03:17
Show Gist options
  • Save tranphuoctien/733ef76dcd6f766df8896baa9a370022 to your computer and use it in GitHub Desktop.
Save tranphuoctien/733ef76dcd6f766df8896baa9a370022 to your computer and use it in GitHub Desktop.
Kube config data decode base64
#!/bin/sh
#set -e
# Extract the base64 encoded config data and write this to the KUBECONFIG
echo "$KUBE_CONFIG_DATA" | base64 -di > /tmp/config
export KUBECONFIG=/tmp/config
bash -c "kubectl${KUBECTL_VERSION:+.${KUBECTL_VERSION}} $*"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment