Skip to content

Install with Helm

The Aiven Operator for Kubernetes® can be installed with Helm. Before you start, make sure you have the prerequisites.

1. Add the Aiven Helm chart repository and update yoru local Helm information by running:

helm repo add aiven https://aiven.github.io/aiven-charts && helm repo update

2. Install Custom Resource Definitions (CRDs) by running:

helm install aiven-operator-crds aiven/aiven-operator-crds

3. To verify the installation, run:

kubectl api-resources --api-group=aiven.io

The output is similar to the following:

NAME                  SHORTNAMES   APIVERSION          NAMESPACED   KIND
connectionpools                    aiven.io/v1alpha1   true         ConnectionPool
databases                          aiven.io/v1alpha1   true         Database
...

4. To install the Aiven Operator, run:

helm install aiven-operator aiven/aiven-operator

Note

Installation will fail if webhooks are enabled and the CRDs for the cert-manager are not installed. Alternatively, you can install without webhooks enabled by running:

helm install aiven-operator aiven/aiven-operator --set webhooks.enabled=false

5. To verify the installation, run:

helm status aiven-operator

The output is similar to the following:

NAME: aiven-operator
LAST DEPLOYED: Fri Sep 10 15:23:26 2021
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None

6. To verify the operator pod is running, run:

kubectl get pod -l app.kubernetes.io/name=aiven-operator

Install without full cluster administrator access

If you don't have the necessary permissions to create cluster-wide resources such as ClusterRole and ClusterRoleBinding when installing the Helm chart, a cluster administrator can manually install these roles. This ensures that the operator can function properly.

Configuration options

Refer to the values.yaml file of the chart.

Restrict operator access to specific namespaces

You can configure the operator to monitor resources within specific namespaces. If the ClusterRole is enabled, it's bound to the operator's ServiceAccount within each watched namespace using a RoleBinding. This setup grants the operator the permissions specified in the ClusterRole, but only within the context of the specific namespaces where the RoleBinding is created.

Tune the reconcile interval

Once a resource is ready, the operator re-reconciles most kinds against the Aiven API on a fixed interval to pick up changes made outside Kubernetes. The default is 10 minutes. See which resources this affects below — the service kinds are not among them.

Set the pollInterval value to change it:

pollInterval: 30m

The accepted range is 10m to 60m. A value outside it is rejected at startup.

Which resources this affects

It does not apply to the service kinds — Clickhouse, Flink, Grafana, Kafka, KafkaConnect, MySQL, OpenSearch, PostgreSQL and Valkey. Those do not re-reconcile on a fixed interval at all at the moment.

Choose which controllers run

By default the operator runs a controller for every kind it supports, which requires every CRD to be installed. Set the controllers value to run only the ones you use. Kinds left out get no controller and no watch, so their CRDs need not be installed.

value meaning
unset or "*" all kinds (the default)
"Kafka,KafkaTopic" only these kinds
"*,-Flink,-Grafana" every kind except these

Kind names match the CRD kinds (Kafka, KafkaTopic, PostgreSQL, ...) and are case-insensitive. An unknown name, an exclusion without *, or a value that mixes both styles is rejected at startup. The error for an unknown name lists the valid kinds.

With --set, escape the commas, as in --set 'controllers=*\,-Flink', or use a values file.

A Kafka-only installation, for example:

controllers: "Kafka,KafkaTopic,KafkaACL,KafkaNativeACL,KafkaSchema,KafkaSchemaRegistryACL,KafkaQuota,KafkaConnect,KafkaConnector,ServiceUser"

Warning

A resource of a disabled kind is never reconciled. It keeps whatever status it had, and deleting it hangs on its finalizer until the kind is enabled again. Token secrets referenced only by disabled kinds are no longer protected from deletion: if such a secret is deleted, the resource cannot be deleted until the secret is recreated, unless the operator has a default token.

A resource that references a disabled kind through projectVPCRef or destinationEndpointRef fails with an error condition, because nothing would make the referenced resource ready. Enable the referenced kind (ProjectVPC, ServiceIntegrationEndpoint) or set the ID directly.