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

Developer Platform-Part I: Infrastructure Provi...

Developer Platform-Part I: Infrastructure Provisioning

In this series of presentations, we aim to describe the main challenges that platform organizations face in trying to enable their dev. teams to build applications on Kubernetes, esp. in public cloud environments. We then explore the most relevant CNCF projects that can help address those challenges.

In Part I (this deck), we explore the problem of infrastructure/resource provisioning. Today, an application packaged for and deployed in a Kubernetes cluster specifies some of its dependencies in KRM format. Examples of these are resources needed by containerized workloads (cpu, memory, storage), basic networking and load balancing, TLS configuration, etc. However, many other dependencies such as databases, message queues, topics, caches, etc. are left to the application teams to determine. We look into several alternatives and evaluate their pros and cons and describe what it takes to create an all-encompassing platform that standardizes around Kubernetes APIs. The main goal with that is to make it possible for application developers to specify all dependencies using Kubernetes APIs and for platform teams and application Ops teams to fulfill those dependencies by leveraging Kubernetes APIs and control loops.

(The series is organized to be digestible in smaller chunks by focusing on a single problem in each section. )

Avatar for Hossein Kassaei

Hossein Kassaei

October 17, 2022
Tweet

More Decks by Hossein Kassaei

Other Decks in Technology

Transcript

  1. Kubernetes - Pod Pod App I need cpu and memory!

    (PowerPoint’s stock image for memory)!
  2. Kubernetes - Service App I need a stable endpoint to

    let clients discover me + network load balancer Service
  3. So far so good! Ok, I like this whole dependency

    abstraction and resource brokering that Kubernetes gives me! Let’s build on Kubernetes in the cloud …
  4. I need an object store App I need somewhere to

    store objects! bucket Bucket? Sorry, not sure what you mean! But maybe come back later!? Container Object Storage Interface (COSI)
  5. I need a cache App I need a key-value Database

    (Redis) Sorry, no clue what you mean!
  6. I need a secret store App I need to store

    my secrets in a secret store (not in k8s secrets/etcd) Sorry, no clue what you mean! h/t External Secrets Operator
  7. And many other things … App You get the idea

    … (I have many needs!) IAM roles/policies certificates message queues topics …
  8. Dev. Persona: how do I specify all these other dependencies?

    SRE Persona: how do I provision and monitor all these other dependencies? “Terraform has been around since 2014 and widely used by anyone wanting to do IaC. Should we continue using that also for applications deployed in Kubernetes?” 🤔
  9. Terraform App I need a Relational Database (Postgres) Azure Database

    for PostgreSQL Google CloudSQL for PostgreSQL AWS RDS for PostgreSQL
  10. Summary • Some application dependencies are specified in k8s yaml

    manifest files • Many other dependencies are specified using terraform modules and HCL • The most comprehensive repository of reusable modules! • Declarative vs. Imperative? • Drift detection? • Continuous reconciliation? • Cloud-specific provisioning logic exposed to application dev. could be bad or ok depending on: - how many cloud environments we need to support - if this is done by a dedicated platform team or by all app teams
  11. Use Kubernetes for all dependencies App I need a Relational

    Database (Postgres) AWS Controllers for Kubernetes (ACK) AWS RDS for PostgreSQL Full example
  12. Use Kubernetes for all dependencies App I need a Relational

    Database (Postgres) Google Config Connector Google CloudSQL for PostgreSQL More info
  13. Use Kubernetes for all dependencies App I need a Relational

    Database (Postgres) Azure Service Operator (v2) Azure Database for PostgreSQL more info
  14. Use Kubernetes for all dependencies App I need a Relational

    Database (Postgres) Cloud provider proprietary APIs AWS RDS for PostgreSQL Google CloudSQL for PostgreSQL Azure Database for PostgreSQL
  15. Summary • All application dependencies are specified in k8s yaml

    manifest files • All declarative (it’s Kubernetes!) • Drift detection (it’s Kubernetes!) • Continuous reconciliation (it’s Kubernetes!) • Cloud-specific provisioning logic exposed to application dev. Could be bad or ok depending on: - how many cloud environments we need to support - if this is done by a dedicated platform team or by all app teams
  16. Enter Crossplane Key concepts • Managed Resource (MR) • Composite

    Resource (XR) • Composition • Composite Resource Claim (claim)
  17. Abstraction App Platform engineer needs to tell Crossplane how to

    translate this abstract definition to a cloud-specific resource definition composition … Google CloudSQL for PostgreSQL MR provided by Crossplane gcp-provider XR defined by the platform team
  18. Abstraction App AWS RDS for PostgreSQL Google CloudSQL for PostgreSQL

    Azure Database for PostgreSQL translate to cloud specific service Makes it possible to create our own declarative APIs! (without writing k8s controllers)
  19. Composition Network Makes it possible to hide a lot of

    unnecessary details from the application teams! composition Subnetwork Cluster NodePool
  20. Summary • All application dependencies are specified in k8s yaml

    manifest files • All declarative (it’s Kubernetes!) • Drift detection (it’s Kubernetes!) • Continuous reconciliation (it’s Kubernetes) • Uniform provisioning logic exposed to application dev • Platform team needs to do the heavy lifting (but still much work if using Crossplane)
  21. For further exploration • Harmonize on-prem and public cloud deployments

    when it comes to consuming services by the application App Google CloudSQL for PostgreSQL On-prem PostgreSQL Instance We also need to harmonize how database connection details are exposed to the App e.g., managed by Zalando Postgres operator
  22. References • Terraform: https://registry.terraform.io/ • AWS Controllers for Kubernetes: https://aws-controllers-k8s.github.io/community/docs/community/overview/

    • Azure Service Operator v2: https://azure.github.io/azure-service-operator/reference/ • Google Config Connector resources: https://cloud.google.com/config-connector/docs/reference/overview • Crossplane: • https://crossplane.io/ • https://crossplane.io/docs/ • Upbound: • https://www.upbound.io/ • https://marketplace.upbound.io/