Databases

How-to import Databases

Databases can be imported in the operator. Credentials are stored in Kubernetes secrets from which the KubernetesCluster collection access to connect to the clusters.

Requirements

  • The database credentials

Process

Zookeeper

1. Create resource

Define the Database resource with the following YAML, and save it as database.yaml:

apiVersion: assets.astronetes.io/v1alpha1
kind: Database
metadata:
  name: zookeeper
spec:
  zookeeper:
    client:
      servers:
        - 172.18.0.4:30181
        - 172.18.0.5:30181
        - 172.18.0.6:30181

Deploy the resource with the following command:

kubectl create -f database.yaml