kro-rgd-pulumi
Create production-ready KRO ResourceGraphDefinitions using Pulumi TypeScript. Use when users need to define custom Kubernetes APIs, compose resources with KRO, integrate AWS ACK resources, or build platform abstractions using Pulumi infrastructure as code.
What this skill does
# KRO ResourceGraphDefinition with Pulumi TypeScript
Generate production-ready Kubernetes Resource Orchestrator (KRO) ResourceGraphDefinitions using Pulumi TypeScript for creating custom Kubernetes APIs and composing resources with AWS ACK integration.
## When to Use This Skill
Use this skill when the user wants to:
- **Create custom Kubernetes APIs** using KRO ResourceGraphDefinitions
- **Compose multiple K8s resources** as a single declarative unit
- **Integrate AWS resources via ACK** (S3, RDS, DynamoDB, etc.) with KRO
- **Build platform abstractions** for developer self-service
- **Generate Pulumi TypeScript code** for KRO resources
- **Define resource dependencies** with automatic orchestration
- **Create reusable application templates** with CEL expressions (use CEL skill when necessary)
## Overview
### What is KRO?
**KRO (Kube Resource Orchestrator)** is an open-source Kubernetes-native project that allows you to:
- Define custom Kubernetes APIs without writing Go controllers
- Compose multiple resources as a directed acyclic graph (DAG)
- Automatically manage resource dependencies and ordering
- Use CEL expressions for dynamic configuration
- Provide lifecycle management with drift detection
### What is ResourceGraphDefinition (RGD)?
An **RGD** is KRO's core custom resource that:
- Defines a schema for your custom API (apiVersion, kind, spec, status)
- Lists resources to create with CEL expression templating
- Automatically generates a CRD when applied
- Deploys a microcontroller to manage instances
### Pulumi Integration
Using Pulumi TypeScript to deploy KRO resources provides:
- **Type safety** for resource definitions
- **IDE support** with autocomplete and error checking
- **Programmatic logic** for complex configurations
- **GitOps-friendly** workflow
- **Multi-stack architecture** for separation of concerns
## Prerequisites
### Required Components
```bash
# 1. Kubernetes cluster (1.25+ for CEL support)
kubectl version
# 2. KRO installed in cluster
helm install kro oci://ghcr.io/kubernetes-sigs/kro/charts/kro \
--namespace kro-system \
--create-namespace
# 3. ACK controllers (if using AWS resources)
helm install ack-s3-controller \
oci://public.ecr.aws/aws-controllers-k8s/s3-chart \
--namespace ack-system \
--create-namespace
# 4. Pulumi CLI and Node.js
pulumi version
node --version
```
### Pulumi Project Setup
```bash
# Create new Pulumi project
mkdir my-kro-project && cd my-kro-project
pulumi new kubernetes-typescript
# Install dependencies
npm install @pulumi/kubernetes @pulumi/pulumi
```
## Instructions
### Step 1: Understand the Requirements
Before generating code, gather:
1. **Custom API design**: What kind/apiVersion? What fields in spec?
2. **Resources to compose**: Deployments, Services, ConfigMaps, ACK resources?
3. **Dependencies**: Which resources depend on others?
4. **Conditions**: Any conditional resource creation (includeWhen)?
5. **Status fields**: What status to expose to users?
### Step 2: Design the Schema
Define the user-facing API:
```typescript
// Schema design principles:
// - Use descriptive field names
// - Provide sensible defaults
// - Group related fields in nested objects
// - Add validation rules for constraints
```
### Step 3: Generate Pulumi TypeScript Code
Use this structure for KRO RGD:
```typescript
import * as k8s from "@pulumi/kubernetes";
import * as pulumi from "@pulumi/pulumi";
// Create the ResourceGraphDefinition
const rgd = new k8s.apiextensions.CustomResource("my-app-rgd", {
apiVersion: "kro.run/v1alpha1",
kind: "ResourceGraphDefinition",
metadata: {
name: "my-application",
namespace: "default",
},
spec: {
schema: {
apiVersion: "v1alpha1",
kind: "Application",
spec: {
// Define user-configurable fields
name: "string",
image: "string | default=\"nginx:latest\"",
replicas: "integer | default=3",
},
status: {
// Auto-populated status fields
ready: "${deployment.status.conditions.exists(c, c.type == 'Available' && c.status == 'True')}",
availableReplicas: "${deployment.status.availableReplicas}",
},
validation: [
{
expression: "self.replicas >= 1 && self.replicas <= 100",
message: "Replicas must be between 1 and 100",
},
],
},
resources: [
{
id: "deployment",
template: {
apiVersion: "apps/v1",
kind: "Deployment",
metadata: {
name: "${schema.spec.name}",
},
spec: {
replicas: "${schema.spec.replicas}",
selector: {
matchLabels: {
app: "${schema.spec.name}",
},
},
template: {
metadata: {
labels: {
app: "${schema.spec.name}",
},
},
spec: {
containers: [
{
name: "app",
image: "${schema.spec.image}",
},
],
},
},
},
},
readyWhen: [
"${deployment.status.conditions.exists(c, c.type == 'Available' && c.status == 'True')}",
],
},
{
id: "service",
template: {
apiVersion: "v1",
kind: "Service",
metadata: {
name: "${schema.spec.name}-service",
},
spec: {
selector: {
app: "${schema.spec.name}",
},
ports: [
{
port: 80,
targetPort: 8080,
},
],
},
},
},
],
},
});
export const rgdName = rgd.metadata.name;
```
### Step 4: Add ACK Resources (AWS Integration)
For AWS resources via ACK:
```typescript
const rgdWithAws = new k8s.apiextensions.CustomResource("app-with-aws-rgd", {
apiVersion: "kro.run/v1alpha1",
kind: "ResourceGraphDefinition",
metadata: {
name: "application-with-storage",
},
spec: {
schema: {
apiVersion: "v1alpha1",
kind: "AppWithStorage",
spec: {
name: "string",
image: "string",
bucketName: "string",
},
status: {
bucketArn: "${bucket.status.ackResourceMetadata.arn}",
ready: "${deployment.status.conditions.exists(c, c.type == 'Available' && c.status == 'True')}",
},
},
resources: [
// ACK S3 Bucket
{
id: "bucket",
template: {
apiVersion: "s3.services.k8s.aws/v1alpha1",
kind: "Bucket",
metadata: {
name: "${schema.spec.bucketName}",
},
spec: {
name: "${schema.spec.bucketName}",
tagging: {
tagSet: [
Related in Cloud & DevOps
appbuilder-action-scaffolder
IncludedCreate, implement, deploy, and debug Adobe Runtime actions with consistent layout, validation, and error handling. Use this skill whenever the user needs to add actions to an App Builder project, understand action structure (params, response format, web/raw actions), configure actions in the manifest, use App Builder SDKs (State, Files, Events, database), deploy and invoke actions via CLI, debug action issues, or implement patterns such as webhook receivers, custom event providers, journaling consumers, large payload redirects, action sequence pipelines, and Asset Compute workers. Also trigger when users mention serverless functions in Adobe context, action logging, IMS authentication for actions, or cron-style scheduled actions.
orchestrating-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. Use this skill when the user needs a multi-step Data Cloud pipeline, cross-phase troubleshooting, or data space and data kit management. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase sf data360 workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching phase-specific skill), the task is STDM/session tracing/parquet telemetry (use observing-agentforce), standard CRM SOQL (use querying-soql), or Apex implementation (use generating-apex).
github-project-automation
IncludedAutomate GitHub repository setup with CI/CD workflows, issue templates, Dependabot, and CodeQL security scanning. Includes 12 production-tested workflows and prevents 18 errors: YAML syntax, action pinning, and configuration. Use when: setting up GitHub Actions CI/CD, creating issue/PR templates, enabling Dependabot or CodeQL scanning, deploying to Cloudflare Workers, implementing matrix testing, or troubleshooting YAML indentation, action version pinning, secrets syntax, runner versions, or CodeQL configuration. Keywords: github actions, github workflow, ci/cd, issue templates, pull request templates, dependabot, codeql, security scanning, yaml syntax, github automation, repository setup, workflow templates, github actions matrix, secrets management, branch protection, codeowners, github projects, continuous integration, continuous deployment, workflow syntax error, action version pinning, runner version, github context, yaml indentation error
sf-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase `sf data360` workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching sf-datacloud-* skill), the task is STDM/session tracing/parquet telemetry (use sf-ai-agentforce-observability), standard CRM SOQL (use sf-soql), or Apex implementation (use sf-apex).
fabric-cli
IncludedUse this skill for Fabric.so CLI workflows with the `fabric` terminal command: diagnose/install/login, search or browse a Fabric library, save notes/links/files, create folders, ask the Fabric AI assistant, manage tasks/workspaces, generate shell completion, check subscription usage, produce JSON output, and use Fabric as persistent agent memory. Do not use for Microsoft Fabric/Azure/Power BI `fab`, Daniel Miessler's Fabric framework, Python Fabric SSH, Fabric.js, or textile/fashion fabric.
lark
IncludedLark/Feishu CLI skills: lark-cli operations for docs, markdown, sheets, base, calendar, im, mail, task, okr, drive, wiki, slides, whiteboard, apps, approval, attendance, contact, vc, minutes, event. Use when the user needs to operate Lark/Feishu resources via lark-cli, send messages, manage documents, spreadsheets, calendars, tasks, OKRs, deploy web pages, or any Feishu/Lark workspace operations.