Learn KOP - Create Add-Ons - Rafay Product Documentation

Part 1: Create

This is Part 1 of the exercise that will focus on creating add-ons that will be used to test cluster overrides in a later section.


What Will You Do

In part 1, you will:


Step 1: Create Namespace

In this step, we will create a namespace on the cluster that will be used for our add-ons.

The namespace is now published on the cluster.


Step 2: Create YAML Add-On

In this step, we will create a YAML based NGINX add-on. In a later section, we will use cluster overrides to customize this add-on.

Next, create a version for this add-on.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-yaml
  labels:
    app: nginx
  annotations:
spec:
  replicas: 1
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx-yaml
        image: nginx
        ports:
        - containerPort: 80

The YAML add-on and version will be created.


Step 3: Create Helm Add-On

In this step, we will create a Helm based NGINX add-on. In a later section, we will use cluster overrides to customize this add-on.

Next, create a version for this add-on.

service:
  type: ClusterIP

The Helm add-on and version will be created.


Step 4: Create Blueprint

In this step, we will create a custom blueprint based off the "minimal" blueprint. The blueprint will contain the previously created add-ons.

Next, create a blueprint version for this custom blueprint.

The blueprint and version will be created.


Step 5: Apply Blueprint

In this step, we will apply the blueprint to an existing cluster.

The blueprint will begin to be applied to the cluster.

The blueprint is now applied to the cluster.


Recap

Congratulations! At this point, you have successfully created a YAML and a Helm based add-on which have been deployed to the cluster via a custom cluster blueprint.