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

Kubernetes at DigitalOcean

Kubernetes at DigitalOcean

This talk is an overview of the journey DigitalOcean has undertaken to adopt Kubernetes and build a platform for deploying our internal services on top.

Avatar for Joonas Bergius

Joonas Bergius

March 29, 2017
Tweet

More Decks by Joonas Bergius

Other Decks in Technology

Transcript

  1. digitalocean.com Evolving operations • Early 2013 What is operations, even?

    • Late 2013 Embedded operations, “devops” • Early 2014 Centralized operations • Early 2015 Operations as advisors • Mid 2015 You build it, you run it
  2. digitalocean.com Evolving architecture • Early 2013 2 monoliths • Mid

    2013 4 monoliths • Early/Mid 2014 Introduction of services • Late 2014/Early 2015 Service all the things!
  3. digitalocean.com Possible strategies • Maintain status quo • Hire dedicated

    operations • Invest in existing tooling • Use different tooling
  4. digitalocean.com Possible strategies • Maintain status quo • Hire dedicated

    operations • Invest in existing tooling • Use different tooling
  5. digitalocean.com • Active community & ecosystem • API-driven for automation

    • First-class container support • Production-grade Defining requirements
  6. digitalocean.com • Curate a simplified user experience • Focus on

    stateless services • Make deployments declarative Guiding principles
  7. • Describe application runtime requirements • Integrate external systems with

    application • Establish accountability through ownership digitalocean.com Driven with a manifest
  8. digitalocean.com { "application": "kubecon-2017", "scale": 3, "containers": { "kubecon": {

    "image": "registry.corp.example.com/demo/kubecon" "image_tag": "2017" } }, "maintainer": "[email protected]" } KubeCon application
  9. digitalocean.com { "application": "kubecon-2017", "scale": 3, "containers": { "kubecon": {

    "image": "registry.corp.example.com/demo/kubecon" "image_tag": "2017", "ports": [8080] } }, "maintainer": "[email protected]" } Exposing a Service
  10. digitalocean.com Translated to Kubernetes: Exposing a Service Deployment ReplicaSet Pod

    Pod Pod Service kubecon-2017:8080 Endpoint Created by docc
  11. digitalocean.com { "application": "kubecon-2017", "scale": 3, "ingresses": { "kubecon-2017": {

    "scheme": "http", "container_port": 8080 } }, "containers": { "kubecon": { "image": "registry.corp.example.com/demo/kubecon" "image_tag": "2017", "ports": [8080] } }, "maintainer": "[email protected]" }
  12. digitalocean.com Translated to Kubernetes: Ingress connectivity Deployment ReplicaSet Pod Pod

    Pod Service kubecon-2017:8080 Endpoint Ingress kubecon-2017 Created by docc
  13. digitalocean.com { "application": "kubecon-2017", "scale": 3, "auto_tls": true, "ingresses": {

    "kubecon-2017": { "scheme": "tls", "container_port": 8080 } }, "containers": { "kubecon": { "image": "registry.corp.example.com/demo/kubecon" "image_tag": "2017", "ports": [8080] } }, "maintainer": "[email protected]" }
  14. digitalocean.com Translated to Kubernetes: Adding TLS Deployment ReplicaSet Pod Pod

    Pod Service kubecon-2017:8080 Endpoint Ingress kubecon-2017 Certificate Secret /etc/docc/tls/... Created by docc
  15. • 12-Factor-ish & containerized • Horizontally scalable • Stateless In

    practice: 90-95% of our services fit this bill. digitalocean.com Application requirements
  16. • Allows for separation of responsibilities • Promotes decoupling from

    implementation • Provides a magical end-user experience digitalocean.com Why do this?
  17. digitalocean.com $ docc --help docc is the CLI tool for

    the docc server Available Commands: completion Generate shell completions config Config modifies and manages the docc config delete Delete and purges the given app(s) deploy Deploy or update a app by filename events Events shows the most recent events init Init creates a ready to use manifest.json file in the current directory inspect Inspect returns detailed information about the given app(s) list Lists the current deployed apps logs Logs shows the most recent logs open Open the specific subcommand show Show the manifest of given app update Update the state of an application validate Validates and shows errors/warnings
  18. • Translates between docc and kubernetes concepts • Tracks applications

    with annotations and groups by labels • Coordinates with external services digitalocean.com doccserver
  19. • Every new application is deployed with docc • Deployment

    no longer the bottleneck: ◦ New apps deployed in hours, not days ◦ Existing apps deployed in minutes, not hours ◦ Averaging 25 deploys a day • Seeing as many as 75 apps per cluster ◦ Migrating apps has become trivial • Most importantly: developers are much happier! digitalocean.com Results so far
  20. digitalocean.com – Tommy Murphy “Reduce developer decision fatigue so they

    can make decisions that matter [to the business].”