Skip to content

Commit bdf3762

Browse files
kubeseal: add page (#16030)
* Create kubeseal.md * Update kubeseal.md * Update kubeseal.md
1 parent 67b7b8f commit bdf3762

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

pages/common/kubeseal.md

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# kubeseal
2+
3+
> Client-side utility for encrypting Kubernetes secrets using the Bitnami Sealed Secrets controller.
4+
> Creates SealedSecret resources that can be safely stored in version control.
5+
> Requires a controller running in the cluster (e.g., installed via `kubectl apply -f controller.yaml`).
6+
> More information: <https://github.com/bitnami-labs/sealed-secrets>.
7+
8+
- Encrypt a Kubernetes secret from a YAML file into a SealedSecret (default JSON output):
9+
10+
`kubeseal < {{secret.yaml}} > {{sealedsecret.json}}`
11+
12+
- Encrypt a secret, outputting it in YAML or JSON format, using a bearer token for API authentication:
13+
14+
`kubeseal {{[-o|--format]}} {{yaml|json}} --token {{my-bearer-token}} < {{secret.yaml}} > {{sealedsecret.yaml}}`
15+
16+
- Seal a secret using a specific controller namespace of sealed-secrets controller and name:
17+
18+
`kubeseal --controller-namespace {{controller-namespace}} --controller-name {{controller-name}} < {{secret.yaml}} > {{sealedsecret.yaml}}`
19+
20+
- Encrypt a raw secret value from a file with a specified name and scope:
21+
22+
`kubeseal --raw --from-file {{path/to/secret.txt}} --name {{my-secret}} --scope {{strict|namespace-wide|cluster-wide}} > {{sealedsecret.yaml}}`
23+
24+
- Fetch the controller's public certificate for offline sealing with basic auth:
25+
26+
`kubeseal --fetch-cert --username {{username}} --password {{password}} > {{cert.pem}}`
27+
28+
- Seal a secret offline using a fetched certificate:
29+
30+
`kubeseal --cert {{cert.pem}} < {{secret.yaml}} > {{sealedsecret.yaml}}`
31+
32+
- Merge a secret into an existing SealedSecret file in-place:
33+
34+
`kubeseal --merge-into {{sealedsecret.yaml}} < {{secret.yaml}}`
35+
36+
- Validate a SealedSecret without applying it:
37+
38+
`kubeseal --validate < {{sealedsecret.yaml}}`

0 commit comments

Comments
 (0)