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

[2018.09 Meetup] [TALK #2] Jannis Rake-Revelant...

DevOps Lisbon
September 17, 2018

[2018.09 Meetup] [TALK #2] Jannis Rake-Revelant - Kubernetes at Zalando

Kubernetes was introduced at Zalando for a multitude of reasons, like infrastructure efficiency and reliability of services. This was also an opportunity for a change in our build and deployment processes.
It is our purpose that developers should focus on the needs of business applications they’re developing. However, things like compliance, security and not so easy to use tooling can get in the way. With this in mind, we made a radical change in how we build and ship software to AWS, specifically to Kubernetes.

Jannis is an Engineering Lead at Zalando for the team that is responsible for providing an elastic, reliable and automated Platform-as-a-Service infrastructure for developers to build and run applications on. He has been working with Kubernetes since before its GA. Jannis is always eager to talk distributed systems and any challenges related to them.

DevOps Lisbon

September 17, 2018
Tweet

More Decks by DevOps Lisbon

Other Decks in Technology

Transcript

  1. 2 ZALANDO AT A GLANCE ~ 4.5 billion EUR revenue

    2017 > 200 million visits per month > 15.000 employees in Europe > 70% of visits via mobile devices > 23 million active customers > 300.000 product choices ~ 2.000 brands 15 countries
  2. 6 INFRASTRUCTURE @ ZALANDO STUPS (toolset around AWS) Kubernetes AWS

    accounts per team. All instances must run the same AMI. PowerUser access to Production. Clusters per product (multiple teams). Instances are not managed by teams. Hands off approach. You build it, you run EVERYTHING. A lot of stuff out of the box.
  3. 7 CURRENT STATUS • Kubernetes announced as "GA" • ADOPT

    on Zalando Tech Radar • Critical services on Kubernetes • Next: Kubernetes as default, sunset date for STUPS
  4. 11 “PHILOSOPHY” No pet clusters We don’t want to tweak

    custom settings for 90+ clusters. Always provide the latest stable Kubernetes version Oldest clusters were upgraded from v1.4 through v1.11. Continuous and non-disruptive cluster updates No maintenance windows. “Fully” automated operations Operators should only need to manually merge PRs.
  5. 12 CLUSTER SETUP • Provisioned in AWS via Cloudformation. •

    Etcd stack outside Kubernetes. • Distribution: Container Linux. • Multi AZ worker nodes. • Highly available control plane setup behind ELB. • Cluster configuration stored in git. • e2e tests run via Jenkins. • Changes rolled out via ‘Cluster Lifecycle Manager’.
  6. 15 CLUSTER CHANNELS?? github.com/zalando-incubator/kubernetes-on-aws Channel Description Clusters dev Development and

    playground clusters. 3 alpha Main infrastructure cluster (important to us). 1 beta Product clusters for the rest of the organization (prod/test). 90+
  7. 17 E2E TESTS Conformance Tests Upstream Kubernetes e2e conformance tests

    ✓ 144 Zalando Tests (custom) Custom tests for ingress, external-dns, PSP etc. 4 StatefulSet Tests Rolling update of stateful sets including volume mounting ✓ 2 ✓
  8. 18

  9. 19 E2E TESTS FOR OUR INFRASTRUCTURE Control plane node node

    Control plane node node branch: alpha (base) branch: dev (head) Create Cluster Update Cluster Run e2e tests Delete Cluster Testing dev to alpha upgrade Control plane Control plane
  10. 20 ARCHITECTURE DECISIONS • One prod. cluster per AWS account

    / “product” • API server behind SSL ELB, OAuth webhook • Read only access to production • CI/CD for write access • etcd running separately on EC2 • Multi AZ clusters
  11. 21 - TECHNICAL - Backup your etcd (and monitor your

    backups) - Be careful using t instances in production - Disabling CPU throttling (CFS quota) to avoid latency issues - NON-TECHNICAL - Avoid friction for the users - Try to create a system "compliant by design” - Create a community inside the company LESSONS LEARNED
  12. 24 POSTGRES OPERATOR github.com/zalando-incubator/postgres-operator Node pg role=master Node pg role=replica

    Node pg role=replica Node postgres operator Evict ✘ evict pg role=replica promote role=master role=replica drain ✓
  13. 27 OPEN SOURCE Kubernetes on AWS github.com/zalando-incubator/kubernetes-on-aws AWS ALB Ingress

    controller github.com/zalando-incubator/kube-ingress-aws-controller Skipper HTTP Router & Ingress controller github.com/zalando/skipper External DNS github.com/kubernetes-incubator/external-dns Postgres Operator github.com/zalando-incubator/postgres-operator Kubernetes Resource Report github.com/hjacobs/kube-resource-report Kubernetes Downscaler github.com/hjacobs/kube-downscaler