Kubernetes deployment

Describes how to run Opik on a Kubernetes cluster

For production deployments, we recommend using our Kubernetes Helm chart. This chart is designed to be highly configurable and has been battle-tested in Comet’s managed cloud offering.

Prerequisites

In order to install Opik on a Kubernetes cluster, you will need to have the following tools installed:

Installation

You can install Opik using the helm chart maintained by the Opik team by running the following commands:

$# Add Opik Helm repo
>helm repo add opik https://comet-ml.github.io/opik/
>helm repo update
>
># You can set VERSION to the specific Opik version or leave it as 'latest'
>VERSION=latest
># Install Opik
>helm upgrade --install opik -n opik --create-namespace opik/opik \
> --set component.backend.image.tag=$VERSION \
> --set component.python-backend.image.tag=$VERSION \
> --set component.python-backend.env.PYTHON_CODE_EXECUTOR_IMAGE_TAG="$VERSION" \
> --set component.frontend.image.tag=$VERSION

You can port-forward any service you need to your local machine:

$kubectl port-forward -n opik svc/opik-frontend 5173

Opik will be available at http://localhost:5173.

Configuration

You can find a full list the configuration options in the helm chart documentation.

Advanced deployment options

Using external Clickhouse installation

Supported from Opik chart version 1.4.2

Configuration snippet for using external Clickhouse:

$opik:
> component:
> backend:
> ...
> env:
> ANALYTICS_DB_MIGRATIONS_URL: "jdbc:clickhouse://<YOUR CLICKHOUSE HOST>:8123"
> ANALYTICS_DB_HOST: "<YOUR CLICKHOUSE HOST>"
> initContainers:
> - name: wait-for-clickhouse-service
> image: stefanevinance/wait-for-200
> env:
> - name: URL
> value: http://<YOUR CLICKHOUSE HOST>:8123
>...
> clickhouse:
> enabled: false
Built with