Skip to main content
In this lesson we configure Bitnami Sealed Secrets with Flux so you can store encrypted secrets in Git and let Flux apply them to your cluster. This walkthrough assumes you are working in the bb-apps-source repository and want Flux to install the Bitnami Sealed Secrets Helm chart from the Bitnami Labs Helm repository. Key topics covered:
  • Registering the Bitnami Helm repository with Flux
  • Creating a Flux Kustomization to install Sealed Secrets
  • Verifying the Sealed Secrets controller
  • Installing the kubeseal CLI and obtaining the controller public certificate
  • Sealing secrets locally and committing sealed manifests to Git
Relevant links:

1. Checkout the infrastructure branch

Switch to the infrastructure branch in your bb-app-source repository:

2. HelmRepository (Bitnami Sealed Secrets)

In your infrastructure Git repo, create a HelmRepository that points at the Bitnami Sealed Secrets Helm chart index. Example HelmRepository YAML:
Place this file under the path you use for infrastructure manifests (for example, create a bitnami-sealed-secrets folder inside the infrastructure branch and put the YAML there). Quick mapping of repository layout (example):

3. Create a Flux Kustomization in the cluster repo

In the repository that holds your Flux cluster configuration (for example block-buster/flux-clusters/dev-cluster) create a Kustomization that tells Flux to pull the bitnami-sealed-secrets path from the infra-source-git GitRepository you previously configured. Example Kustomization YAML (exported from flux create kustomization):
Or generate the YAML from the CLI and export it:
This Kustomization instructs Flux to watch the infra-source-git repository and apply manifests under ./bitnami-sealed-secrets.

4. Reconcile Flux sources (optional manual reconcile)

After committing and pushing the Kustomization to your cluster repo, you can manually reconcile the Git source to accelerate propagation into the cluster:
After these commands, check Flux logs or the Kustomization status to confirm resources were fetched and applied.

5. Confirm the Sealed Secrets controller is installed

The Helm chart will install the Sealed Secrets controller, commonly into the kube-system namespace (depending on chart values). Verify the controller deployment, service and pods:
Example relevant output (trimmed):
The controller also creates a Kubernetes Secret containing its TLS private key and public certificate—these are used for sealing/unsealing operations.

6. Install kubeseal CLI locally

To create sealed secrets locally you need the kubeseal CLI. Download, extract and place it on your PATH. Example (Linux, using v0.19.5—use the latest stable release in production):
If you prefer a package manager, use Homebrew, apt, or your platform’s package manager to install kubeseal and avoid manual downloads.

7. Obtain the controller public certificate

To encrypt (seal) secrets you only need the Sealed Secrets controller’s public certificate. You can fetch it directly with kubeseal (recommended) or extract it from the controller Secret. Recommended approach — fetch the PEM certificate with kubeseal:
This writes the controller’s public certificate (PEM format) to sealed-secret.pub. Keep this file; use it locally to create sealed secrets for this cluster. Alternative: extract the certificate from the controller secret manually:
Important: Do not expose the controller private key (tls.key). Only the public certificate (tls.crt) is required for sealing secrets. The private key must remain secret to prevent unsealing compromise.

8. What’s next

With the public certificate downloaded (sealed-secret.pub) and kubeseal installed you can:
  1. Create plaintext Kubernetes Secret manifests (or use kubectl create secret to make them).
  2. Use kubeseal --cert sealed-secret.pub to convert those secrets into SealedSecret manifests.
  3. Commit the sealed-secret YAML files to your infrastructure Git repo under the bitnami-sealed-secrets path so Flux will apply them to the cluster.
Example high-level commands (seal a secret.yaml into sealed-secret.yaml):
Once pushed, Flux will pick up the sealed secret and apply it — the Sealed Secrets controller will decrypt it into a regular Kubernetes Secret inside the cluster. That’s all for this lesson. Follow the links above for more details on Flux and Bitnami Sealed Secrets, and adopt a secure workflow for managing sealed secrets in Git.

Watch Video