Install Cluster Operator

Instructions on installing cluster operator.

Prerequisites

Setup kubernetes clusters with Kind

Download kurator source and enter kurator directory.

git clone https://github.com/kurator-dev/kurator.git
cd kurator

Deploy a kubernetes cluster using kurator’s scripts.

$ hack/local-dev-setup.sh
reparing kind config in path: /tmp/tmp.xxxxx
...
Local clusters is running.

To start using your host cluster, run:
  export KUBECONFIG=/root/.kube/kurator-host.config

To manage your remote clusters, run:
  export KUBECONFIG=/root/.kube/kurator-member1.config or export KUBECONFIG=/root/.kube/kurator-member2.config

When the console displays the above content, it indicates your Kind cluster is ready, and at this point, the host cluster kurator-host will be used.

In addition, you can view the configuration files of the created clusters through this command.

$ ls /root/.kube/ | grep kurator
kurator-host.config
kurator-member1.config
kurator-member2.config

Install cert manager

Kurator cluster operator depends on cert manager CA injector.

Please make sure cert manager is ready before install cluster operator

helm repo add jetstack https://charts.jetstack.io
helm repo update
kubectl create namespace cert-manager
helm install -n cert-manager cert-manager jetstack/cert-manager --set installCRDs=true

Install from source

Build cluster operator image and helm chart:

VERSION=0.6.0 make docker
VERSION=0.6.0 make gen-chart

Load image to kind cluster:

kind load docker-image ghcr.io/kurator-dev/cluster-operator:0.6.0 --name kurator-host
kind load docker-image ghcr.io/kurator-dev/fleet-manager:0.6.0 --name kurator-host

Change directory to the helm charts

cd out/charts/

Install cluster operator into the management cluster.

helm install --create-namespace kurator-cluster-operator cluster-operator-0.6.0.tgz -n kurator-system

Verify the cluster operator chart installation:

$ kubectl get pod -l app.kubernetes.io/name=kurator-cluster-operator -n kurator-system
NAME                                        READY   STATUS    RESTARTS   AGE
kurator-cluster-operator-5977486c8f-7b5rc   1/1     Running   0          21h

Install cluster operator from release package

Go to Kurator release page to download the release package for your OS and extract.

curl -LO https://github.com/kurator-dev/kurator/releases/download/v0.6.0/cluster-operator-0.6.0.tgz

Install cluster operator into the management cluster.

helm install --create-namespace kurator-cluster-operator cluster-operator-0.6.0.tgz -n kurator-system

Verify the cluster operator chart installation:

$ kubectl get pod -l app.kubernetes.io/name=kurator-cluster-operator -n kurator-system
NAME                                        READY   STATUS    RESTARTS   AGE
kurator-cluster-operator-5977486c8f-7b5rc   1/1     Running   0          21h

Install cluster operator from helm repo

Configure the Helm repository:

helm repo add kurator https://kurator-dev.github.io/helm-charts
helm repo update

Install cluster operator into the management cluster.

helm install --create-namespace  kurator-cluster-operator kurator/cluster-operator --version=0.6.0 -n kurator-system 

Verify the cluster operator chart installation:

$ kubectl get pod -l app.kubernetes.io/name=kurator-cluster-operator -n kurator-system
NAME                                        READY   STATUS    RESTARTS   AGE
kurator-cluster-operator-5977486c8f-7b5rc   1/1     Running   0          21h

Try to deploy a cluster with cluster operator

Deploy cluster with kurator cluster operator.

Cleanup

helm uninstall kurator-cluster-operator -n kurator-system