Skip to main content
Deploy Bifrost on Kubernetes using Terraform. This guide breaks down the deployment into individual components for better understanding.
Bifrost also provides a ready-to-use Terraform module that handles all the infrastructure setup for you. You can use it directly from GitHub:
See the Terraform module README for full documentation and examples.
If you are using Postgres/MySQL for config and log store, you can skip the Volume configuration and permission changes sections.
If you use PostgreSQL for config_store or logs_store, ensure the target database is UTF8 encoded. See PostgreSQL UTF8 Requirement.
These examples assume that the appropriate cloud and Kubernetes providers are configured and that the referenced input variables are declared in your Terraform project.
Values written to kubernetes_secret resources are stored in Terraform state. Protect the state with encrypted remote storage and restricted access, or use an external secrets manager.

1. Volume Configuration

Create an EBS volume, persistent volume, and persistent volume claim for Bifrost data storage.
This static persistent volume example is intended for standard EKS clusters using the Amazon EBS CSI driver (ebs.csi.aws.com). Install the EKS add-on before applying it. It does not apply to EKS Auto Mode, which uses a different provisioner and requires separate storage configuration and migration steps. Changing only the storage class is not sufficient.

2. Configuration Secret

Create a Kubernetes secret to store Bifrost configuration with Postgres backend.
This configuration uses Postgres for both config store and logs store. The secret is mounted as a file at /app/data/config.json in the container.

3. Deployment Configuration

Create the Bifrost deployment with proper security contexts and volume mounts.
Volume Permissions: The deployment includes an init container that sets proper ownership (1000:1000) and permissions (755) on the mounted volume. This ensures the Bifrost container can read/write to the volume.
  • fs_group: 1000 sets the volume’s group ownership
  • run_as_user: 1000 runs the container as non-root user
  • Init container runs as root to fix permissions before the main container starts

4. Service Configuration

Create a Kubernetes service to expose the Bifrost deployment.

Combined Resource Configuration

Here’s the Terraform resource configuration combining all components. Provider configuration and variable declarations remain in your Terraform project.