Skip to content

Instantly share code, notes, and snippets.

@DhairyaMajmudar
Last active September 1, 2025 13:54
Show Gist options
  • Save DhairyaMajmudar/7b8a4ba6879931675f050916b3fdd696 to your computer and use it in GitHub Desktop.
Save DhairyaMajmudar/7b8a4ba6879931675f050916b3fdd696 to your computer and use it in GitHub Desktop.
Google Summer of Code (GSoC'25) with kro - Project Report

gsoc


Google Summer of Code 2025 with kro

Hiii 👋, Dhairya here. This is a summary of all the work I did for the kro (Kube Resource Orchestrator) and my personal experiences as a part of the Google Summer of Code 2025.


📋 Introduction

What is kro?

kro (Kube Resource Orchestrator) is an open-source, Kubernetes-native project that allows developers to define custom Kubernetes APIs using simple and straightforward configuration. With kro, one can easily configure new custom APIs that create a group of Kubernetes objects and the logical operations between them.

Why kro? - Manage any group of resources as one unit.


📘 Project Description



💻 Contributions

Let's dive deeper into the work I did with the amazing kro community, but before that, there are a few terms I will be referring to, so let me explain them first.


📚 What are kro RGDs (ResourceGraphDefinition)?

But before understanding what RGDs are, let's first understand what Kubernetes CRDs are.

A Kubernetes Custom Resource Definition (CRD) is a powerful mechanism that allows users to extend the Kubernetes API by defining their own custom resource types. These custom resources behave like built-in Kubernetes objects (e.g., Pods, Deployments) but are user-defined and tailored to specific application needs


Let's take a close and concise look at what RGDs are in kro.

kro RGDs taking CRDs a level up

When Kro is installed in a cluster, it installs a Custom Resource Definition (CRD) called ResourceGraphDefinition (RGD). The Platform, Security, and Compliance teams can collaborate to create custom APIs by defining Custom Resources for the ResourceGraphDefinition CRD.

let's take an example for better understanding

In the depicted example, the Platform Team has created a RGD with the name "Application Stack" that encapsulates the necessary resources, along with any additional logic, abstractions, and security best practices. When the RGD is applied to the cluster, a new API of kind ApplicationStack is created and available for the Developer to interact with. The Developers no longer need to directly manage the underlying infrastructure complexities, as the custom API handles the deployment and configuration of the required resources.

image

kro CLI Development

Building a CLI tool for kro resource management using GoLang's Cobra package.

Mentioned are the proposed tasks that are about to be completed under the project scope. Project goals:

  1. Build a CLI tool to help developers and admins manage kro.
  2. Create commands for common RGD operations [validate/generate].
  3. Open Container Images (OCI) management commands [package/push/pull/login/publish]

🔍 kro CLI commands

1. kro cli rootCmd #501

Description

This PR adds the rootCmd to the kro CLI, which will be the main command entry point.

Usage

kro [SUB_COMMAND]

Demo

Screencast.from.2025-04-09.19-11-43.webm

2. kro validate #527

Description

kro validate command is useful to validate the kro RGD file. Under the hood, it extends the kro DAG graph and internal kro checks to verify if RGD.

Usage

kro validate rgd -f [FILE]

Demo

Screencast.from.2025-06-13.20-11-43.webm

3. kro generate crd #583

Description

kro generate crd command is able to generate the CRD file from the given kro RGD file.

Usage

kro generate crd -f [FILE]

Flags:

Shorthand Flag Usage
-f --file Path to the ResourceGroupDefinition file
-F --format Output format (yaml/json)
-o --output Path to the output file

Demo

Screencast.from.2025-06-13.20-25-09.webm

4. kro generate diagram #589

Description

kro generate diagram command can be used to visualise the resource dependency graph. This command generates an HTML file that shows the directed graph between resources of the given RGD file.

Usage

kro generate diagram -f [FILE]

Flags:

Shorthand Flag Usage
-f --file Path to the ResourceGroupDefinition file

Demo

Screencast.from.2025-07-15.22-45-05.webm

5. kro generate instance #603

Description

kro generate instance command is used to generate a dummy instance for the given RGD file.

Usage

kro generate instance -f [FILE]

Flags:

Shorthand Flag Usage
-f --file Path to the ResourceGroupDefinition file

Demo

Screencast.from.2025-07-15.23-44-11.webm

6. kro package #617

Description

kro package command is useful to package a given kro RGD file into an OCI-compatible image. This image can be further published into remote container registries like Docker Hub, AWS, GCR, etc...

Usage

kro package -f [FILE] -t [TAG]

Flags:

Shorthand Flag Usage
-f --file Path to the ResourceGroupDefinition file
-t --tag Tag to the image, Default: Latest

Demo

kro-package.webm

7. kro publish #655

Description

kro publish command is useful to publish an OCI image to a given remote container registry. This command also accepts username and password from the user for authentication to the registry

Usage

kro package -f [FILE] -r [REGISTRY_URL] -u [USER_NAME] -p [PASSWORD]

Flags:

Shorthand Flag Usage
-f --file Path to the ResourceGroupDefinition file
-r --ref Remote reference to publish the OCI image to (e.g., 'ghcr.io/user/repo:tag')
-u --username Username for the remote registry (Optional)
-p --password Password for the remote registry (Optional)

Note: If username or password is not provided via flags, the CLI will prompt the user to provide them in further steps.

Demo

kro-publish.webm

8. kro login #656

Description

The kro cli login command is used to store user credentials (passwords, username) for different registers into the config file.

storage location: $HOME/.config/kro/registry/config.json

Usage

kro login -f [FILE] -r [REGISTRY_URL] -u [USER_NAME] -p [PASSWORD]

Flags:

Shorthand Flag Usage
-f --file Path to the ResourceGroupDefinition file
-r --ref Remote reference to publish the OCI image to (e.g., 'ghcr.io/user/repo:tag')
-u --username Username for the remote registry (Optional)
-p --password Password for the remote registry (Optional)

Note: If username or password is not provided via flags, the CLI will prompt the user to provide them in further steps.

Demo

Screencast.from.2025-08-31.20-16-24.webm

✨Learning & Personal Experience with kro

As the Google Summer of Code comes to an end, I see a miniature version of myself trying to learn and get into such an amazing organization, fearing to start something new and big. But fast-forward to today, I have learned and grown a lot as a developer and as a person. I will always be indebted to kro for helping me in this journey and for being such a great organization and developer community. The people, mentors, and everyone are so helpful and supportive that I have always hoped to be in such an organization.

I learned so many things during this journey, from learning how to write industry-level Golang code to writing good commit messages and using different packages to build various kinds of CLI commands.

I had a great time working with the kro community, and I am really grateful to my mentors, Amine Hilaly and Barni S, and all the organization members, for helping me throughout this journey.

Thank you, kro, for making this summer the most memorable journey of learning and growth. 🚀 💙

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment