Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Crossplane lets platform teams define higher-level Kubernetes APIs so developers can request supported capabilities without managing every underlying resource themselves. The team defines the API with a Composite Resource Definition (XRD), describes what should be created in a Composition, and uses a function pipeline to produce the resources for each composite resource (XR).

What Crossplane does for a platform team

Crossplane describes itself as a control plane framework for platform engineering. It extends Kubernetes with custom resources that teams can use to create APIs for their platform. Instead of asking each developer to assemble infrastructure from low-level objects, a platform team can expose a supported request format and keep implementation choices in the platform layer. Crossplane documentation

This separates the developer-facing contract from its implementation. Developers interact with the API the platform team supports; the platform team controls which resources that request produces and how they are configured.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How an XRD, XR, Composition, and function pipeline fit together

The XRD defines the API

A Composite Resource Definition (XRD) specifies the schema for a composite API, including its fields and whether instances are namespaced or cluster-scoped. Crossplane uses it to establish the corresponding Kubernetes API. Scope is a tenancy and access-design choice: namespaced APIs can align with namespace boundaries, while cluster-scoped APIs have a different access model. Choose based on how your organization separates teams and governs requests; neither scope is universally right. Crossplane XRD documentation

The XR is a request through that API

A composite resource (XR) is an instance created through the API defined by the XRD. It represents a set of resources as one Kubernetes object. Its fields should describe the capability a developer needs, rather than expose every implementation detail by default. Crossplane composite resource documentation

The Composition and its functions determine what gets created

A Composition describes the resources to create for an XR. Its function pipeline processes the XR and produces the composed resources when the XR is created or updated. The API request alone does not dictate a universal resource set: the Composition and functions encode the platform team’s implementation. Crossplane Composition documentation

For example, Crossplane’s CLI guide illustrates a WebApp request that results in a Kubernetes Deployment and Service. That is an example of one possible design, not a default behavior for every Crossplane API. Crossplane CLI render guide

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Design the self-service API around a supported capability

Start by deciding what developers should be able to request and what the platform must retain control over. A narrow API is easier to support and govern; exposing more fields offers flexibility but also expands the contract the platform team must maintain.

  • Define the user-facing capability and the fields developers genuinely need to supply.
  • Keep implementation-specific settings in the Composition where possible, rather than making every setting part of the public API.
  • Choose namespaced or cluster scope based on tenancy and intended access boundaries.
  • Decide how the API should express lifecycle and scaling needs before users depend on it.

These are platform-design recommendations, not guarantees imposed by Crossplane. A useful API should make valid requests straightforward while making unsupported configurations difficult or impossible to express.

Build and preview the API before installing it

  1. Define the XRD. Specify the schema and scope for the composite API using documentation for the Crossplane version you deploy. XRDs establish the custom API developers will use.
  2. Create the Composition and pipeline. Describe the resources for an XR and configure functions to produce them. Function approaches can include YAML patch-and-transform, templates, CUE, KCL, Python, or custom code; verify compatibility and configuration details against your target version rather than assuming every option works identically.
  3. Keep the project together. A project can hold API definitions, Compositions, embedded functions, examples, and metadata. This makes the interface and its implementation easier to develop as a unit. Crossplane CLI documentation
  4. Render locally with the CLI. Use the CLI project’s render workflow to preview the resources a Composition produces for an example XR before applying the configuration to a cluster. Rendering is a preview of function output, not proof that every resource will become ready in a live environment. Crossplane CLI render guide
  5. Install and exercise it in an appropriate Kubernetes environment. Check the generated API, create representative XRs, and inspect resulting resources and readiness. Test updates and deletion behavior as well as initial creation; the exact rollout and operational checks depend on your environment and are not universal Crossplane guarantees.

Crossplane documentation surfaced for this topic is version 2.4. Use documentation matching the version actually deployed because APIs and CLI behavior can change.

Set permissions deliberately

Crossplane’s service account has create, update, and delete access to resources installed by providers or defined by an XRD. If a Composition pipeline creates other resource kinds, the service account needs additional RBAC grants for those kinds. This is not unrestricted access to every object in the cluster, but permissions still need to be reviewed against the resources your platform intends to manage. Crossplane Composition permissions documentation

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Identify which resource kinds each Composition can produce.
  • Confirm which permissions are provided by installed providers or XRD-defined resources.
  • Grant only the additional RBAC required for other composed kinds, and include those grants in review of the platform API’s scope.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Expose scaling only when the API maps it appropriately

An XRD can expose Kubernetes’ scale subresource. When the scale mapping connects the API’s fields appropriately, standard consumers including kubectl scale, Horizontal Pod Autoscaler, and KEDA can interact with the XR through that subresource. Scaling support therefore depends on configuration; it is not automatic for every composite API. Crossplane scalable compositions guide

Choose flexibility that your team can govern

Platform teams make several connected trade-offs: scope should fit tenancy, the API should balance simplicity with needed flexibility, and the function approach should match team expertise and maintenance capacity. Declarative patching or templating may suit straightforward resource assembly; more expressive or custom code can address other needs but adds implementation decisions. Whatever the approach, keep the developer-facing contract understandable and ensure the pipeline’s required permissions are explicit.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.