# Kubernetes

Source: https://docs.interop.io/bridge/deployment/kubernetes/index.html

## Overview

**io.Bridge** is available as a Docker image that can be deployed in a Kubernetes environment.

## Helm Chart

To deploy **io.Bridge** in a Kubernetes environment, you can use the [Helm](https://helm.sh) package manager for Kubernetes. **io.Bridge** provides a Helm chart for Kubernetes deployment. The Helm chart is hosted at the GitHub Container Registry at `ghcr.io/interopio/charts/io-bridge`.

> ℹ️ *For details on using the Helm package manager, see the [official Helm documentation](https://helm.sh/docs/).*

### Usage

The following example demonstrates how to log in the registry and pull a specific version of the **io.Bridge** Helm chart:

```cmd
helm registry login ghcr.io

helm pull oci://ghcr.io/interopio/charts/io-bridge --version 0.0.3-beta
```

The following example demonstrates how to install a specific version of the **io.Bridge** Helm chart and create a namespace and a name for the Helm release:

```cmd
helm install --namespace interop-io-bridge --generate-name oci://ghcr.io/interopio/charts/io-bridge --version 0.0.3-beta
```

The following example demonstrates how to uninstall the **io.Bridge** Helm chart:

```cmd
helm uninstall io-bridge
```

### Configuration

The available configuration options for deploying **io.Bridge** are listed in the `values.yaml` file of the **io.Bridge** Helm chart. You can override the default values by using the `--set` flag when installing the chart or by using the `-f` or the `--values` flag to provide your custom YAML configuration file.

The following example demonstrates how to modify the number of **io.Bridge** nodes to be deployed in the cluster by using the `--set` flag to override the `cluster.memberCount` property specified in the default `values.yaml` file:

```cmd
helm install my-io-bridge-release oci://ghcr.io/interopio/charts/io-bridge --set cluster.memberCount=4
```

The following example demonstrates how to provide your own custom YAML configuration file when installing the **io.Bridge** Helm chart:

```cmd
helm install my-io-bridge-release oci://ghcr.io/interopio/charts/io-bridge -f my-values.yaml
```

## Image Variants

The **io.Bridge** Docker image is available in three variants based on different base images: `alpine`, `trixie-slim`, and `trixie`. All variants are functionally identical and differ only in the underlying operating system and package manager. All image variants are available for both `amd64` and `arm64` architectures.

> ⚠️ *Note that it's generally recommended to use the Debian Trixie variants for production unless minimizing the container image size is an absolute priority.*

### Alpine

The `alpine` variant is based on [Alpine Linux](https://alpinelinux.org/) and uses [`musl libc`](https://musl.libc.org/) instead of `glibc`. Alpine images are significantly smaller in size, making them ideal for resource-constrained environments where minimizing image size and potential vulnerabilities is a priority.

> ⚠️ *Note that the `alpine` variant may not be suitable if you require compatibility with native libraries and extensions that depend on `glibc`. In such cases, it recommended to use the `trixie-slim` variant.*

The following example demonstrates how to configure the **io.Bridge** Helm chart to use the Alpine image variant by overriding the `image.tag` property:

```cmd
helm install my-io-bridge-release oci://ghcr.io/interopio/charts/io-bridge --set image.tag=1.1.3-alpine
```

The following example demonstrates how to specify the Alpine image variant in a custom `values.yaml` configuration file:

```yaml
image:
  registry: "ghcr.io"
  repository: "interopio/bridge"
  tag: "1.1.3-alpine"
  pullPolicy: IfNotPresent
```

### Trixie Slim

The `trixie-slim` variant is based on [Debian Trixie](https://www.debian.org/) with non-essential packages removed. It uses `glibc`, which offers broader compatibility with native libraries and extensions. This variant provides a good balance between image size and compatibility.

The following example demonstrates how to configure the **io.Bridge** Helm chart to use the `trixie-slim` image variant by overriding the `image.tag` property:

```cmd
helm install my-io-bridge-release oci://ghcr.io/interopio/charts/io-bridge --set image.tag=1.1.3-trixie-slim
```

The following example demonstrates how to specify the `trixie-slim` image variant in a custom `values.yaml` configuration file:

```yaml
image:
  registry: "ghcr.io"
  repository: "interopio/bridge"
  tag: "1.1.3-trixie-slim"
  pullPolicy: IfNotPresent
```

### Trixie

The `trixie` variant is based on the full [Debian Trixie](https://www.debian.org/) image. It uses `glibc` and includes standard system packages, making it the most compatible option for environments that require additional OS-level tools or libraries.

The following example demonstrates how to configure the **io.Bridge** Helm chart to use the `trixie` image variant by overriding the `image.tag` property:

```cmd
helm install my-io-bridge-release oci://ghcr.io/interopio/charts/io-bridge --set image.tag=1.1.3-trixie
```

The following example demonstrates how to specify the `trixie` image variant in a custom `values.yaml` configuration file:

```yaml
image:
  registry: "ghcr.io"
  repository: "interopio/bridge"
  tag: "1.1.3-trixie"
  pullPolicy: IfNotPresent
```
