> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superblocks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Kubernetes

> Estimated deployment time: 15 minutes

The Superblocks data plane can be deployed on any Kubernetes cluster with the Superblocks Helm chart. If your organization doesn't use Helm to manage Kubernetes resources, you can still install the [Helm CLI](https://helm.sh/docs/intro/install/) and use it to generate the [manifest templates](https://helm.sh/docs/helm/helm_template/) to deploy directly.

## Installation

### Add the chart repository

```bash theme={null}
helm repo add superblocks https://charts.superblocks.com/superblocks
helm repo update
```

### Configure values file

Create a local `values.yaml` file with the default chart values. You can export the defaults by running `helm show values superblocks/superblocks-agent > values.yaml`. Aside from the default settings, the following settings are required to enable Ingress and allow communication from your users to the agent running in the cluster.

```yaml theme={null}
superblocks:
  agentHostUrl: "https://SUBDOMAIN.DOMAIN.TLD"

  agentRedisPassword: "my-redis-password"
  # Existing agentRedisPassword secret must contain the value:
  # SUPERBLOCKS_AGENT_REDIS_PASSWORD: <my-redis-password>
  # agentRedisPasswordExistingSecret: "my-redis-password-secret", optional. Secret is created for you if not specified.

#(...)
service:
  # Use ClusterIP if your ingress controller routes traffic directly to pods.
  # Otherwise, update the service type based on your ingress controller settings.
  # For example, defaults for native cloud controllers require NodePort.
  type: ClusterIP
  ports:
    grpc: 8081
    http: 8080
    metrics: 9090

ingress:
  enabled: true
  class: "" # nginx
  annotations: {}
    # kubernetes.io/tls-acme: "true"
  
  hosts:
    - host: SUBDOMAIN.DOMAIN.TLD
      paths:
        - path: /
          pathType: Prefix
  tls: []
  # - secretName: chart-example-tls
  #   hosts:
  #     - SUBDOMAIN.DOMAIN.TLD
```

The values for `superblocks.agentHostUrl` and `ingress.hosts[0].host` should be the same DNS entry (CNAME or A record) that points to the [ingress-managed load balancer](https://kubernetes.io/docs/concepts/services-networking/ingress/#what-is-ingress) in front of the agent.

If you use the EU Superblocks instance, also set `superblocks.agentDataDomain` to `eu.superblocks.com`.

### Deploy the chart

Navigate to the [Setup Wizard](https://app.superblocks.com/opas) and click on the relevant Kubernetes tab for your platform (EKS, GKE, or AKS).

After making changes to `values.yaml`, save and deploy the chart. Adjust `superblocks.agentTags` as needed, as described in [Set agent tags](https://docs.superblocks.com/enterprise/hybrid-architecture/deployment/multiple_environments.md).

```bash theme={null}
helm upgrade -i -n superblocks superblocks-agent superblocks/superblocks-agent \
  --create-namespace \
  -f values.yaml \
  --set superblocks.agentKey='<AGENT_KEY>' \
  --set superblocks.agentTags='profile:*' \
  --set superblocks.agentDataDomain="app.superblocks.com"
```

## Billable services

When running the data plane on Kubernetes, it is important to be aware of your container management provider's pricing (i.e. [EKS](https://aws.amazon.com/eks/pricing/), [GKE](https://cloud.google.com/kubernetes-engine/pricing), [AKS](https://azure.microsoft.com/en-us/pricing/details/kubernetes-service/)) and the cost of any associated infrastructure like networking, load balancers, and DNS.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.