Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Production Grade Kubernetes Clusters on AWS with Kops

Production Grade Kubernetes Clusters on AWS with Kops

In this talk, we'll live-demo bringing up a new production grade Kubernetes cluster in AWS. To do this, we'll use a tool called kops. We'll cover how kops works and why I recommend using it (at least until EKS is generally available). We'll also talk about what makes a cluster production grade and how to integrate a new Kubernetes cluster with your existing infrastructure. This will be a DevOps focused talk and we'll dig into AWS networking, Terraform, and how to manage your core Kubernetes manifests.

Demo commands: https://github.com/lkysow/barcelona-k8s-meetup-kops-on-aws

This talk was given at the Barcelona Kubernetes Meetup on May 16th, 2018.

Luke Kysow

May 16, 2018
Tweet

More Decks by Luke Kysow

Other Decks in Programming

Transcript

  1. Agenda • Basic Kops demo (5m) • Make it production

    grade (10m) • How does it work? (10m)
  2. Takeaways: 1. Go multi-az and use a private topology when

    creating the cluster 2. Edit cluster yaml and use latest versions of kube and etcd
  3. Takeaways: 1. Go multi-az and use a private topology when

    creating the cluster 2. Edit cluster yaml and use latest versions of kube and etcd 3. Manage cluster.yaml in version control and use kops replace
  4. Takeaways: 1. Go multi-az and use a private topology when

    creating the cluster 2. Edit cluster yaml and use latest versions of kube and etcd 3. Manage cluster.yaml in version control and use kops replace 4. Use Terraform output
  5. Takeaways: 1. Go multi-az and use a private topology when

    creating the cluster 2. Edit cluster yaml and use latest versions of kube and etcd 3. Manage cluster.yaml in version control and use kops replace 4. Use Terraform output 5. Create VPC separately using your own Terraform
  6. master-a #!/usr/bin/env bash download nodeup run nodeup apt-get install docker-engine

    install kubelet install protokube # nodeup reads the kops s3 bucket and download the files aws s3 cp s3://... /srv/kubernetes/certs # creates core manifests as static pods /etc/kubernetes/manifests/ {etcd.manifest, kube-apiserver.manifest, …} Step 1: nodeup
  7. master-a docker run protokube Looking up EBS volumes by tag....

    Mounting EBS volumes… Creating DNS record etcd-events-c.internal.kube.lkysow.k8s.local Starting kubelet Applying addon manifests from S3 bucket (including dns-controller) # kubelet sees the manifests in /etc/kubernetes/manifests and starts all the Static Pods Step 2: protokube