github linkedin
Kubernetes on AWS: kops installer overview
May 22, 2017
2 minutes read

Intro

Kubernetes is a platform for container orchestraion. Amazon Web Services is most popular platform for virtual infrastructure. There are a multiple options to install Kubernetes on AWS.

In this post i’ll try to overview kops (aka Kubernetes Operations).

kops overview

kops authors describe it with

Kubernetes Operations (kops) - Production Grade K8s Installation, Upgrades, and Management

Install Kubernetes with kops

Get kops

sudo wget https://github.com/kubernetes/kops/releases/download/1.6.0/kops-linux-amd64 -O /usr/local/bin/kops
sudo chmod +x /usr/local/bin/kops

Prerequisites

Before proceed with Kubernetes installation make sure:

  • kubectl installed
  • aws cli configured
  • AWS Route53 hosted zone - aws route53 list-hosted-zones
  • AWS S3 bucket - aws s3 ls
  • terraform installed (Optional)

Let kops generate Terraform config

By default kops creates resources using AWS APIs directly. In this post i’m using Terraform. If you want to proceed with default deployment just remove --target=terraform.

Command below will inspect AWS for necessary resources (e.g. route53 hosted zone), generate necessary artifacts (see below) and produce terraform configuration file. Options details here.

Kubernetes configuration to be deployed:

kops create cluster \
  --name=kubernetes.r7v.de \
  --out=. \
  --target=terraform \
  --state=s3://rsokolkov \
  --zones=us-east-1a

Terraform configuration in kubernetes.tf.

Cluster configuration can be found in s3 bucket:

aws s3 ls s3://rsokolkov/kubernetes.r7v.de/

Look inside

Deploy Kubernetes with Terraform

terraform plan
terraform apply

Wait few minutes until DNS will propagate new entities.

Then check with

kubectl get nodes

Manipulate cluster

To see list of clusters

kops get clusters --state=s3://rsokolkov

To edit configuration consult this page or to scale cluster check other one.

Delete cluster

terraform destroy
kops delete cluster --name=kubernetes.r7v.de --state=s3://rsokolkov

Links


Back to posts