Multi-Cluster Setup

In this tutorial you will create the following Multi-Cluster environment using primazactl

image

Prerequisites

Tutorial

  1. Create the Main Cluster

    kind create cluster --name main
    
  2. Install the Cert-Manager on Main Cluster

    kubectl apply \
        -f https://github.com/cert-manager/cert-manager/releases/download/v1.12.0/cert-manager.yaml \
        --kubeconfig <(kind get kubeconfig --name main)
    kubectl rollout status -n cert-manager deploy/cert-manager-webhook -w --timeout=120s \
        --kubeconfig <(kind get kubeconfig --name main)
    
  3. Create the Worker Cluster

    kind create cluster --name worker
    
  4. Install the Cert-Manager on Worker Cluster

    kubectl apply \
        -f https://github.com/cert-manager/cert-manager/releases/download/v1.12.0/cert-manager.yaml \
        --kubeconfig <(kind get kubeconfig --name worker)
    kubectl rollout status -n cert-manager deploy/cert-manager-webhook -w --timeout=120s \
        --kubeconfig <(kind get kubeconfig --name worker)
    
  5. Create a Primaza Tenant

    primazactl create tenant primaza-mytenant \
        --version latest \
        --context kind-main
    
  6. Join the Worker cluster

    primazactl join cluster \
        --version latest \
        --tenant primaza-mytenant \
        --cluster-environment worker \
        --environment demo \
        --context kind-worker \
        --tenant-context kind-main
    
  7. Create an Application Namespace named "applications" in the Worker Cluster

    primazactl create application-namespace applications \
        --version latest \
        --tenant primaza-mytenant \
        --cluster-environment worker \
        --context kind-worker \
        --tenant-context kind-main
    
  8. Create a Service Namespace named "services" in the Worker Cluster

    primazactl create service-namespace services \
        --version latest \
        --tenant primaza-mytenant \
        --cluster-environment worker \
        --context kind-worker \
        --tenant-context kind-main