---
name: "kubernetes-sealed-secrets-gitops"
description: "Encrypt Kubernetes secrets with asymmetric cryptography to commit them safely into Git."
metadata:
  author: "Bitnami Labs"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "encrypt secret with kubeseal"
  - "install sealed-secrets controller"
  - "gitops secret management"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Bitnami Sealed Secrets Asymmetric Encryption for Git

Implements Bitnami Sealed Secrets: encrypting secrets offline using kubeseal CLI and public controller certificate, committing SealedSecret manifests to Git, and letting the cluster controller decrypt into native Secrets.

## When to Invoke
Invoke this skill whenever you need to:
- encrypt secret with kubeseal
- install sealed-secrets controller
- gitops secret management

## Execution SOP & Rules
1. Install Sealed Secrets controller in kube-system namespace.
2. Fetch controller public key: kubeseal --fetch-cert > pub-sealed-secrets.pem.
3. Encrypt raw secret: kubectl create secret generic db-pass --dry-run=client --from-literal=pass=... -o yaml | kubeseal --cert pub-sealed-secrets.pem > sealed-secret.yaml.
4. Commit sealed-secret.yaml to Git repository and let GitOps controller deploy it.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
