|
| 1 | +--- |
| 2 | +sidebar_position: 1 |
| 3 | +--- |
| 4 | + |
| 5 | +# What is kro? |
| 6 | + |
| 7 | +**kro** (Kube Resource Orchestrator) is an open-source, Kubernetes-native project |
| 8 | +that allows you to define custom **Kubernetes APIs** using simple and straightforward |
| 9 | +configuration. With kro, you can easily configure new custom APIs that create a |
| 10 | +group of Kubernetes objects and the logical operations between them. kro leverages |
| 11 | +[CEL (Common Expression Language)](https://github.com/google/cel-spec), the same |
| 12 | +language used by Kubernetes webhooks, for logical operations. Using CEL expressions, |
| 13 | +you can easily pass values from one object to another and incorporate conditionals into |
| 14 | +your custom API definitions. Based on the CEL expressions, kro automatically calculates |
| 15 | +the order in which objects should be created. You can define default values for fields |
| 16 | +in the API specification, streamlining the process for end users who can then |
| 17 | +effortlessly invoke these custom APIs to create grouped resources. |
| 18 | + |
| 19 | +# How does kro work? |
| 20 | + |
| 21 | +### Developer interface |
| 22 | + |
| 23 | +When the end user applies a YAML spec to the cluster using the **Custom API**, |
| 24 | +the API creates a set of resources within the cluster. These resources can |
| 25 | +include both **native Kubernetes** resources and any **Custom Resource |
| 26 | +Definitions (CRDs)** installed in the cluster. Some of these resources may |
| 27 | +create additional resources outside of your cluster. |
| 28 | + |
| 29 | +As depicted in the following diagram, the Developers call the Custom API, which |
| 30 | +creates resources such as the **Deployment**, **Ingress**, **ServiceAccount**, |
| 31 | +**Prometheus Monitor**, **IAM Role**, **IAM Policy**, and **Amazon S3 Bucket**. |
| 32 | +This allows the Developers to easily manage and deploy their applications in a |
| 33 | +standardized and streamlined manner. |
| 34 | + |
| 35 | +<div align="center"> |
| 36 | + |
| 37 | + |
| 38 | +_Figure 1: End user interface - Custom API_ |
| 39 | + |
| 40 | +</div> |
| 41 | + |
| 42 | +### ResourceGraphDefinition |
| 43 | + |
| 44 | +When you install **Kro** in your cluster, it installs a Custom Resource |
| 45 | +Definition (CRD) called **ResourceGraphDefinition (RG)**. The **Platform**, **Security**, |
| 46 | +and **Compliance** teams can collaborate to create custom APIs by defining |
| 47 | +Custom Resources for the ResourceGraphDefinition CRD. |
| 48 | + |
| 49 | +In the depicted example, the **Platform Team** has created a **RG** with |
| 50 | +arbitrary name "Application Stack" that encapsulates the necessary resources, |
| 51 | +along with any additional logic, abstractions, and security best practices. When |
| 52 | +the RGD is applied to the cluster, a new API of kind ApplicationStack is created |
| 53 | +and available for the Developer to interact with. The Developers no longer need to |
| 54 | +directly manage the underlying infrastructure complexities, as the custom API |
| 55 | +handles the deployment and configuration of the required resources. |
| 56 | + |
| 57 | +<div align="center"> |
| 58 | + |
| 59 | + |
| 60 | +_Figure 2: ResourceGraphDefinition (RG) - Platform Team Interface_ |
| 61 | + |
| 62 | +</div> |
| 63 | + |
| 64 | +### ResourceGraphDefinition Instance |
| 65 | + |
| 66 | +Developer teams can create multiple instances of the **Application Stack**, each |
| 67 | +tailored to their specific requirements. As shown, **Dev Team A** and **Dev Team |
| 68 | +B** have both instantiated their own Application Stacks. While the underlying |
| 69 | +resources are similar, **Dev Team A** has chosen to expose their service |
| 70 | +externally, leveraging the Ingress option, while **Dev Team B** has opted to |
| 71 | +keep their service internal to the cluster. This flexibility allows each |
| 72 | +development team to customize their application stack based on their specific |
| 73 | +requirements. |
| 74 | + |
| 75 | +<div align="center"> |
| 76 | + |
| 77 | + |
| 78 | +_Figure 3: ResourceGraphDefinition Instance (RGI)_ |
| 79 | + |
| 80 | +</div> |
| 81 | + |
| 82 | +# Why kro? |
| 83 | + |
| 84 | +### Manage any group of resources as one unit |
| 85 | + |
| 86 | +Using **kro**, the **Platform Team** can enable Developer teams to quickly |
| 87 | +deploy and manage applications and their dependencies as one unit, handling the |
| 88 | +entire lifecycle from deployment to maintenance. The new APIs integrate |
| 89 | +seamlessly with developers' existing CD tools, preserving familiar processes and |
| 90 | +interfaces to simplify adoption. |
| 91 | + |
| 92 | +### Collaborate |
| 93 | + |
| 94 | +Transform **Kubernetes** into your unified platform configuration framework |
| 95 | +using **kro**. Platform, Compliance, and Security teams work together to develop |
| 96 | +APIs that standardize and streamline configurations, making it easier for |
| 97 | +Developer teams to adopt secure, compliant practices. This collaboration lets |
| 98 | +you build your organizational standards directly into the APIs, ensuring every |
| 99 | +application deployment aligns with security and compliance requirements without |
| 100 | +adding complexity for developers. |
| 101 | + |
| 102 | +### Standardize |
| 103 | + |
| 104 | +By creating unified APIs, you can define and enforce best practices across all |
| 105 | +environments, ensuring every application meets organizational requirements and |
| 106 | +achieving consistency across deployment environments. |
| 107 | + |
| 108 | +# Community |
| 109 | + |
| 110 | +We welcome questions, suggestions, and contributions from the community! To get |
| 111 | +involved, check out our |
| 112 | +[contributing guide](https://github.com/kro-run/kro/blob/main/CONTRIBUTING.md). |
| 113 | +For bugs or feature requests, feel free to |
| 114 | +[submit an issue](https://github.com/kro-run/kro/issues). You’re also invited to |
| 115 | +join our |
| 116 | +[community](https://github.com/kro-run/kro?tab=readme-ov-file#community-participation). |
0 commit comments