Skip to main content

kro - Kube Resource Orchestrator

Before you start

Prepare your environment for this section:

~$prepare-environment automation/controlplanes/kro

This will make the following changes to your lab environment:

  • Install the AWS Controller for DynamoDB in the Amazon EKS cluster

You can view the Terraform that applies these changes here.

kro (Kube Resource Orchestrator) is an open-source Kubernetes operator that enables you to define custom APIs for creating groups of related Kubernetes resources. With kro, you create ResourceGraphDefinitions (RGDs) that use CEL (Common Expression Language) expressions to define relationships between resources and automatically determine their creation order.

kro allows you to compose multiple Kubernetes resources into higher-level abstractions with intelligent dependency handling - it automatically determines the correct order to deploy resources by analyzing how they reference each other. You can pass values between resources using CEL expressions, include conditional logic, and define default values to simplify the user experience.

In this lab, we'll explore kro's capabilities by first deploying the complete Carts component with an in-memory database using a WebApplication ResourceGraphDefinition. We'll then enhance this by composing a WebApplicationDynamoDB ResourceGraphDefinition that builds on the base WebApplication template to add Amazon DynamoDB storage.