- Install all the pre-requisites using this script.
- Configure aws-cli.
- Create s3 bucket for the cluster:
export KOPS_STATE_STORE=dev-kops-cluster-s3
aws s3api create-bucket \
--bucket $KOPS_STATE_STORE \
--region us-east-1
aws s3api put-bucket-encryption --bucket $KOPS_STATE_STORE --server-side-encryption-configuration '{"Rules":[{"ApplyServerSideEncryptionByDefault":{"SSEAlgorithm":"AES256"}}]}'
- Add the following in
~/.zshrc/~/.bashrc:
export NAME=dev-kops.k8s.local
export KOPS_STATE_STORE=s3://dev-kops-cluster-s3
- Add cluster config files to s3 bucket:
kops create -f dev.cluster.yaml
kops create secret --name ${NAME} sshpublickey admin -i ~/.ssh/id_rsa.pub
kops create -f ig.yaml
kops update cluster $NAME --yes && kops rolling-update cluster $NAME --yes