Skip to main content
The Aiven Operator for Kubernetes enables you to manage Aiven infrastructure using Kubernetes Custom Resource Definitions (CRDs). This brings Aiven services into your Kubernetes workflow, allowing you to define and manage them alongside your application deployments.

Why use the Kubernetes Operator

Native Kubernetes integration

Manage Aiven services using kubectl and standard Kubernetes workflows

GitOps compatible

Define services in YAML and manage them through version control

Automatic secret management

Connection credentials stored as Kubernetes Secrets

Declarative configuration

Define desired state; the operator handles the rest

Prerequisites

Installation

1

Create authentication token

Generate a token from the Aiven Console under User Profile > Tokens
2

Create Kubernetes Secret

Store your token as a Kubernetes Secret:
3

Add Helm repository

4

Install the operator

5

Verify installation

You should see the operator pod running:

Quick start: Deploy PostgreSQL

Create an Aiven for PostgreSQL service using the operator:
1

Create service definition

Create a file named postgres.yaml:
postgres.yaml
2

Apply the resource

3

Check service status

Wait for the STATE to become RUNNING:
4

Get connection information

The operator automatically creates a Secret with connection details:

Using the service from a pod

Connect to your Aiven service from within Kubernetes:
pod-example.yaml
Apply and check logs:

Service examples

Apache Kafka

Kafka Topic

MySQL

OpenSearch

Redis

Project management

Create and manage Aiven projects:

Service integrations

Integrate services together:

Advanced configurations

VPC

Use VPC in a service:

Connection pooling

Managing secrets

Connection information

The operator creates Kubernetes Secrets containing:

Using secrets in deployments

Monitoring and troubleshooting

Check operator logs

Check resource status

Common issues

Check the service status in Aiven Console or increase the timeout:
Look for error messages in the status conditions.
Verify the token is correct and has necessary permissions:
Delete and recreate the resource:

Clean up

Remove resources:
1

Delete services

This also deletes the services in Aiven
2

Uninstall operator

3

Remove namespace

GitOps with ArgoCD

Example ArgoCD Application:

Best practices

Organize services by environment:
Use external secret managers:
Use consistent naming: