Skip to content

Instantly share code, notes, and snippets.

@tomgrek
Created February 25, 2018 22:53
Show Gist options
  • Save tomgrek/5e5f8dcd9cfee97c95d1a8bbc2002137 to your computer and use it in GitHub Desktop.
Save tomgrek/5e5f8dcd9cfee97c95d1a8bbc2002137 to your computer and use it in GitHub Desktop.
Snippet to create a private cluster on AWS with Kops
  • Create a t2 micro instance for administering the cluster
  • Give it an appropriate IAM role
  • Create an S3 bucket to persist cluster state

Then:

export NAME=mycluster.k8s.local
export KOPS_STATE_STORE=s3://k8s-state-store-mycluster
kops create cluster --topology=private --networking=flannel --zones us-west-2c mycluster.k8s.local --vpc=vpc-012345ab --ssh-access [my IP address] --network-cidr=[my VPC CIDR block] --associate-public-ip=false --master-size m4.large --node-size m4.large
kops edit ig --name=mycluster.k8s.local nodes (set how many machines)
kops update cluster mycluster.k8s.local --yes
kops validate cluster
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment