-
-
Save btipling/8c87c0d43398c9a55557fde479c0c85b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
SPATH="$(cd $(dirname "$0") && pwd -P)" | |
SECRET_NAME=${1:-docker-registry-secret} | |
CONFIG_PATH=${2:-$SPATH/localkube.json} | |
if [[ ! -f $CONFIG_PATH ]]; then | |
echo "Unable to locate service account config JSON: $CONFIG_PATH"; | |
exit 1; | |
fi | |
kubectl create secret docker-registry $SECRET_NAME \ | |
--docker-server "https://gcr.io" \ | |
--docker-username _json_key \ | |
--docker-email not@val.id \ | |
--docker-password="`cat $CONFIG_PATH`" ${@:3} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment