-
-
Save lesce/d2c83bfa3844c4e1ea4553cb71a60402 to your computer and use it in GitHub Desktop.
kops
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
brew update | |
brew install kops | |
brew install awscli | |
brew install kubernetes-cli | |
#signup for aws | |
#get API key and secret from https://console.aws.amazon.com/iam/home?region=eu-central-1#/security_credential | |
aws configure | |
#create IAM user/group | |
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/AmazonRoute53FullAccess --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/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 | |
# Because "aws configure" doesn't export these vars for kops to use, we export them now | |
export AWS_ACCESS_KEY_ID=$(aws configure get aws_access_key_id) | |
export AWS_SECRET_ACCESS_KEY=$(aws configure get aws_secret_access_key) | |
aws s3api create-bucket \ | |
--bucket andrei-lescenco-k8-bucket \ | |
--region eu-central-1 | |
aws ec2 describe-availability-zones --region eu-central-1 | |
kops create cluster \ | |
--zones eu-central-1a \ | |
${NAME} | |
kops create cluster \ | |
--zones eu-central-1a \ | |
--node-size=t2.micro --master-size=t2.micro ${NAME} | |
kops validate cluster | |
kops edit cluster ${NAME} | |
kops update cluster ${NAME} --yes | |
kops delete cluster --name ${NAME} --yes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment