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

From pets to cattle, the way of Kubernetes

From pets to cattle, the way of Kubernetes

Containers are the past, orchestration of containers is the future. In this talk you are going to learn the basic definitions that you will find in a Kubernetes cluster and how to deploy your applications there.

You are going to move your app from running it in a simple container to do a rolling-update in several machines and with 0 downtime.

Don't be scared, there will be loads of examples that will help to understand the abstractions that people from Kubernetes came up with.

Alexandre González

November 18, 2016
Tweet

More Decks by Alexandre González

Other Decks in Technology

Transcript

  1. 1. Why the title? 2. Containers 3. Kubernetes concepts 4.

    Kubernetes architecture 5. Questions
  2. chroot Jails 1982 2000 2001 2006 2008 2009 2013 2014

    Linux VServer Generic Process Containers cgroups LXC Kernel namespaces Mesos Docker Kubernetes Rocket
  3. “Former” architecture Infrastructure Host Operating System Hypervisor Guest OS Guest

    OS Guest OS Bin/Libs Bin/Libs Bin/Libs App #1 App #2 App #3
  4. Docker architecture Infrastructure Host Operating System Hypervisor Guest OS Guest

    OS Guest OS Bin/Libs Bin/Libs Bin/Libs App #1 App #2 App #3 Docker engine
  5. Dockerfile FROM ubuntu:16.04 MAINTAINER Docker RUN apt-key adv --keyserver ...

    RUN echo "deb http://repo.mongodb.org/... RUN apt-get update && apt-get install -y mongodb-org RUN mkdir -p /data/db EXPOSE 27017 ENTRYPOINT ["/usr/bin/mongod"]
  6. –k8s documentation “Kubernetes is an open-source system for automating deployment,

    scaling, and management of containerized applications.”
  7. Orchestration • Schedule containers in physicals machines • Control lifecycle

    of those containers • Private network & load balancing • Horizontal scaling • Rollouts & rollbacks • Extras: service discovery, storage, secrets…
  8. Kubernetes master Node #1 Node #1 Kubernetes master Node #1

    Container engine Container #1 Container #2 … Kube proxy Kubelet etcd
  9. YAMLs apiVersion: extensions/v1beta1 kind: Deployment metadata: name: ghost labels: k8s-app:

    "ghost" spec: replicas: 1 template: metadata: labels: k8s-app: "ghost" spec: containers: - name: “nginx” ...