Skip to content

Kubernetes

This guide will walk you through the process of deploying Epsio in an Kubernetes environment.

Before you begin

Before proceeding with the deployment guide, ensure that you have the following:

  • A prepared database instance (see previous steps in the "getting started" section for more details).
  • A Kubernetes cluster that can provision persistent volumes.
  • A token retrieved from Epsio's cloud console.

Epsio Operator currently only supports Epsio Deployments of version 21.0.0 and above.


1. Install the Epsio Operator

1.1 Create a Kubernetes namespace for Epsio

To ensure the Epsio operator is separated from other components, we recommend creating a dedicated namespace for Epsio. You can use an existing namespace as long as it does not contain an existing Epsio operator.

kubectl create namespace <epsio-namespace>

1.2 Install the Epsio Operator

Epsio for Kubernetes bundle is published as a single YAML file. To install the Epsio operator, run the following command:

# https://docs.epsio.io/about/operator_release_notes/
EPSIO_OPERATOR_VERSION=v1.0.3

kubectl apply -n <epsio-namespace> -f https://storage.googleapis.com/epsio/k8s/$EPSIO_OPERATOR_VERSION/epsio-operator-definition.yaml

Epsio for Kubernetes is also available as a Helm chart. To install the Epsio operator using Helm, run the following command:

helm install epsio-operator oci://us-docker.pkg.dev/epsio-io/helm/epsio-operator --namespace <epsio-namespace>

1.3 Verify the Epsio Operator is running

Check the operator deployment to verify it’s running in your namespace:

kubectl get deployment -n <epsio-namespace> epsio-operator-deployment
You should see a result similar to this:
NAME                        READY   UP-TO-DATE   AVAILABLE   AGE
epsio-operator-deployment   1/1     1            1           5m12s

2. Deploy Epsio

An Epsio deployment is created from an Epsio custom resource that contains deployment specifications.

2.1 Create necessary secrets

Epsio requires two secrets to be created in order to connect to your database:

  • epsio-account-token - Your account's access token which can be retrieved from the cloud console settings page / create new deployment page.
  • epsio-user-secret - The password of the epsio_user you created in step 1.

To create the secrets, run the following commands:

kubectl create -n <epsio_namespace> secret generic epsio-account-token --from-literal=token=<your_account_token>
kubectl create -n <epsio_namespace> secret generic epsio-user-secret --from-literal=password=<your-password>

2.2 Deploy Epsio instance

Create a file (my-epsio.yaml) that defines an Epsio:

apiVersion: epsio.io/v1
kind: Epsio
metadata:
    name: example-epsio
spec:
    version: "<your-desired-version>" # Minimum 21.0.0

    accountTokenSecret: epsio-account-token

    databases:
      - name: db-1
        dbType: <postgres|mysql> # Change to your database type
        host: <db1-host>
        port: 5432
        dbName: <db1-name>
        passwordSecretName: epsio-user-secret

    #   For multisource deployments (Enterprise tier only), you can also add databases as sources:
    #     Min version required for multisource : 22.0.0-multisource
    #   - name: source-db-2
    #     roles:
    #       - 'source'
    #     dbType: <postgres|mysql> # Change to your database type
    #     host: <db1-host>
    #     port: 5432
    #     dbName: <db1-name>
    #     passwordSecretName: epsio-user-secret

    storage:
        size: 100Gi # Change to your desired storage size
        storageClass: <your-storage-class> # Change to your desired storage class

    resources:
        memory: "8Gi" # Change to your desired memory size
        cpu: "4" # Change to your desired CPU size

And run the following command to apply the Epsio CRD:

kubectl apply -n <epsio-namespace> -f my-epsio.yaml

To install the Epsio instance via Helm, run the following command:

helm install epsio-instance oci://us-docker.pkg.dev/epsio-io/helm/epsio-instance --values <values.yaml> --namespace <namespace>

Replace <values.yaml> with the path to your values file. To retrieve the default values of an Epsio instance, you can run the following command:

helm inspect values oci://us-docker.pkg.dev/epsio-io/helm/epsio-instance

2.4 Verify Epsio is running

Check the deployment to verify it’s running in your namespace:

kubectl get statefulset -n <epsio-namespace> example-epsio
You should see a result similar to this:
NAME            READY   AGE
example-epsio   1/1     13m

Congratulations! You've successfully deployed Epsio.


You are set to go and can create your first view. Visit the create_view for further details.

Troubleshooting

To troubleshoot, check the Epsio deployment logs:

kubectl -n <epsio-namespace> logs example-epsio-0