A key principle of cloud native platform engineering is to adopt proven software development methodologies. Frameworks are ubiquitous in software development because they:
But before containers and Kubernetes, frameworks for infrastructure rarely made sense. With operating systems both being part of the infrastructure layer, and being a weak abstraction, application dependencies frequently leaked into the infrastructure layer. This led to most infrastructure being built application specific.
Containers and Kubernetes provide a stronger abstraction between the two layers. Making it more easily viable to build common platforms where reusable framework components are of great value.
Kubestack is a Terraform framework for Kubernetes platform engineering teams to define the entire cloud native stack in one Terraform code base and continuously evolve the platform safely through GitOps. It brings the benefits of frameworks to teams building self-service Kubernetes based platforms for application developers.
As a framework, Kubestack integrates natively into the Terraform ecosystem. It maintains various modules as well as a provider to fully integrate platform infrastructure and services into a single Terraform code base.
The framework differentiates between three types of Terraform modules:
All modules implement Kubestack's inheritance model to make differences between environments explicit and avoid configuration drift.
By including cloud infrastructure and Kubernetes resources in Terraform's plan/apply lifecycle, the Kubestack framework enables you to build fully integrated automation for your complete platform.
Following the GitOps workflow, teams can peer-review proposed code changes alongside the Terraform plan and validate them by applying against real infrastructure before they get promoted to any environment running application workloads.
The core design principles of the Kubestack GitOps framework are:
Kubestack differentiates between committed, desired and current state.
Kubestack syncs committed and desired state. Reconciliation of desired and current state is the responsibility of the cloud provider or the Kubernetes control plane.
To understand the scope, consider what Kubestack does do and does not do:
Kubestack does:
Kubestack does not: