Create kubernetes cluster using kops

Create cluster:

1. Create a cluster:

  • In public subnet
  • With one master node and two worker nodes across two availability zones
  • It creates a new VPC and all the required AWS resources
  • Select kops create command for appropriate region:
kops create cluster \
  --name=kops-cluster.k8s.local \
  --master-count=1 \
  --master-size=t2.small \
  --node-count=2 \
  --node-size=t2.small \
  --network-cidr=10.0.0.0/16 \
  --zones=us-west-2a,us-west-2b,us-west-2c \
  --ssh-public-key=~/.ssh/id_rsa.pub \
  --networking=kubenet

2. Verify cluster creation:

kops get cluster

3. Once cluster is created, deploy/update cluster:

kops update cluster kops-cluster.k8s.local --yes

Launching cluster and all the dependencies will take approximately 10 minutes