Compose stacks with kro
- The kro EKS-managed capability is
ACTIVEon the cluster, with theresourcegraphdefinitions.kro.runCRD registered. - The ACK DynamoDB capability from Lab 1 is still
ACTIVE— kro will compose itsTablecustom resource alongside native Kubernetes objects. - The pre-provisioned
${EKS_CLUSTER_AUTO_NAME}-carts-dynamoIAM role is wildcard-scoped to${EKS_CLUSTER_AUTO_NAME}-carts-*tables, so the same role covers Lab 1's-carts-fastpathtable and Lab 3's-carts-krotable without changes.
In Lab 1 you applied three separate manifests — a Table custom resource, a ConfigMap override, and a Pod Identity association — to migrate carts onto an AWS-managed DynamoDB table. That's the right altitude for a one-off, but a platform team running this for many services would want one user-facing CR that captures the whole stack.
In this lab you'll do exactly that with the kro EKS capability. kro lets you define a ResourceGraphDefinition (RGD) — a schema for a higher-level CR plus the graph of resources it expands into — and apply a single instance that bundles a Namespace, an ACK Table, a ConfigMap, and a ServiceAccount. The kro controllers run in AWS-owned infrastructure outside the cluster; you only see the CRDs they registered.
Throughout this lab, we will:
- Verify the kro capability is
ACTIVEand theresourcegraphdefinitions.kro.runCRD is present. - Apply a
CartsStackResourceGraphDefinition that composes Namespace + ACK Table + ConfigMap + ServiceAccount + Deployment + Service. - Apply a
CartsStackinstance, observe kro reconcile its child resources in order, then bind a Pod Identity association so thecartsPod can read and write the new table.
A single CartsStack apply produces this graph:
you apply:
CartsStack/carts-kro (one CR, two required fields)
│
▼ kro reconciler expands the RGD
│
┌──────────┬────────┴──┬──────────┬─────────────┬──────────┐
▼ ▼ ▼ ▼ ▼ ▼
Namespace Table ConfigMap SA Deployment Service
│ │
▼ ▼
ACK DynamoDB Pod (carts-…)
controller │
│ │ + aws eks create-pod-identity-association
▼ ▼
AWS DynamoDB table AWS_CONTAINER_CREDENTIALS
(eks-workshop-…-carts-kro) via Pod Identity Agent
kro itself does not call AWS APIs — it only reconciles Kubernetes resources. Anything that needs to create an AWS resource flows through a controller that does (in this lab, the ACK DynamoDB controller from Lab 1). Pod Identity is an EKS API rather than a Kubernetes API, so the binding step at the end of this lab is a one-line aws eks command, not part of the RGD.