Skip to content

Commit 3c5e88a

Browse files
committed
docs(review): weekly review
1 parent 378d8e6 commit 3c5e88a

File tree

1 file changed

+65
-49
lines changed

1 file changed

+65
-49
lines changed

identity-and-access-management/secret-manager/api-cli/external-secrets.mdx

Lines changed: 65 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,17 @@ In this tutorial you will learn how to deploy External Secrets and its services
3131
## Preparing the Kubernetes Kapsule cluster
3232

3333
1. Make sure you are connected to your cluster and that `kubectl` and `helm` are installed on your local machine.
34-
2. Add the External Secrets helm repository and update it using the following commands:
34+
2. Add the External Secrets repository to your Helm configuration and update it using the following commands:
3535
```
3636
helm repo add external-secrets https://charts.external-secrets.io
3737
helm repo update
3838
```
3939

4040
## Deploying External Secrets
4141

42-
To automatically install and manage the CRDs as part of your helm release, you must add the `--set installCRDs=true` flag to your helm installation command.
43-
Uncomment the relevant line in the next steps to enable this.
42+
Run the command below to deploy the External Secrets application in your cluster and create its associated resources.
43+
To automatically install and manage the CRDs as part of your Helm release, you must add the `--set installCRDs=true` flag to your Helm installation command.
44+
Uncomment the `--set installCRDs=true` line in the following command to do so.
4445
```
4546
helm upgrade --install external-secrets external-secrets/external-secrets \
4647
-n external-secrets \
@@ -59,53 +60,68 @@ kubectl create secret generic scwsm-secret --from-file=./access-key --from-file=
5960
```
6061
## Create your first SecretStore
6162

63+
Define a `SecretStore` resource in Kubernetes to inform External Secrets where to fetch secrets from.
6264
Secret Manager is a regionalized product so you will need to specify the [region](/identity-and-access-management/secret-manager/concepts/#region) to create your secret in.
6365

64-
```
65-
---
66-
apiVersion: external-secrets.io/v1beta1
67-
kind: SecretStore
68-
metadata:
69-
name: secret-store
70-
namespace: default
71-
spec:
72-
provider:
73-
scaleway:
74-
region: <REGION>
75-
projectId: <SCALEWAY_PROJECT_ID>
76-
accessKey:
77-
secretRef:
78-
name: scwsm-secret
79-
key: access-key
80-
secretKey:
81-
secretRef:
82-
name: scwsm-secret
83-
key: secret-access-key
84-
```
66+
1. Copy the template below and paste it in a file named `secret-store.yaml`.
67+
68+
```
69+
---
70+
apiVersion: external-secrets.io/v1beta1
71+
kind: SecretStore
72+
metadata:
73+
name: secret-store
74+
namespace: default
75+
spec:
76+
provider:
77+
scaleway:
78+
region: <REGION>
79+
projectId: <SCALEWAY_PROJECT_ID>
80+
accessKey:
81+
secretRef:
82+
name: scwsm-secret
83+
key: access-key
84+
secretKey:
85+
secretRef:
86+
name: scwsm-secret
87+
key: secret-access-key
88+
```
89+
2. Apply your file to your cluster:
90+
91+
```
92+
kubectl apply -f secret-store.yaml
93+
```
8594

8695
## Create your first External Secret
8796

88-
```
89-
---
90-
apiVersion: external-secrets.io/v1beta1
91-
kind: ExternalSecret
92-
metadata:
93-
name: secret
94-
namespace: default
95-
spec:
96-
refreshInterval: 20s
97-
secretStoreRef:
98-
kind: SecretStore
99-
name: secret-store
100-
target:
101-
name: kubernetes-secret-to-be-created
102-
creationPolicy: Owner
103-
data:
104-
- secretKey: password # key in the kubernetes secret
105-
remoteRef:
106-
key: id:<SECRET_ID in the secret store>
107-
version: latest_enabled
108-
```
97+
Create an `ExternalSecret` resource to specify which secret to fetch from Secret Manager.
98+
1. Copy the following template and paste it in a file named `external-secret.yaml`
99+
100+
```
101+
---
102+
apiVersion: external-secrets.io/v1beta1
103+
kind: ExternalSecret
104+
metadata:
105+
name: secret
106+
namespace: default
107+
spec:
108+
refreshInterval: 20s
109+
secretStoreRef:
110+
kind: SecretStore
111+
name: secret-store
112+
target:
113+
name: kubernetes-secret-to-be-created
114+
creationPolicy: Owner
115+
data:
116+
- secretKey: password # key in the kubernetes secret
117+
remoteRef:
118+
key: id:<SECRET_ID in the secret store>
119+
version: latest_enabled
120+
```
121+
2. Apply the file to your cluster:
122+
```
123+
kubectl apply -f external-secret.yaml
124+
```
109125

110126
A secret with the name `kubernetes-secret-to-be-created` should appear in your namespace. It contains the secret pulled from Secret Manager:
111127

@@ -117,17 +133,17 @@ kubernetes-secret-to-be-created Opaque 1 9m14s
117133

118134
## Uninstalling
119135

120-
Make sure you have deleted all external-secret resources you might have created beforehand. You can check for any existing resources with the following command:
136+
Make sure you have deleted any resources created by External Secrets beforehand. You can check for any existing resources with the following command:
121137

122138
```
123139
kubectl get SecretStores,ClusterSecretStores,ExternalSecrets,ClusterExternalSecret,PushSecret --all-namespaces
124140
```
125141

126-
Once all these resources have been deleted you are ready to uninstall external-secrets.
142+
Once all these resources have been deleted you are ready to uninstall External Secrets.
127143

128-
## Uninstalling with helm
144+
## Uninstalling with Helm
129145

130-
Uninstall the helm release using the following command.
146+
Uninstall the External Secrets deployment using the following command.
131147

132148
```
133149
helm delete external-secrets --namespace external-secrets

0 commit comments

Comments
 (0)