Kubernetes Resource Composition Could Replace Repeated Platform Glue

Oct 29, 2026 436 views

Abstract 3D digital rendering of fragmented geometric planes in a loop above a red grid, representing Kubernetes resource graphs.

Kubernetes platform teams keep writing controllers whose main job is to connect existing resources: create a Deployment, expose it with a Service, then copy the Service’s hostname into a ConfigMap. The business logic is minimal. The recurring work lies in ordering those objects, passing values between them, and keeping the result aligned with cluster state.

Kubebuilder makes a first controller approachable, and building the first controller may be straightforward. Repeating the pattern across a platform is different: each controller brings its own reconciliation bugs, upgrade path, and on-call burden. The practical question is whether that shared wiring belongs in every team’s codebase or in a reusable layer.

What Kubernetes provides, and what teams still assemble

Kubernetes already includes many of the parts needed to describe and manage resources. CustomResourceDefinitions introduce new API types, controllers reconcile desired state, and server-side apply records field ownership. CEL evaluates expressions, while OpenAPI schemas describe and validate fields.

The gap is the relationship among several objects. A Kubernetes manifest can describe a resource, but it doesn’t, by itself, say that a collection of resources forms one unit, that one field should come from another object’s status, or that the second object must wait for the first. Platform teams fill that gap in whichever tool they use.

Helm assembles resources during rendering; Helm 4 added server-side apply and the ability to wait for resource status. Argo CD offers sync waves and hooks, along with health checks, to manage ordering and readiness. Crossplane provides compositions and functions, and its v2 release can compose native Kubernetes resources directly. Operators often implement the same relationships in Go.

Those approaches differ in their interfaces, but the underlying task is familiar: define a group of objects, express dependencies, pass values along those dependencies, and keep reconciling the result. Each tool has added capabilities for pieces of that job, including ordering, readiness, field ownership, and evaluation inside the cluster. The repetition suggests composition may be a useful shared primitive in its own right.


KubeCon + CloudNativeCon is taking place in Salt Lake City from November 9 to 12. Register now!


Turning controller wiring into a definition

That’s the premise behind kro, the Kube Resource Orchestrator. In September 2025, the project moved to Kubernetes SIG Cloud Provider, with the stated role of a building block other tools can use rather than another end-to-end platform.

kro starts from a distinction between controller mechanics and the particular relationships a controller manages. The lifecycle and API plumbing recur; the wiring varies. Instead of implementing a separate controller for every pattern, teams describe that wiring as data in a ResourceGraphDefinition. A single controller interprets the definitions, drawing on Kubernetes features such as CRDs, OpenAPI, CEL, and server-side apply.

Diagram showing parts of the glue controllers that are shared, vs those that differ.

A ResourceGraphDefinition combines two concerns. One is the composition itself: resource templates and CEL expressions that connect their fields. The other is the API presented to users: a schema, the CRD generated from it, and the custom resource instances application teams create. Keeping those pieces together makes it possible for a platform team to define a reusable capability while application teams interact with it through Kubernetes conventions.

Dependencies can follow the references

kro derives its dependency graph from the CEL references in a definition. It also works out resource ordering from those dependencies and checks expression types against the OpenAPI schema before an instance is created.

Consider the ConfigMap that needs a Service hostname. The definition refers to the hostname reported by the Service. That reference tells the system the ConfigMap depends on the Service, so the Service must be ready first. The author doesn’t need to maintain a second, separate ordering declaration.

That design reduces the chance that a declared sequence drifts away from the relationship it’s meant to represent. If an author changes a resource reference, an independently maintained order can become stale. Deriving order from the reference leaves one expression of the dependency, rather than two descriptions that can disagree.

A simpler API still creates an ownership obligation

Application teams can use the generated custom resource with familiar tools: kubectl, RBAC, and GitOps workflows. For platform engineers, the appeal is clear: ten small glue controllers can become ten definitions managed by one controller.

