Learn KOP - Configure Blueprint - Rafay Product Documentation

Part 1: Create

This is Part 1 of a multi-part exercise that will focus on creating and sharing a blueprint across projects within an organization.


What Will You Do

In part 1, you will:


Step 1: Create Project

In this step, we will create a new project which will serve as a logically isolated "operating environment" (sub tenant). To learn more, see Project.

Note
Creating a project requires "Org Admin" privileges.

We will create a project named "central". This project will be used to house the source blueprint we will create in an upcoming step. Then we will share this blueprint with another project.

You can create a project using RCTL. See CLI Setup to install the RCTL CLI.

apiVersion: system.k8smgmt.io/v3
kind: Project
metadata:
  description: getstarted_project
  name: central
spec:
  default: false

While it is possible to create a project using Terraform, a key benefit of using Terraform is creating multiple things at once.

Go to Step 2 to create a project and a blueprint.


Step 2: Create Blueprint

In this step, we will create a custom blueprint based off the "minimal" blueprint.

Next, create a blueprint version for this custom blueprint.

You can create a blueprint using RCTL.

apiVersion: infra.k8smgmt.io/v3
kind: Blueprint
metadata:
  name: test-blueprint
  project: central

You can create a project and a blueprint using Terraform. See Install Terraform to install Terraform.


Step 3: Share Blueprint

In this step, we will share the previously created custom blueprint with the project where your cluster is located.

A shared blueprint cannot be deleted. Disable sharing first, then delete the blueprint.

You will now see the blueprint is shared across projects.

You can share a blueprint using RCTL. Enable sharing and include the project names to share the blueprint with.

apiVersion: infra.k8smgmt.io/v3
kind: Blueprint
metadata:
  name: v1
  project: central
spec:
  base:
    name: default
    version: 1.21.0
  defaultAddons:
    enableIngress: true
    enableMonitoring: true
  sharing:
    enabled: true
    projects:
    - name: testproject
  type: custom
  version: "1"

You can share the blueprint using Terraform. Enable sharing and include the project names to share the blueprint with.


Step 4: Apply Blueprint

In this step, we will apply the blueprint to the existing cluster in the downstream project.

The blueprint will begin to be applied to the cluster.

The blueprint is now applied to the cluster.

When using RCTL, apply a blueprint using the update cluster command.

When using Terraform, apply a blueprint by updating the Terraform TFVARS file for the cluster. This exercise uses an existing cluster. See Amazon EKS Cluster Lifecycle or Azure AKS Cluster Lifecycle for exercises on creating a cluster.


Recap

Congratulations! At this point, you have successfully created, shared and applied a custom cluster blueprint across projects.