You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guide/k8s-secret.md
+10-11Lines changed: 10 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,31 +17,35 @@ To get started, ensure you have the following:
17
17
18
18
This guide will focus on using the Mac specifications. If you use a Linux OS, follow the instructions in the [Linux Markdown files.](https://github.com/stateful/blog-examples/blob/main/kubernetes/k8s-secret/sealed-secret/linux-sealedsecrets.md)
19
19
20
-
21
20
### Install all Dependencies
22
21
23
22
To follow up on securing your secrets using sealed secrets, ensure you install the necessary dependencies in the notebook's prerequisite section. In your Runme cell, run the commands below to install all dependencies required for this guide.
### **Encrypt a Secret in Runme**[](https://docs-runme-55rq3q1vz-stateful.vercel.app/guide/k8s-secret#encrypt-a-secret)
26
30
27
31
To encrypt a secret, you must create a Kubernetes secret using `kubeseal`. Navigate to your cloned repo's ‘Encrypt a Secret’ section and [choose your preferred encryption method from the options provided.](https://github.com/stateful/blog-examples/blob/main/kubernetes/k8s-secret/sealed-secret/Mac-sealedsecret.md#encrypt-a-secret) Once that is done, run the command below in your Runme cell.
28
32
29
-
30
33
Runme will automatically create a sealed secret resource containing the encrypted data, the **`mysealedsecret.yaml`**
31
34
32
35
### Adding New Value to A Secret
33
36
34
37
You can add a new value to your secret by navigating to [this section](https://github.com/stateful/blog-examples/blob/main/kubernetes/k8s-secret/sealed-secret/Mac-sealedsecret.md#adding-a-new-value-to-a-sealed-secret) and executing the commands. You only need to update your manifest file with the new values, re-encrypt the secrets, and then reapply them to the cluster. All of these can be executed in your Runme cell. The image below shows a visual representation of this process.
35
38
36
-
37
-
38
-
39
39
From the output gotten, you can see that your new value has successfully been added.
### Decrypt a Secret[](https://docs-runme-55rq3q1vz-stateful.vercel.app/guide/k8s-secret#decrypt-a-secret)
42
44
43
45
To retrieve the original version of `runme-secrets.yaml`, you can decrypt the encrypted secret, `mysealedsecret.yaml`. Run the command in the ‘Decrypt a Secret’ section of the repo and run it in your Runme cell.
To delete the secret, use the `kubectl` command to delete the resource and run it in your Runme cell.
@@ -50,12 +54,11 @@ To delete the secret, use the `kubectl` command to delete the resource and run
50
54
kubectl delete -f mysealedsecret.yaml
51
55
```
52
56
53
-
54
57
### **Deploy the Sealed Secret**[](https://docs-runme-55rq3q1vz-stateful.vercel.app/guide/k8s-secret#deploy-the-sealed-secret)
55
58
56
59
To deploy your secret, execute the code below:
57
60
58
-
```
61
+
```sh
59
62
kubectl apply -f mysealedsecret.yaml
60
63
```
61
64
@@ -75,7 +78,3 @@ Some [key features](https://docs.runme.dev/getting-started/features) of Runme th
75
78
- Run code in your preferred language.
76
79
77
80
These are just a few of the things you can achieve in Runme. To explore Runme more, visit the [Runme Documentation](https://docs.runme.dev/), where you can embark on a guided journey to a more secure Kubernetes environment.
0 commit comments