Kubernetes

Install AnsibleForms and its MySQL database with the Helm chart

  1. Prerequisites
  2. 1. Get the chart values
  3. 2. Configure the storage
  4. 3. Set the credentials
  5. 4. Install the chart
  6. 5. Check the install
  7. 6. Open AnsibleForms
  8. 7. Sign in
  9. Next steps

The Helm chart deploys AnsibleForms with MySQL (see the values reference).

Prerequisites

Before you start, you need:

  • Kubernetes cluster : with kubectl configured to reach it
  • Helm 3 : to install and upgrade the chart
  • Storage : a StorageClass for dynamic provisioning, or pre-created PersistentVolumes
  • Ingress controller : only if you want to expose AnsibleForms through an ingress

1. Get the chart values

Fetch the chart’s default values into a file of your own, from the chart repository or from the OCI registry:

helm repo add ansibleforms https://ansibleforms.com/helm-charts/
helm repo update
helm show values ansibleforms/ansibleforms > my_values.yaml

2. Configure the storage

Both AnsibleForms and MySQL store their data on a persistent volume. Set the StorageClass and size of each:

storages:
  server:
    className: longhorn
    size: 5Gi
    accessMode: ReadWriteOnce
  mysql:
    className: longhorn
    size: 5Gi
    accessMode: ReadWriteOnce

An empty className uses the cluster’s default StorageClass. The access mode defaults to ReadWriteMany, which many storage classes do not offer; ReadWriteOnce is fine with a single replica. For pre-created PersistentVolumes, see the chart’s README.

3. Set the credentials

AnsibleForms needs an admin account, a database password and an ENCRYPTION_SECRET, the key that encrypts the credentials stored in AnsibleForms. Never change that key once data exists. Supply them in one of three ways:

Set them in my_values.yaml. The chart stores them in a Secret named <release>-secrets:

applications:
  server:
    env:
      ADMIN_USERNAME: admin
      ADMIN_PASSWORD: a-strong-password
      ENCRYPTION_SECRET: a-random-string-of-32-characters
  mysql:
    password: a-strong-database-password

4. Install the chart

Install the chart into its own namespace with your values:

helm upgrade --install ansibleforms ansibleforms/ansibleforms \
  --namespace ansibleforms --create-namespace \
  --values my_values.yaml

With the OCI registry, use oci://ghcr.io/ansibleforms/charts/ansibleforms as the chart. In anything that runs unattended, pin the chart version with --version, so that a new release is never installed on its own.

5. Check the install

The chart includes a test that checks both the web server and the database connection:

helm test ansibleforms --namespace ansibleforms --logs

The test ends with OK when AnsibleForms answers and its database accepts connections.

6. Open AnsibleForms

How you reach AnsibleForms depends on how the server is exposed:

With the default ClusterIP service and no ingress, nothing is exposed outside the cluster. Forward a local port to have a look:

kubectl -n ansibleforms port-forward svc/ansibleforms-server 8080:80

Then open http://127.0.0.1:8080/.

7. Sign in

Sign in as the admin user, admin by default. To read the password from the Secret:

kubectl -n ansibleforms get secret ansibleforms-secrets \
  -o jsonpath='{.data.ADMIN_PASSWORD}' | base64 -d

With secrets.existingSecret, read it from your own Secret instead.

Next steps

The chart’s README covers the rest of the configuration:

  • Your own database : set mysql.enabled: false and point AnsibleForms at an existing MySQL server
  • Forms from ConfigMaps : provide config.yaml and the form files through ConfigMaps
  • HTTPS behind an ingress, resources, node placement and private registries

To move to a newer release, see Upgrading on Kubernetes.


Copyright © 2023-2026 AnsibleForms. All rights reserved.

This site uses Just the Docs, a documentation theme for Jekyll.