Module Title: dgt_plat10 – Crossplane Compositions and Platform APIs
Description:
Managed resources are low-level building blocks; developers should not need to know how a network, a load balancer and a database fit together. Crossplane compositions let the platform team define its own high-level APIs, such as "a PostgreSQL database" or "an environment for my service", and hide the implementation behind them. This module teaches how to design, build and version those APIs.
Module Objectives:
-
Composite Resource Definitions: Define custom platform APIs with a CompositeResourceDefinition (XRD) and an OpenAPI schema that exposes only the options developers need.
-
Compositions and Functions: Implement an API with a Composition pipeline and composition functions (patch-and-transform, Go templating, KCL or Python).
-
Namespaced APIs: Use namespaced composite resources so that each team creates resources in its own namespace with Kubernetes RBAC.
-
Packaging: Package XRDs, compositions and functions as Crossplane configuration packages and publish them to an OCI registry.
-
API Lifecycle: Version platform APIs, test compositions before release and evolve them without breaking existing users.
Module Content:
-
Designing a good API: Choosing sensible defaults, policies and guardrails: sizes instead of flavors, environments instead of networks.
-
Multi-provider compositions: One API with an implementation on OpenStack and another on a public cloud, chosen per environment.
-
Status and connection details: Returning endpoints and credentials to the developer in a secure way.
-
Testing: Rendering compositions locally, validating schemas and running end-to-end tests in CI.
-
Policy: Combining Crossplane with Kyverno or OPA Gatekeeper to enforce organizational rules.
Hands-on lab in natural language:
Students design with the AI agent a platform API called AppEnvironment that, from a few fields (team, size, environment), creates on the lab OpenStack cloud a network, a security group, a Kubernetes namespace and a PostgreSQL database. Students review the XRD and the composition, test them with a local render, and publish them as a configuration package that the Backstage lessons will use.
Target Audience:
This module is for students who have completed the Linux, DevOps and Containers modules, and for system administrators, DevOps engineers and SREs who want to move towards Platform Engineering. Experience with Kubernetes is recommended.
The students can push their exercises to the Academy DevOps & SRE Git project. For this module, create a folder with your username as its name in the following subfolder: https://github.com/Garanti-Del-Talento/gdt_academy
