Test a Crossplane Composition locally with crossplane render before applying it to a cluster
domain: docs.crossplane.io · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗
Steps
Install the Crossplane CLI and ensure Docker is running, since the current `crossplane composition render` command pulls and runs each Function's image in a Docker container by default.
Prepare three inputs: a sample composite resource (XR) YAML, the Composition YAML (must have mode: Pipeline), and a functions.yaml listing the Function packages the pipeline references (apiVersion: pkg.crossplane.io/v1, kind: Function).
Run `crossplane composition render <composite-resource> <composition> [<functions>]` to print the rendered composed resources and updated XR status as YAML to stdout.
Add -x/--include-full-xr to see the full XR spec and metadata, -r/--include-function-results to surface Function-emitted kind: Result messages, and -c/--include-context to inspect the pipeline context passed between steps.
Use -o/--observed-resources=<path> to mock already-existing composed resources for a second-reconcile scenario, and -e/--required-resources=<path> to supply resources a function requests via its requirements (the older --extra-resources flag is deprecated).
Review the rendered YAML (or diff it against a previous render) before applying the Composition and XR to a real cluster.
Known gotchas
crossplane composition render requires a working Docker installation by default; to render without Docker, annotate the Function with render.crossplane.io/runtime: "Development" and run the function binary yourself listening on localhost:9443 with its --insecure flag.
Rendering reflects only a single reconcile pass using whatever observed/required-resource state you supply — functions relying on required/extra resources that don't exist yet may render differently on the first pass than they will after several real in-cluster reconciles.
KCL functions using FileSystem source (source: ./path/to/file.k) can't be rendered locally because that mode loads templates from a ConfigMap mounted into the in-cluster function pod; use Inline, OCI, or Git KCL sources for anything you need to render with this command.
Give your agent this knowledge — and 15,500+ more routes
One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp
Need this verified for your stack — or a route we don't have yet?