Created
June 21, 2021 03:19
-
-
Save akshedu/95605246a4f7840f93381668656436a5 to your computer and use it in GitHub Desktop.
kops dryrun
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
#!/bin/sh | |
echo "Check if cluster config exists on S3" | |
if ! kops get cluster; then | |
echo "Create SSH Key" | |
ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa | |
echo "Create cluster config on S3" | |
kops create cluster --cloud aws --zones $AWS_ZONES | |
fi | |
echo "Create cluster.yaml and ig.yaml from templates" | |
kops toolbox template --values $AWS_REGION/base_values.yaml --values $AWS_REGION/$ENV_SUFFIX/values.yaml --template cluster.tpl --format-yaml=true --output cluster.yaml | |
kops toolbox template --values $AWS_REGION/base_values.yaml --values $AWS_REGION/$ENV_SUFFIX/values.yaml --template ig.tpl --format-yaml=true --output ig.yaml | |
echo "Replace cluster config on S3" | |
kops replace --force -f cluster.yaml | |
kops replace --force -f ig.yaml | |
echo "Dry run update" | |
kops update cluster |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment