sops_create_k8s_secret
Create SOPS-encrypted Kubernetes Secret manifests with readable metadata and encrypted stringData, ready for sops, ksops, or Flux to decrypt and apply.
Instructions
Create a Kubernetes Secret manifest (apiVersion v1, kind Secret) with its values under stringData, SOPS-encrypted so that only data/stringData is ciphertext and apiVersion, kind, metadata and type stay readable. The result decrypts with sops -d, ksops or Flux straight into an applyable manifest; commit it exactly as returned. Secrets take the same sources as sops_create_secrets. The file is create-only: every other mutation tool refuses it, so to change or rotate anything, call this tool again with the full set. Metadata (domain, sources, generation parameters, never a value) goes in the sops-mcp.privacyplaybook.com/meta annotation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | metadata.name: a lowercase RFC 1123 DNS subdomain | |
| type | No | Secret type, e.g. Opaque or kubernetes.io/tls | Opaque |
| domain | No | Name of the key domain to encrypt to / decrypt with. Optional. Defaults to the domain recorded in the file's _meta_unencrypted block, and failing that to 'default'. Call sops_list_domains to see what this server has configured. | |
| labels | No | metadata.labels (optional) | |
| secrets | Yes | Secrets to place under stringData | |
| namespace | No | metadata.namespace (optional): a lowercase RFC 1123 DNS label | |
| annotations | No | metadata.annotations (optional). sops-mcp.privacyplaybook.com/meta is reserved. |