Install with Helm

Use helm to install and manage kaspr-operator and related CRDs in your Kubernetes cluster.

Prerequisites

  • Kubernetes 1.16+
  • Helm 3.x

Installation Modes

The Kaspr Operator can be installed in either cluster-scoped or namespace-scoped mode.

  • When installed in cluster-scoped mode, the operator will watch for Kaspr resources across all namespaces.
  • When installed in namespace-scoped mode, the operator will only watch for Kaspr resources in the same namespace where the operator is installed.

By default, the operator is installed in cluster-scoped mode. To install the operator in namespace-scoped mode, set the watchAnyNamespace option to false.

Depending on which mode is used, either the ClusterRole or Role and ClusterRoleBinding or RoleBinding resources are created respectively.

Installation Steps

Download the helm chart

git clone https://github.com/totalwinelabs/kaspr-helm.git
cd kaspr-helm

Install the operator

The general syntax for helm installation is:

helm install <release> <chart> --namespace <namespace> --create-namespace [--set <other_parameters>]

The variables specified in the command are as follows:

  • <chart> A path to a packaged chart, a path to an unpacked chart directory or a URL.
  • <release> A name to identify and manage the Helm chart once installed.
  • <namespace> The namespace in which the chart is to be installed.
  • Default configuration values can be changed using one or more --set <parameter>=<value> arguments. Alternatively, you can specify several parameters in a custom values file using the —values <file> argument.
helm install kaspr-operator charts/operator \
    --set operator.watchAnyNamespace=true \
    -n kaspr-operator \
    --create-namespace
ℹ️

This will install the operator in a dedicated kaspr-operator namespace using default options which is sufficient for most deployments. However, you can override options to customize the deployment according to your needs. See values.yaml for all possible configuration options.

Custom Resource Definitions (CRDs)

CRDs are included in the operator helm chart and will be automatically installed with the operator. However, they need to be manually updated or removed when necessary.

  • Updating CRDs
kubectl apply -f ./charts/operator/crds
  • Deleting CRDs
kubectl delete -f ./charts/operator/crds

Uninstall the Operator

helm uninstall kaspr-operator -n kaspr-operator
ℹ️

Helm will not delete Kaspr CRDs. You will need to manually delete these if necessary.