But making an API cheaper to create doesn’t make it free to maintain. Once application manifests, permissions, and delivery pipelines depend on a custom resource, changes to its fields can disrupt users. kro blocks ResourceGraphDefinition schema changes that would break existing instances unless the author explicitly permits them. That safeguard addresses a real cost: the implementation may shrink, while the number of APIs the platform team must support remains.

My read is that teams should judge the pattern by how many durable interfaces it creates, not just how many controller codebases it removes. A shared interpreter helps with repeated mechanics; each API in front of it still carries a long-term compatibility promise.

Graphs that respond to existing cluster state

Not every composition needs an API or a custom resource instance. Some platform behaviors should follow objects that already exist: apply a default-deny NetworkPolicy to labeled Namespaces, gather labeled Services under one Ingress, or install a DNS stack and keep it healthy. In those cases, the cluster state itself is the trigger.

kro 0.10 introduces a Graph for this use. It contains the composition without a schema, CRD, or instances, and it’s namespaced. In the Ingress example below, the Graph reads existing Services that match a label selector, then creates and owns an Ingress whose rules are built from those Services.

apiVersion: kro.run/v1alpha1
kind: Graph
spec:
nodes:
- id: services
ref: # read only, never owned
kind: Service
metadata:
selector: {matchLabels: {expose: "true"}}
- id: ingress
template: # created and owned
kind: Ingress
spec:
rules: >-
${services.map(svc, {"host": svc.metadata.name + ".example.com", ...})}

No one creates a separate instance to activate that composition. Label a Service for exposure and the Ingress rule appears; remove the label and the rule disappears. The Graph observes cluster state and reconciles its owned resource in response.

Architectural diagram comparing kro 0.9 and kro 0.10

The distinction clarifies what kro is trying to share. Kubernetes already has the API-building half: CRDs. ResourceGraphDefinitions make it easier to define an API, but the composition is the reusable machinery that connects resources and reconciles them. A custom resource instance is one possible trigger for that machinery. A change to an existing Namespace or Service can be another.

That framing also applies beyond kro. An operator responding to a custom resource can be viewed as a composition with an API in front. A pipeline that applies manifests in sequence and waits for readiness resembles a composition triggered by a commit, though it may not continuously reconcile afterward. A runbook that creates a Namespace, quotas, and role bindings is a composition triggered by a ticket. The useful question for platform teams is where this work already happens and what currently carries its dependencies.

Making hidden relationships explicit

Many platforms already contain resource graphs, even when nobody calls them that. A naming convention can make two manifests agree on a string. A sync wave can encode dependency order as a step number. A script can copy a status field into another object. Each technique stores a relationship somewhere outside the objects it connects.

Diagram comparing indirect resource dependency methods with direct, continuous object references.

A composition makes that connection a reference between resources. In kro, CEL expressions describe the references, which are evaluated and watched as the graph reconciles. The approach makes dependencies easier to inspect and reduces reliance on string matching or external sequencing rules.

Kubernetes has moved useful work into shared controllers before. Rolling updates, for example, began as a kubectl subcommand before the Deployment controller took responsibility for them. The comparison doesn’t guarantee that composition will follow the same path, but it offers a useful precedent: a capability can become simpler for the ecosystem when its machinery has a common home.

kro is a Kubernetes SIG Cloud Provider subproject exploring that possibility. Its Graph resource shows how compositions can work without a dedicated API in front, while ResourceGraphDefinitions package the same machinery behind one. If the pattern holds, platform teams could spend less effort rebuilding dependency handling and more effort deciding which interfaces their users actually need.

The concrete takeaway is to look for repeated wiring across controllers, pipelines, and scripts. Those are signs that composition is already part of the platform; writing the relationships down as reusable data may make them easier to operate and share.

The post Why Kubernetes platforms keep rebuilding a layer they could share appeared first on The New Stack.

Source: Adam Crowder · thenewstack.io

Comments

Sign in to comment.
No comments yet. Be the first to comment.

Related Articles

Why Kubernetes platforms keep rebuilding a layer they cou...