NDB Operator 8.0 Manual  /  Installation of NDB Operator  /  Installing NDB Operator Using Helm

2.3 Installing NDB Operator Using Helm

You can install NDB Operator with the Helm package manager for Kubernetes using the Helm chart included in the NDB Operator distribution to create the necessary Custom Resource Definitions (CRDs) and to deploy NDB Operator (together with the web hook server) in a Kubernetes cluster. You can set a number of options in the Helm chart affecting the installation; these are described later in this section.

The remainder of this section assumes that Helm is available on the system. If Helm is not already present, see https://helm.sh/docs/intro/install/ for information about obtaining and installing it.

The NDB Operator Helm repository is hosted at https://mysql.github.io/mysql-ndb-operator/. To add the chart repository, execute the following commands:

> helm repo add ndb-operator-repo https://mysql.github.io/mysql-ndb-operator/
> helm repo update

To install the chart with the release name ndbop, use helm install as shown here:

> helm install --namespace=ndb-operator --create-namespace ndbop ndb-operator-repo/ndb-operator

To install NDB Operator from the source code, use the helm install command as shown here:

> helm install ndbop deploy/charts/ndb-operator

This creates the CRD and required resources, and deploys NDB Operator and the web hook server to the default namespace.

Use the command's --namespace option to deploy the operator to a specific namespace. Here, we deploy to the ndb-operator namespace:

> helm install --namespace=ndb-operator --create-namespace ndbop deploy/charts/ndb-operator

The NDB Operator Helm chart contains the configurable parameters described in the following list:

  • clusterScoped: Scope of the Ndb Operator.

    If this is set to true (the default), the operator has cluster scope, and watches for changes to any NdbCluster resource across all namespaces. If it is false, the operator has namespace scope, and watches for changes only in the namespace to which it applies.

  • image: The operator image name to be deployed by the Helm chart. By default, the Helm chart deploys the image from mysql/ndb-operator:latest.

    If you want to host the NDB Operator image in a private registry and use it from there, the image location can be set in this parameter.

  • imagePullPolicy: NDB Operator image pull policy. Permitted values are Always, Never, and IfNotPresent; the default is IfNotPresent.

  • imagePullSecretName: Secret to be used when pulling the NDB Operator image from a private repository.

    This is used only if the image parameter specifies an Operator image hosted in a private registry. Otherwise, it is ignored. There is no default value.

These options can be set using the --set argument of the Helm install command. For example:

> helm install --set imagePullPolicy=Always ndbop deploy/charts/ndb-operator