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

ChaDev: Deploying Self Healing Services with Kubernetes

ChaDev: Deploying Self Healing Services with Kubernetes

Downtime can be both expensive and frustrating. In this talk Rob will explain how Kubernetes automatically redistributes systems, including some real world examples. Diving deeper, he'll cover some of the best practices for deploying self healing services with Kubernetes, including readiness probes, liveness probes, and affinity configuration.

Related to this Presentation:

YouTube (https://www.youtube.com/watch?v=bsrXifq3Pjc)

GitHub (https://github.com/robscott/chadev-2017-05-04)

Further Reading:

The Children's Illustrated Guide to Kubernetes (https://deis.com/blog/2016/kubernetes-illustrated-guide/)

Quickstart for Google Container Engine (https://cloud.google.com/container-engine/docs/quickstart)

Setting up an HA Kubernetes Cluster in AWS with private topology with Kops 1.5.1 (https://www.nivenly.com/kops-1-5-1/)

KubeCon Videos (https://www.youtube.com/playlist?list=PLj6h78yzYM2PAavlbv0iZkod4IVh_iGqV)

Rob Scott

May 04, 2017
Tweet

More Decks by Rob Scott

Other Decks in Programming

Transcript

  1. The core services powering Spire Website API Scheduler HTTP Services

    Background Services Background Processing Notifications Management Portal
  2. Node 1 Notifications Background Processing API Management Portal What it

    all looks like in Kubernetes API Website STAGING DEMO QA QA Scheduler Website QA STAGING STAGING Node 2 Notifications Background Processing API Management Portal API Website DEMO QA QA Website STAGING Node 3 Notifications Background Processing Management Portal API STAGING DEMO DEMO Scheduler Website DEMO DEMO Notifications Notifications DEMO DEMO Background ProcessingQA Node 4 Notifications API Management Portal Website QA QA Scheduler Background Processing DEMO Background ProcessingQA Management Portal STAGING DEMO STAGING STAGING QA Management Portal STAGING STAGING STAGING DEMO QA
  3. Node 1 Notifications Background Processing API Management Portal What if

    a Node dies? API Website STAGING DEMO QA QA Scheduler Website QA STAGING STAGING Node 2 Notifications Background Processing API Management Portal API Website DEMO QA QA Website STAGING Node 3 Notifications Background Processing Management Portal API STAGING DEMO DEMO Scheduler Website DEMO DEMO Notifications Notifications DEMO DEMO Background ProcessingQA Node 4 Notifications API Management Portal Website QA QA Scheduler Background Processing DEMO Background ProcessingQA Management Portal STAGING DEMO STAGING STAGING QA Management Portal STAGING STAGING STAGING DEMO QA
  4. Node 1 Notifications Background Processing API Management Portal After redistribution

    API Website STAGING DEMO QA QA Scheduler Website QA STAGING STAGING Node 2 Notifications Background Processing API Management Portal API Website DEMO QA QA Website STAGING Node 3 Notifications Background Processing Management Portal API STAGING DEMO DEMO Scheduler Website DEMO DEMO Notifications Notifications DEMO DEMO Background ProcessingQA Notifications API Management Portal Website QA QA Scheduler Background Processing DEMO Background ProcessingQA Management Portal STAGING DEMO STAGING STAGING QA Management Portal STAGING STAGING STAGING DEMO QA
  5. Deployment Used to ensure multiple replicas of a pod are

    maintained. Enables rolling updates and self healing functionality.
  6. Service Provides an endpoint to communicate with pods. This can

    be internal with a cluster IP or external with a load balancer.
  7. Namespace A logical way to separate environments in your cluster.

    Examples might include staging and QA namespaces.
  8. affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: failure-domain.beta.kubernetes.io/zone operator:

    In values: - us-east-1c - us-east-1d preferredDuringSchedulingIgnoredDuringExecution: - weight: 1 preference: matchExpressions: - key: beta.kubernetes.io/instance-type operator: In values: - m4.large
  9. Where to go from here • The Children's Illustrated Guide

    to Kubernetes • Quickstart for Google Container Engine • Setting up an HA Kubernetes Cluster in AWS with private topology with Kops 1.5.1 • KubeCon Videos