Skip to main content

Single cluster

One of the most powerful features of Kratix is its ability to handle requests for Resources, and deploy them to a remote specific cluster. However, Kratix also works well in a single cluster environment. This guide will walk you through the steps to install Kratix on a single cluster.

Bootstrap the cluster

You will need access to a Kubernetes cluster to deploy Kratix. If you'd like to test Kratix in your local machine, you can create a cluster with minikube.

minikube start
export PLATFORM=minikube

Install cert-manager

Kratix requires cert-manager to be installed in the Platform cluster. If you already have it installed, skip to the next section.

To install it, run:

kubectl --context $PLATFORM apply --filename https://github.com/cert-manager/cert-manager/releases/download/v1.12.0/cert-manager.yaml

Make sure that cert-manager is ready before installing Kratix:

$ kubectl --context $PLATFORM get pods --namespace cert-manager
NAME READY STATUS RESTARTS AGE
cert-manager-7476c8fcf4-r8cnd 1/1 Running 0 19s
cert-manager-cainjector-bdd866bd4-7d8zp 1/1 Running 0 19s
cert-manager-webhook-5655dcfb4b-54r49 1/1 Running 0 19s

Install Kratix

Install Kratix and its Dependencies with the command below:

kubectl apply --filename https://github.com/syntasso/kratix/releases/latest/download/install-all-in-one.yaml

The above will install Kratix, MinIO, and FluxCD. MinIO will be the State Store for the Kratix to write to and FluxCD will watch the MinIO Bucket for any changes that need to be applied to the cluster. Kratix supports a variety of State Stores and multiple different State Stores can be used.

You can also install Kratix via Helm. For more information, see the Helm Chart documentation.

Alternative install instructions

To install Kratix and MinIO separately, run the commands below:

# Install Kratix
kubectl apply --filename https://github.com/syntasso/kratix/releases/latest/download/kratix.yaml

# Install MinIO
kubectl apply --filename https://raw.githubusercontent.com/syntasso/kratix/main/hack/platform/minio-install.yaml

# Install Flux
kubectl apply --filename https://raw.githubusercontent.com/syntasso/kratix/main/hack/destination/gitops-tk-install.yaml

Configure the Platform

Once Kratix is installed, you can register Kubernetes clusters where workloads should run. On single cluster installations, the same cluster performs the role of the Platform and the worker clusters. The commands below will register the cluster as a Destination, as well as configure FluxCD to watch for the cluster's State Store:

kubectl apply --filename https://github.com/syntasso/kratix/releases/latest/download/config-all-in-one.yaml
Alternative install instructions

To register the minikube cluster as a Kratix Destination, run the command below:

kubectl apply --filename https://raw.githubusercontent.com/syntasso/kratix/main/config/samples/platform_v1alpha1_bucketstatestore.yaml
kubectl apply --filename https://raw.githubusercontent.com/syntasso/kratix/main/config/samples/platform_v1alpha1_worker.yaml

You can then install and configure Flux with the commands below:

# Install the GitOps toolkit
kubectl apply --filename https://raw.githubusercontent.com/syntasso/kratix/main/hack/destination/gitops-tk-resources-single-cluster.yaml

Once Flux is installed and running (this may take a few minutes), the Kratix resources should now be visible on the your cluster. You can verify its readiness by observing the kratix-worker-system namespace appearing in the cluster:

$ kubectl get namespace kratix-worker-system
NAME STATUS AGE
kratix-worker-system Active 1m

🎉 Congratulations! Kratix is now ready to receive Promises requests for Resources. Jump to Installing and using a Promise to spin up your first as-a-service offering.