Last active
March 18, 2018 01:51
-
-
Save SathyaBhat/ef97c4be1cf2917157177f124f27afca to your computer and use it in GitHub Desktop.
Bring up kops cluster
This file contains hidden or 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/bash | |
aws iam create-group --group-name kops | |
aws iam attach-group-policy --policy-arn arn:aws:iam::aws:policy/AmazonEC2FullAccess --group-name kops | |
aws iam attach-group-policy --policy-arn arn:aws:iam::aws:policy/AmazonS3FullAccess --group-name kops | |
aws iam attach-group-policy --policy-arn arn:aws:iam::aws:policy/AmazonRoute53FullAccess --group-name kops | |
aws iam attach-group-policy --policy-arn arn:aws:iam::aws:policy/IAMFullAccess --group-name kops | |
aws iam attach-group-policy --policy-arn arn:aws:iam::aws:policy/AmazonVPCFullAccess --group-name kops | |
aws iam create-user --user-name kops | |
aws iam add-user-to-group --user-name kops --group-name kops | |
aws iam create-access-key --user-name kops > kops-iam.json | |
export AWS_SECRET_ACCESS_KEY=`jq '.[] | .SecretAccessKey' kops-iam.json` | |
export AWS_ACCESS_KEY_ID=`jq '.[] | .AccessKeyId' kops-iam.json` | |
aws s3api create-bucket --bucket awscommunityday-k8s-store --region us-east-1 | |
export NAME=awscommunityday.k8s.local | |
export KOPS_STATE_STORE=s3://awscommunityday-k8s-store | |
export NODE_SIZE=${NODE_SIZE:-m4.large} | |
export MASTER_SIZE=${MASTER_SIZE:-m4.large} | |
export ZONES=${ZONES:-"us-east-1a"} | |
kops create cluster \ | |
--zones us-east-1a \ | |
--node-size $NODE_SIZE \ | |
--node-count=3 \ | |
${NAME} | |
kops update cluster ${NAME} --yes | |
sleep 10m | |
kubectl create -f https://git.io/kube-dashboard | |
kubectl proxy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment