Database
Prerequisites¶
- A Kubernetes cluster with the operator installed using helm, kubectl or kind (for local development).
- A Kubernetes Secret with an Aiven authentication token.
Required permissions¶
To create and manage this resource, you must have the appropriate roles or permissions. See the Aiven documentation for details on managing permissions.
This resource uses the following API operations, and for each operation, any of the listed permissions is sufficient:
| Operation | Permissions |
|---|---|
| ServiceDatabaseCreate | developer or operator |
| ServiceDatabaseDelete | developer or operator |
| ServiceDatabaseList | developer or operator, or read_only |
| ServiceGet | project:services:read |
Usage example¶
Apply the resource with:
Verify the newly created Database:
The output is similar to the following:
Database¶
Database is the Schema for the databases API.
Required
apiVersion(string). Valueaiven.io/v1alpha1.kind(string). ValueDatabase.metadata(object). Data that identifies the object, including anamestring and optionalnamespace.spec(object). DatabaseSpec defines the desired state of Database. See below for nested schema.
spec¶
Appears on Database.
DatabaseSpec defines the desired state of Database.
Required
project(string, Immutable, Pattern:^[a-zA-Z0-9_-]+$, MaxLength: 63). Identifies the project this resource belongs to.serviceName(string, Immutable, Pattern:^[a-z][-a-z0-9]+$, MaxLength: 63). Specifies the name of the service that this resource belongs to.
Optional
authSecretRef(object). Authentication reference to Aiven token in a secret. See below for nested schema.databaseName(string, Immutable, Pattern:^[a-zA-Z0-9_][a-zA-Z0-9_-]{0,39}$, MaxLength: 40). DatabaseName is the name of the database to be created.lcCollate(string, Immutable, MaxLength: 128, Default value:en_US.UTF-8). Default string sort order (LC_COLLATE) of the database. Default value: en_US.UTF-8.lcCtype(string, Immutable, MaxLength: 128, Default value:en_US.UTF-8). Default character classification (LC_CTYPE) of the database. Default value: en_US.UTF-8.terminationProtection(boolean). It is a Kubernetes side deletion protections, which prevents the database from being deleted by Kubernetes. It is recommended to enable this for any production databases containing critical data.
authSecretRef¶
Appears on spec.
Authentication reference to Aiven token in a secret.
Required