Domain 3 gives you four ways to turn a developer request into live resources: CRD+operator, Crossplane, workflows, and portal templates. This section adds the newest contender (kro), walks the lab's end-to-end golden path, and forces the comparison, because "evaluate when to use operators, workflows, or pipelines" is an explicit exam outcome and an easy scenario win.
make core apimake portalOrientation
Up to now, we've looked at each Domain 3 engine on its own. This section shows how they connect, which is where real platform engineering happens: a Backstage form commits to git, an ApplicationSet spots the new repo, Argo CD deploys an XR, and a controller reconciles it. Being able to narrate that chain clearly is worth more than any single command inside it.
kro in one sitting
kro (Kube Resource Orchestrator) sits in Crossplane's niche with a fraction of the moving parts. One ResourceGraphDefinition declares both the schema and the resources it expands into, and kro generates the CRD and runs the reconciliation loop itself. No providers, no functions, no package manager. CEL expressions wire fields together, and cross-resource references (like ${ns.metadata.name}) automatically build the dependency graph and creation order.
apiVersion: kro.run/v1alpha1
kind: ResourceGraphDefinition
metadata: { name: tenantspace }
spec:
schema:
apiVersion: v1alpha1
kind: TenantSpace
spec:
team: string
cpu: string | default="1"
resources:
- id: ns
template:
apiVersion: v1
kind: Namespace
metadata:
name: ${schema.spec.team}
labels:
tenant: ${schema.spec.team}
- id: quota
template:
apiVersion: v1
kind: ResourceQuota
metadata:
name: tenant-quota
namespace: ${ns.metadata.name}
spec:
hard:
requests.cpu: ${schema.spec.cpu}Always write kro's ${...} substitutions in block style. Inside flow-style braces (labels: { tenant: ${schema.spec.team} }), the expression's own closing } ends the YAML map prematurely and the whole manifest blows up with a useless parse error.
kro is still young and its API evolves quickly. If this manifest disagrees with your installed version, kubectl explain resourcegraphdefinition.spec settles it on the spot, and that recovery habit is worth more than memorizing the YAML.
| Aspect | Crossplane | kro |
|---|---|---|
| Files to write | XRD + Composition (+ providers, functions) | One ResourceGraphDefinition |
| Wiring | Patches or function pipelines | CEL references with inferred ordering |
| External clouds | Rich provider ecosystem | Whatever CRDs already live in-cluster |
| Connection secrets | First-class | Not really |
| Maturity | Production-hardened, widely deployed | Young, API still in motion |
Both sides of the trade are true: "same result, one file, no providers" and "no provider ecosystem, no connection secrets, alpha-grade stability". Depending on the scenario, an exam question could reward either angle.
The RGD fields beyond the first manifest
- Schema markers. Simple Schema types (
string,integer,boolean, objects, arrays) accept validation markers after a pipe:required=true,default=...,enum="a,b",pattern="regex",minimum=1 maximum=100. kro compiles these into OpenAPI validation on the generated CRD, so bad instances get rejected by the API server before kro even sees them. - Status.
schema.statusfields hold CEL expressions over child resources (likeurl: ${service.status.loadBalancer.ingress[0].hostname}). kro infers their types and populates them onto the instance, giving you the equivalent of Crossplane'sToCompositeFieldPath. readyWhen. A list of CEL conditions on a resource that dependents must wait for. Without it, kro treats a resource as ready the moment it exists and its expressions resolve, so a broken Deployment can still make the instance look healthy unless you explicitly addreadyWhen: [${deployment.status.availableReplicas > 0}].includeWhen. Conditions controlling whether a resource is created at all (like${schema.spec.ingress.enabled}). They're re-evaluated on every reconcile, so flipping the flag off later deletes the resource.forEachexpands one resource entry into a collection (one object per list item), whileexternalRefreads an existing object without taking ownership of it.- Ordering. kro infers the dependency graph from your CEL references. Run
kubectl get rgd <name> -o jsonpath='{.status.topologicalOrder}'to inspect the computed order: creation walks it forward and deletion walks it in reverse. A cycle (A reads B, B reads A) blocks the RGD from going Active; break it by reading fromschema.specinstead. - Scope.
schema.scope: Namespaced(default) orCluster. Unlike Crossplane, namespaced instances in kro can still create cluster-scoped objects (just like the lab's Namespace example) because kro tracks ownership using ApplySet-style labels rather thanownerReferences, which can't cross scopes.
Conditions to read
An RGD tracks ResourceGraphAccepted, KindReady (the CRD exists), ControllerReady (the dynamic controller is running), and an overall Ready condition. Its status.state only turns Active when all three succeed; otherwise it stays Inactive with the failing condition's message (often a CEL type mismatch or unknown field caught by static analysis before anything is created). Instances report InstanceSynced and status.state: ACTIVE, and RGD authors can expose custom conditions via schema.status.conditions. To pause reconciliation on one instance while debugging, annotate it with kro.run/reconcile: suspended.
kro's controller needs RBAC for every kind an RGD templates. The Helm chart's rbac.mode: unrestricted allows everything, while aggregation mode only grants what ClusterRoles labeled rbac.kro.run/aggregate-to-controller: "true" permit. In aggregation mode, an RGD referencing an ungranted kind still goes Active, and then every instance fails with forbidden from the kro ServiceAccount. Same RBAC lesson as Crossplane and Argo Workflows, one namespace over.
The golden path, hop by hop
Backstage implements the "web portals" capability from the CNCF white paper. It combines a software catalog (components, systems, APIs, and owners declared in each repo's catalog-info.yaml), software templates (the scaffolder: a parameter form wired to actions like fetch:template, publish:gitea, and catalog:register), TechDocs, and plugins that surface Kubernetes, CI, and other systems in one place.
Backstage template (parameters form)
│ scaffolder actions: fetch skeleton → publish → register
▼
new repo in Gitea org services (contains k8s/ manifests + catalog-info.yaml)
│ noticed by the SCM-provider generator
▼
ApplicationSet golden-path ──generates──▶ Argo CD Application
│
▼
running workload ── and the component appears in the catalog with its owner
Each hop is a place where things can break and a link the exam can ask you to trace: template action failures (git host credentials), the generator's filter (which repos match), the generated Application's destination, and the workload itself. Being able to narrate this chain end to end is the "golden path" competency, and the commands below verify every hop.
Watch out for this classic scenario trap: a portal is an interface over capabilities, not a capability in itself. If fulfillment behind the scenes is still a manual ticket queue, bolting Backstage onto it just gives you a nicer-looking ticket queue. Call that out directly whenever a question pitches a portal rollout with no real automation underneath.
Backstage as an exam object
On the exam, Backstage shows up as an interface rather than a Node.js codebase: read a catalog-info.yaml, inspect or fix a software template, and articulate what a portal does and doesn't solve. The vocabulary is compact and exact.
Catalog kinds and their required fields
| kind | Models | Required in spec |
|---|---|---|
| Component | A service, website, or library | type, lifecycle (experimental/production/deprecated by convention), owner |
| API | An interface a component provides or consumes | type (openapi, asyncapi, graphql, grpc), lifecycle, owner, definition |
| Resource | Infrastructure a component depends on (database, bucket, cluster) | type, owner |
| System | A group of components and resources delivering a capability | owner |
| Domain | A business area grouping systems | owner |
| Group / User | The org structure; owner fields point here | Group: type, children; User: memberOf |
| Location | A pointer to other descriptor files (targets) | targets or target |
| Template | A scaffolder template (apiVersion scaffolder.backstage.io/v1beta3) | type, parameters, steps |
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: payments-api
annotations:
backstage.io/techdocs-ref: dir:. # TechDocs builds docs/ from this repo
backstage.io/kubernetes-id: payments-api # Kubernetes plugin matches workloads by label
argocd/app-name: payments-api # Argo CD plugin lookup
spec:
type: service
lifecycle: production
owner: group:default/team-payments
system: payments
providesApis: [payments-v1]Entity references follow the format kind:namespace/name (like group:default/team-payments), defaulting to the default namespace when omitted. Relations (ownedBy, partOf, dependsOn, providesApi) are computed automatically from these spec fields; you never write them by hand.
Software templates, the parts that break
parametersis JSON Schema rendered as multi-step forms. Useui:fieldto pick specialized widgets:OwnerPicker,EntityPicker,RepoUrlPicker(make sureui:options.allowedHostslists your git host or the form rejects it on sight), andSecret(referenced as${{ secrets.x }}, neverparameters.x).stepsrun sequentially in the scaffolder backend, each definingid,action,input, and an optionalif. Know the core built-ins:fetch:template(copies a skeleton and renders${{ values.x }}),fetch:plain,publish:github/publish:gitlab/publish:gitea/publish:bitbucket(creates and pushes the repo),catalog:register(registers the newcatalog-info.yamlviarepoContentsUrl+catalogInfoPath),catalog:write,debug:log,fs:rename, andfs:delete. You can inspect every installed action live at/create/actionsin the UI.- Templating syntax. Read inputs via
${{ parameters.name }}, prior step outputs via${{ steps['publish'].output.repoContentsUrl }}, and final user links viaoutput.links. Backstage's${{ }}is Nunjucks, not kro's${}or Helm's{{ }}; mixing up the braces is a classic reason templates fail to render. - Where templates fail. Publish steps fail if
app-config.yaml(integrations.github/gitlab/gitea) lacks a token with repo-creation rights.catalog:registerfails if the repo exists but the catalog can't read the URL. And if the template finishes green but no Argo CD Application appears, check the ApplicationSet generator's filter rather than Backstage.
Two plugins the exam vocabulary assumes
TechDocs builds MkDocs sites directly from a repo's docs/ folder and mkdocs.yml, pointed to by the backstage.io/techdocs-ref annotation (dir:. means "this repo"). The Kubernetes plugin surfaces pods, deployments, and errors for a component by matching workloads labeled backstage.io/kubernetes-id (or selected by backstage.io/kubernetes-label-selector), querying clusters configured under kubernetes.clusterLocatorMethods with a ServiceAccount token. Both are read-only windows over state your platform already manages, which ties straight into the maturity model below.
The CNCF maturity model's Interfaces axis progresses from Custom processes → Standard tooling → Self-service solutions → Integrated services. A portal that opens tickets is just level 1 with nicer typography. A portal whose template commits to git and lets GitOps and controllers handle the rest is level 3. When the exam hands you a "portal is an interface, not the platform" scenario, it's asking you to place that proposal on this ladder.
Choosing the engine
| Engine | Trigger | Lifetime | Best at |
|---|---|---|---|
| CRD + operator | An API object | Forever | Domain behavior: failover, backup, upgrade |
| Crossplane | An API object | Forever | Composing many resources, including cloud APIs, behind one abstraction |
| kro | An API object | Forever | The same declarative composition, in-cluster only, in a single file |
| Argo Workflows | Submit, schedule, or event | Run to completion | Imperative sequences, batch jobs, scheduled maintenance |
| Tekton | Git event | Run to completion | Building, testing, and publishing artifacts |
| Backstage template | A human filling a form | One-shot scaffolding | The front door: create repo, register in catalog, hand off to GitOps |
Three questions settle almost every architecture choice:
- Does the state need to reconcile forever, or be produced once? Forever → a controller (operator, Crossplane, kro). Once → a workflow or pipeline.
- What triggers it? An API object, a schedule, a git event, or a human.
- Who's the consumer? A developer writing YAML, a developer clicking through a form, or another automated system.
And when two engines both fit, say so explicitly and pick the thinner one. That reasoning scores well because it applies the TVP instinct from section 3.1 to your own platform stack.
Engines the table leaves out
| Engine | What it is | Pick it when | Not when |
|---|---|---|---|
| Helm chart | Install-time templating with no continuous controller | Packaging a single application's manifests with values | State must keep converging or compose external APIs |
| tofu-controller (Flux) | A Terraform CR reconciled by Flux (approvePlan gates applies, drift detection is built in) | You have existing Terraform/OpenTofu modules and state that need to become GitOps-driven | You'd rather model the API natively in Kubernetes types (pick Crossplane or kro) |
| KubeVela (OAM) | An Application made of components, traits, and policies with a delivery workflow | You want an application-centric abstraction across clusters with CUE-defined delivery steps | You're building infrastructure-first APIs (Crossplane fits better) |
| Cloud-vendor controllers (ACK, Config Connector, ASO) | One CRD per cloud resource type | You're on a single cloud and want native resource fidelity, optionally wrapped by kro or Crossplane | You need one unified abstraction spanning multiple clouds |
Keep two final pairings sharp. Crossplane vs a cloud controller: a cloud controller gives you the raw resource kinds, while Crossplane (or kro) gives you the developer-facing abstraction on top, so they compose rather than compete. Argo Workflows vs Tekton: both sit on the official tool list, so if a prompt names one, use it. Otherwise, git-driven CI pipelines go to Tekton, and parameterized orchestration on request or schedule goes to Argo Workflows.
Exercises
Apply the RGD above, then:
kubectl get rgd tenantspace -o jsonpath='{.status.state}{"\n"}' # wants: Active
kubectl apply -f - <<'EOF'
apiVersion: kro.run/v1alpha1
kind: TenantSpace
metadata: { name: team-h, namespace: default }
spec: { team: team-h, cpu: "2" }
EOF
# kro creates the namespace first and the quota a few seconds later
sleep 20
kubectl get ns team-h && kubectl -n team-h get resourcequota tenant-quotaoutputcaptured 2026-08-26
$ kubectl get rgd tenantspace -o jsonpath='{.status.state}{"\n"}' # wants: Active
Active
$ kubectl apply -f - <<'EOF'
apiVersion: kro.run/v1alpha1
kind: TenantSpace
metadata: { name: team-h, namespace: default }
spec: { team: team-h, cpu: "2" }
EOF
tenantspace.kro.run/team-h created
$ # kro creates the namespace first and the quota a few seconds later
$ sleep 20
$ kubectl get ns team-h && kubectl -n team-h get resourcequota tenant-quota
NAME STATUS AGE
team-h Active 25s
NAME REQUEST LIMIT AGE
tenant-quota requests.cpu: 0/2 22sActive (meaning kro generated and established the TenantSpace CRD), and both the namespace and quota exist with your values. Now compare the effort against 3.5: same outcome, one file, zero providers, balanced against no provider ecosystem, no connection secrets, and alpha-grade stability.With make portal finished and Backstage running (cd portal && yarn start), scaffold a component from the "Golden path service" template. Then verify every hop from the shell: a new repo appears in Gitea's services org (http://gitea.lab:3000/services), the SCM-generator ApplicationSet discovers it (kubectl -n argocd get applicationset golden-path -o yaml, inspect the generator block), a generated Application shows up (kubectl -n argocd get applications), and the workload deploys.
make validate turns the portal checks green, including "Applications auto-generated from git".For each scenario, name the right engine and give a one-sentence why: (a) every team needs a Postgres with backups that self-heals for years; (b) on request, stamp out a namespace with quotas and labels from three parameters; (c) nightly, rebuild and rescan all base images and notify on failure; (d) on every push, build, test, and deploy a service; (e) offer non-technical users a form that creates a new service from a skeleton.
You never specify ordering by hand in kro: it infers the graph from cross-resource references and publishes the result. Inspect it, then feed kro a cycle and watch how it responds, because a cycle is the one authoring bug the engine can't work around.
# the RGD is applied by hand earlier on this page; make the block stand on its own
kubectl apply -f - <<'EOF'
apiVersion: kro.run/v1alpha1
kind: ResourceGraphDefinition
metadata: { name: tenantspace }
spec:
schema:
apiVersion: v1alpha1
kind: TenantSpace
spec:
team: string
cpu: string | default="1"
resources:
- id: ns
template:
apiVersion: v1
kind: Namespace
metadata:
name: ${schema.spec.team}
labels:
tenant: ${schema.spec.team}
- id: quota
template:
apiVersion: v1
kind: ResourceQuota
metadata:
name: tenant-quota
namespace: ${ns.metadata.name}
spec:
hard:
requests.cpu: ${schema.spec.cpu}
EOF
sleep 20
kubectl get rgd tenantspace -o jsonpath='{.status.conditions}' | jq '.[] | {type, status, reason, message}'
kubectl get rgd tenantspace -o jsonpath='{.status.topologicalOrder}{"\n"}'
kubectl apply -f - <<'EOF'
apiVersion: kro.run/v1alpha1
kind: ResourceGraphDefinition
metadata: { name: cyclic }
spec:
schema:
apiVersion: v1alpha1
kind: Cyclic
spec:
team: string
resources:
- id: first
template:
apiVersion: v1
kind: ConfigMap
metadata:
name: first
namespace: default
data:
other: ${second.metadata.name}
- id: second
template:
apiVersion: v1
kind: ConfigMap
metadata:
name: second
namespace: default
data:
other: ${first.metadata.name}
EOF
kubectl get rgd cyclic -o jsonpath='{.status.state}{"\n"}'; kubectl get rgd cyclic -o jsonpath='{.status.conditions}' 2>/dev/null | jq '.[] | {type, status, message}'
kubectl delete rgd cyclic --ignore-not-foundoutputcaptured 2026-09-13
$ # the RGD is applied by hand earlier on this page; make the block stand on its own
$ kubectl apply -f - <<'EOF'
apiVersion: kro.run/v1alpha1
kind: ResourceGraphDefinition
metadata: { name: tenantspace }
spec:
schema:
apiVersion: v1alpha1
kind: TenantSpace
spec:
team: string
cpu: string | default="1"
resources:
- id: ns
template:
apiVersion: v1
kind: Namespace
metadata:
name: ${schema.spec.team}
labels:
tenant: ${schema.spec.team}
- id: quota
template:
apiVersion: v1
kind: ResourceQuota
metadata:
name: tenant-quota
namespace: ${ns.metadata.name}
spec:
hard:
requests.cpu: ${schema.spec.cpu}
EOF
resourcegraphdefinition.kro.run/tenantspace unchanged
$ sleep 20
$ kubectl get rgd tenantspace -o jsonpath='{.status.conditions}' | jq '.[] | {type, status, reason, message}'
{
"type": "ResourceGraphAccepted",
"status": "True",
"reason": "Valid",
"message": "resource graph and schema are valid"
}
{
"type": "KindReady",
"status": "True",
"reason": "Ready",
"message": "kind TenantSpace has been accepted and ready"
}
{
"type": "ControllerReady",
"status": "True",
"reason": "Running",
"message": "controller is running"
}
{
"type": "Ready",
"status": "True",
"reason": "Ready",
"message": ""
}
$ kubectl get rgd tenantspace -o jsonpath='{.status.topologicalOrder}{"\n"}'
["ns","quota"]
$ kubectl apply -f - <<'EOF'
apiVersion: kro.run/v1alpha1
kind: ResourceGraphDefinition
metadata: { name: cyclic }
spec:
schema:
apiVersion: v1alpha1
kind: Cyclic
spec:
team: string
resources:
- id: first
template:
apiVersion: v1
kind: ConfigMap
metadata:
name: first
namespace: default
data:
other: ${second.metadata.name}
- id: second
template:
apiVersion: v1
kind: ConfigMap
metadata:
name: second
namespace: default
data:
other: ${first.metadata.name}
EOF
resourcegraphdefinition.kro.run/cyclic created
$ kubectl get rgd cyclic -o jsonpath='{.status.state}{"\n"}'; kubectl get rgd cyclic -o jsonpath='{.status.conditions}' 2>/dev/null | jq '.[] | {type, status, message}'
Inactive
{
"type": "KindReady",
"status": "Unknown",
"message": "condition \"KindReady\" is awaiting reconciliation"
}
{
"type": "ControllerReady",
"status": "Unknown",
"message": "condition \"ControllerReady\" is awaiting reconciliation"
}
{
"type": "ResourceGraphAccepted",
"status": "False",
"message": "failed to build dependency graph: graph contains a cycle: first -> second -> first"
}
{
"type": "Ready",
"status": "False",
"message": "failed to build dependency graph: graph contains a cycle: first -> second -> first"
}
$ kubectl delete rgd cyclic --ignore-not-found
resourcegraphdefinition.kro.run "cyclic" deletedtenantspace is Active with a topologicalOrder of ["ns","quota"] (namespace before the quota inside it). Notice that the cyclic RGD isn't blocked at admission: kro accepts the manifest, then leaves it Inactive with a condition naming the cycle. Always check status.state and conditions after a reconcile instead of assuming a clean kubectl apply means a valid graph.readyWhen holds dependents back until something real is true rather than just until the object exists, and includeWhen omits a resource from the graph altogether. Together, they let one API serve a tier that gets a database and a tier that doesn't.
kubectl apply -f - <<'EOF'
apiVersion: kro.run/v1alpha1
kind: ResourceGraphDefinition
metadata: { name: tieredspace }
spec:
schema:
apiVersion: v1alpha1
kind: TieredSpace
spec:
team: string
cpu: string | default="1"
resources:
- id: ns
template:
apiVersion: v1
kind: Namespace
metadata:
name: ${schema.spec.team}
- id: quota
readyWhen:
- ${quota.status.hard != null}
template:
apiVersion: v1
kind: ResourceQuota
metadata:
name: tenant-quota
namespace: ${ns.metadata.name}
spec:
hard:
requests.cpu: ${schema.spec.cpu}
- id: extra
includeWhen:
- ${schema.spec.cpu != "0"}
template:
apiVersion: v1
kind: ConfigMap
metadata:
name: tier-note
namespace: ${ns.metadata.name}
data:
note: included because cpu was not zero
EOF
sleep 20
kubectl get rgd tieredspace -o jsonpath='{.status.state} {.status.topologicalOrder}{"\n"}'
kubectl apply -f - <<'EOF'
apiVersion: kro.run/v1alpha1
kind: TieredSpace
metadata: { name: team-j, namespace: default }
spec: { team: team-j, cpu: "0" }
EOF
sleep 30
kubectl -n team-j get configmap tier-note || echo 'omitted by includeWhen'
kubectl get tieredspace team-j -o jsonpath='{.status.conditions}' | jq '.[] | {type, status, reason}'
kubectl delete tieredspace team-j
kubectl delete rgd tieredspace
kubectl delete ns team-j --ignore-not-foundoutputcaptured 2026-09-12
$ kubectl apply -f - <<'EOF'
apiVersion: kro.run/v1alpha1
kind: ResourceGraphDefinition
metadata: { name: tieredspace }
spec:
schema:
apiVersion: v1alpha1
kind: TieredSpace
spec:
team: string
cpu: string | default="1"
resources:
- id: ns
template:
apiVersion: v1
kind: Namespace
metadata:
name: ${schema.spec.team}
- id: quota
readyWhen:
- ${quota.status.hard != null}
template:
apiVersion: v1
kind: ResourceQuota
metadata:
name: tenant-quota
namespace: ${ns.metadata.name}
spec:
hard:
requests.cpu: ${schema.spec.cpu}
- id: extra
includeWhen:
- ${schema.spec.cpu != "0"}
template:
apiVersion: v1
kind: ConfigMap
metadata:
name: tier-note
namespace: ${ns.metadata.name}
data:
note: included because cpu was not zero
EOF
resourcegraphdefinition.kro.run/tieredspace created
$ sleep 20
$ kubectl get rgd tieredspace -o jsonpath='{.status.state} {.status.topologicalOrder}{"\n"}'
Active ["ns","quota","extra"]
$ kubectl apply -f - <<'EOF'
apiVersion: kro.run/v1alpha1
kind: TieredSpace
metadata: { name: team-j, namespace: default }
spec: { team: team-j, cpu: "0" }
EOF
tieredspace.kro.run/team-j created
$ sleep 30
$ kubectl -n team-j get configmap tier-note || echo 'omitted by includeWhen'
Error from server (NotFound): configmaps "tier-note" not found
omitted by includeWhen
$ kubectl get tieredspace team-j -o jsonpath='{.status.conditions}' | jq '.[] | {type, status, reason}'
{
"type": "InstanceSynced",
"status": "True",
"reason": "ReconciliationSucceeded"
}
$ kubectl delete tieredspace team-j
tieredspace.kro.run "team-j" deleted from default namespace
$ kubectl delete rgd tieredspace
resourcegraphdefinition.kro.run "tieredspace" deleted
$ kubectl delete ns team-j --ignore-not-foundcpu is zero, yet the instance still reports ready because the quota satisfied its readyWhen check.The suspend annotation freezes kro's reconciliation on a single instance. Delete an owned resource while it's suspended and nothing brings it back, showing both the debugging escape hatch and the controller's role in keeping the graph intact.
kubectl get rgd tenantspace -o jsonpath='{.status.state}{"\n"}'
kubectl apply -f - <<'EOF'
apiVersion: kro.run/v1alpha1
kind: TenantSpace
metadata: { name: team-h, namespace: default }
spec: { team: team-h, cpu: "2" }
EOF
# kro reconciles an instance when the instance changes, so bump the spec to be sure of a fresh one
kubectl patch tenantspace team-h --type merge -p '{"spec":{"cpu":"2"}}'
sleep 45
kubectl -n team-h get resourcequota tenant-quota
kubectl annotate tenantspace team-h kro.run/reconcile=suspended --overwrite
kubectl -n team-h delete resourcequota tenant-quota
sleep 30
kubectl -n team-h get resourcequota || echo 'still gone: the instance is suspended'
kubectl annotate tenantspace team-h kro.run/reconcile-
sleep 45
kubectl -n team-h get resourcequota || echo 'still gone: unsuspending alone does not trigger a reconcile'
# the trigger is a change to the instance, not drift in what it composed
kubectl patch tenantspace team-h --type merge -p '{"spec":{"cpu":"3"}}'
sleep 45
kubectl -n team-h get resourcequota tenant-quota
kubectl get tenantspace team-h -o jsonpath='{.status.conditions}' | jq '.[] | {type, status, reason}'outputcaptured 2026-09-12
$ kubectl get rgd tenantspace -o jsonpath='{.status.state}{"\n"}'
Active
$ kubectl apply -f - <<'EOF'
apiVersion: kro.run/v1alpha1
kind: TenantSpace
metadata: { name: team-h, namespace: default }
spec: { team: team-h, cpu: "2" }
EOF
tenantspace.kro.run/team-h configured
$ # kro reconciles an instance when the instance changes, so bump the spec to be sure of a fresh one
$ kubectl patch tenantspace team-h --type merge -p '{"spec":{"cpu":"2"}}'
tenantspace.kro.run/team-h patched (no change)
$ sleep 45
$ kubectl -n team-h get resourcequota tenant-quota
NAME REQUEST LIMIT AGE
tenant-quota requests.cpu: 0/2 45s
$ kubectl annotate tenantspace team-h kro.run/reconcile=suspended --overwrite
tenantspace.kro.run/team-h annotated
$ kubectl -n team-h delete resourcequota tenant-quota
resourcequota "tenant-quota" deleted from team-h namespace
$ sleep 30
$ kubectl -n team-h get resourcequota || echo 'still gone: the instance is suspended'
No resources found in team-h namespace.
$ kubectl annotate tenantspace team-h kro.run/reconcile-
tenantspace.kro.run/team-h annotated
$ sleep 45
$ kubectl -n team-h get resourcequota || echo 'still gone: unsuspending alone does not trigger a reconcile'
No resources found in team-h namespace.
$ # the trigger is a change to the instance, not drift in what it composed
$ kubectl patch tenantspace team-h --type merge -p '{"spec":{"cpu":"3"}}'
tenantspace.kro.run/team-h patched
$ sleep 45
$ kubectl -n team-h get resourcequota tenant-quota
NAME REQUEST LIMIT AGE
tenant-quota requests.cpu: 0/3 45s
$ kubectl get tenantspace team-h -o jsonpath='{.status.conditions}' | jq '.[] | {type, status, reason}'
{
"type": "InstanceSynced",
"status": "True",
"reason": "ReconciliationSucceeded"
}kro.run/reconcile=suspended is set. Here's the surprise: removing the annotation alone doesn't restore it, because kro reconciles when the instance changes rather than when a composed child drifts, so the quota only comes back after the cpu patch. Meanwhile InstanceSynced reads True / ReconciliationSucceeded the entire time, even while the quota is missing, so don't trust that condition by itself.kro's controller can only create resources its ServiceAccount is authorized to create. If you template a kind outside that set, the failure lands on the instance rather than on the RGD, which is an easy place to misread a permissions error.
This block doesn't narrow any permissions; it asks for a kind outside the usual set and inspects both places the outcome can surface.
kubectl get clusterrole -o name | grep -i kro
kubectl apply -f - <<'EOF'
apiVersion: kro.run/v1alpha1
kind: ResourceGraphDefinition
metadata: { name: needsmore }
spec:
schema:
apiVersion: v1alpha1
kind: NeedsMore
spec:
team: string
resources:
- id: pdb
template:
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: tenant-pdb
namespace: default
spec:
minAvailable: 1
selector:
matchLabels:
team: ${schema.spec.team}
EOF
sleep 20
kubectl apply -f - <<'EOF'
apiVersion: kro.run/v1alpha1
kind: NeedsMore
metadata: { name: team-k, namespace: default }
spec: { team: team-k }
EOF
sleep 45
kubectl get needsmore team-k -o jsonpath='{.status.conditions}' | jq '.[] | {type, status, reason, message}'
kubectl get pdb tenant-pdb -n default || echo 'not created'
kubectl delete needsmore team-k
kubectl delete rgd needsmore
kubectl delete pdb tenant-pdb -n default --ignore-not-foundoutputcaptured 2026-09-13
$ kubectl get clusterrole -o name | grep -i kro
clusterrole.rbac.authorization.k8s.io/kro-cluster-role
$ kubectl apply -f - <<'EOF'
apiVersion: kro.run/v1alpha1
kind: ResourceGraphDefinition
metadata: { name: needsmore }
spec:
schema:
apiVersion: v1alpha1
kind: NeedsMore
spec:
team: string
resources:
- id: pdb
template:
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: tenant-pdb
namespace: default
spec:
minAvailable: 1
selector:
matchLabels:
team: ${schema.spec.team}
EOF
resourcegraphdefinition.kro.run/needsmore created
$ sleep 20
$ kubectl apply -f - <<'EOF'
apiVersion: kro.run/v1alpha1
kind: NeedsMore
metadata: { name: team-k, namespace: default }
spec: { team: team-k }
EOF
needsmore.kro.run/team-k created
$ sleep 45
$ kubectl get needsmore team-k -o jsonpath='{.status.conditions}' | jq '.[] | {type, status, reason, message}'
{
"type": "InstanceSynced",
"status": "True",
"reason": "ReconciliationSucceeded",
"message": "Instance reconciled successfully"
}
$ kubectl get pdb tenant-pdb -n default || echo 'not created'
NAME MIN AVAILABLE MAX UNAVAILABLE ALLOWED DISRUPTIONS AGE
tenant-pdb 1 N/A 0 46s
$ kubectl delete needsmore team-k
needsmore.kro.run "team-k" deleted from default namespace
$ kubectl delete rgd needsmore
resourcegraphdefinition.kro.run "needsmore" deleted
$ kubectl delete pdb tenant-pdb -n default --ignore-not-foundPodDisruptionBudget appears (meaning the controller already had permission, and you can name the ClusterRole that granted it) or the instance's condition reports a forbidden error naming the missing verb. Either way, the skill is knowing which object to inspect.A golden path template breaks in two distinct places: in the form before anything runs, or in the publish step after the user submits. Rather than breaking the lab, this block queries the template through Backstage's API so you can inspect both chokepoints directly: allowedHosts on the RepoUrlPicker, and the publish:gitea step.
Backstage runs on the host via make portal (it isn't part of make full); start it with cd portal && yarn start. Its API requires a token even for reads, so the first command exchanges the guest provider for one.
TOKEN=$(curl -s http://localhost:7007/api/auth/guest/refresh | jq -r .backstageIdentity.token)
curl -s -H "Authorization: Bearer $TOKEN" 'http://localhost:7007/api/catalog/entities?filter=kind=template' | jq '.[] | {name: .metadata.name, steps: [.spec.steps[].action]}'
curl -s -H "Authorization: Bearer $TOKEN" 'http://localhost:7007/api/catalog/entities?filter=kind=template' | jq '.[] | .spec.parameters[]? | .properties.repoUrl?."ui:options"?.allowedHosts'
curl -s -H "Authorization: Bearer $TOKEN" http://localhost:7007/api/scaffolder/v2/tasks | jq '{tasks: (.tasks | length), first: (.tasks[0] // null | if . == null then null else {id, status} end)}'outputcaptured 2026-09-12
$ TOKEN=$(curl -s http://localhost:7007/api/auth/guest/refresh | jq -r .backstageIdentity.token)
$ curl -s -H "Authorization: Bearer $TOKEN" 'http://localhost:7007/api/catalog/entities?filter=kind=template' | jq '.[] | {name: .metadata.name, steps: [.spec.steps[].action]}'
{
"name": "golden-path-service",
"steps": [
"fetch:template",
"publish:gitea",
"catalog:register"
]
}
{
"name": "example-nodejs-template",
"steps": [
"fetch:template",
"publish:github",
"catalog:register",
"notification:send"
]
}
$ curl -s -H "Authorization: Bearer $TOKEN" 'http://localhost:7007/api/catalog/entities?filter=kind=template' | jq '.[] | .spec.parameters[]? | .properties.repoUrl?."ui:options"?.allowedHosts'
null
null
[
"gitea.lab:3000"
]
null
[
"github.com"
]
$ curl -s -H "Authorization: Bearer $TOKEN" http://localhost:7007/api/scaffolder/v2/tasks | jq '{tasks: (.tasks | length), first: (.tasks[0] // null | if . == null then null else {id, status} end)}'
{
"tasks": 0,
"first": null
}golden-path-service lists fetch:template, publish:gitea, and catalog:register, and its RepoUrlPicker permits exactly one host (gitea.lab:3000). The task list is empty because no one has triggered it yet. If you want to see either failure live, remove that host from allowedHosts and the form blocks submission before creating a task; break the Gitea token instead and a task starts, then dies at publish:gitea.The catalog is a queryable API, not just a web UI (requires make portal running on the host). Pay attention to the last line: unauthenticated reads get a 401, which is good to know before wiring up automation. Querying it directly returns entities, owners, and relations as structured JSON you can assert on in scripts, which is how a catalog stays accurate as the platform scales.
TOKEN=$(curl -s http://localhost:7007/api/auth/guest/refresh | jq -r .backstageIdentity.token)
curl -s -H "Authorization: Bearer $TOKEN" 'http://localhost:7007/api/catalog/entities?filter=kind=component' | jq '[.[] | {name: .metadata.name, owner: .spec.owner, type: .spec.type}]'
curl -s -H "Authorization: Bearer $TOKEN" 'http://localhost:7007/api/catalog/entities?filter=kind=component' | jq '[.[] | {name: .metadata.name, relations: [.relations[]? | {type, targetRef}]}]'
curl -s -H "Authorization: Bearer $TOKEN" 'http://localhost:7007/api/catalog/entities?filter=kind=group' | jq '[.[] | .metadata.name]'
curl -s -o /dev/null -w 'without a token: %{http_code}\n' 'http://localhost:7007/api/catalog/entities?filter=kind=component'outputcaptured 2026-09-12
$ TOKEN=$(curl -s http://localhost:7007/api/auth/guest/refresh | jq -r .backstageIdentity.token)
$ curl -s -H "Authorization: Bearer $TOKEN" 'http://localhost:7007/api/catalog/entities?filter=kind=component' | jq '[.[] | {name: .metadata.name, owner: .spec.owner, type: .spec.type}]'
[
{
"name": "example-website",
"owner": "guests",
"type": "website"
}
]
$ curl -s -H "Authorization: Bearer $TOKEN" 'http://localhost:7007/api/catalog/entities?filter=kind=component' | jq '[.[] | {name: .metadata.name, relations: [.relations[]? | {type, targetRef}]}]'
[
{
"name": "example-website",
"relations": [
{
"type": "ownedBy",
"targetRef": "group:default/guests"
},
{
"type": "partOf",
"targetRef": "system:default/examples"
},
{
"type": "providesApi",
"targetRef": "api:default/example-grpc-api"
}
]
}
]
$ curl -s -H "Authorization: Bearer $TOKEN" 'http://localhost:7007/api/catalog/entities?filter=kind=group' | jq '[.[] | .metadata.name]'
[
"guests"
]
$ curl -s -o /dev/null -w 'without a token: %{http_code}\n' 'http://localhost:7007/api/catalog/entities?filter=kind=component'
without a token: 401ownedBy and partOf relations are derived from the descriptor files rather than duplicated by hand. A component whose owner doesn't resolve is the catalog's version of a dangling pointer; think about how you'd catch that in CI.Self-check
How does kro know to create the namespace before the quota?
From the CEL reference: the quota template reads ${ns.metadata.name}, so kro builds a dependency graph automatically and orders creation accordingly. You never write dependsOn, which also means a refactor that drops a reference can silently reorder your graph.
A team asks for "a portal so developers can self-serve". What do you ask before agreeing?
Ask what actually happens after the user clicks submit. If fulfillment behind the scenes is still manual, the portal is just a nicer ticket queue. The real platform work is the automated chain underneath (templates → git → GitOps → controllers), and the portal is the last 10%. That's the white paper's interface-versus-capability distinction.
Nightly image rebuild-and-rescan: which engine, and why not the others?
A CronWorkflow: it's scheduled, runs to completion, and gives you a DAG with retries and notifications. You wouldn't pick an operator (nothing to reconcile continuously), Tekton (no git event trigger, though it could execute the build), or Crossplane (no persistent resource graph to maintain).
Give the three questions that decide the engine.
Does the state need to reconcile forever or run once? What's the trigger: an API object, a schedule, a git event, or a human? And who's the audience: a YAML author, a form filler, or another system? Answer those three and the decision table practically fills itself in.
What does the SCM-provider generator actually watch, and how would you debug a repo that never appears?
It polls the git host's API for repos in an org matching your filters (name pattern, topic, or required path), then stamps out one Application per match. Debug by checking the generator block (org, filters, credentials Secret), then reading the ApplicationSet's status conditions and controller logs for API errors, which usually trace back to a token scope or a filter mismatch.
An RGD is Active, but every instance sits with ResourcesReady=False and the kro controller logs forbidden. Cause?
kro is running in RBAC aggregation mode and nobody granted its controller permissions on the kind your RGD templates. Because static analysis still passes, the RGD goes Active, and the error only shows up when the controller tries to create child objects. Add a ClusterRole for that kind labeled rbac.kro.run/aggregate-to-controller: "true". Same failure family as a Crossplane provider missing RBAC or an Argo Workflows SA missing workflowtaskresults.
A Backstage template's publish step fails with an authentication error although the form rendered fine. Where do you look, and what is the other common form-time failure?
Check the scaffolder backend's integration config (integrations.github|gitlab|gitea in app-config.yaml) and verify its token actually has repo-creation rights in the target org. The classic form-time failure is a RepoUrlPicker whose allowedHosts list doesn't include your git host, blocking submission before any step ever runs.
How do you make a kro resource wait for a Deployment to actually be available before creating the Service that points at it, and why is the default insufficient?
Add readyWhen: [${deployment.status.availableReplicas > 0}] (or check its Available condition) on the Deployment entry. By default, kro considers a resource ready the moment it exists and its CEL expressions resolve, so dependents get created even if the pods never start. Don't confuse it with includeWhen, which decides whether to create the resource at all.
Which Backstage kinds must a catalog contain before spec.owner: group:default/team-x resolves, and what happens if they are missing?
A Group named team-x (typically alongside User entities linked via memberOf). If it's missing, the Component still loads into the catalog, but its ownedBy relation dangles: the UI renders a broken owner link and ownership filters won't find it. In practice, Groups and Users are synced from an org provider like GitHub or LDAP rather than written by hand.
Docs to know your way around
- kro.run: the
ResourceGraphDefinitiondocs and examples. - backstage.io: Software Templates (actions and parameters) and the catalog model, plus the lab's own template at
backstage/template/template.yaml, which is short enough to read end to end. - Offline:
kubectl explain resourcegraphdefinition.specandkubectl -n argocd get applicationset <name> -o yaml. - kro.run/docs/concepts/rgd (schema markers, readiness, conditional creation, dependencies) and kro.run/docs/advanced/access-control for RBAC modes.
- backstage.io/docs/features/software-catalog/descriptor-format (required fields per kind) and backstage.io/docs/features/software-templates/writing-templates; you can browse all installed actions at
/create/actionson any running Backstage instance. - tag-app-delivery.cncf.io/whitepapers/platform-eng-maturity-model: the Interfaces and Measurement rows are the ones scenario questions draw from.
make down-gitopsmake down-api