@@ -134,26 +134,6 @@ generic aws-secret \
134
134
--from-file=creds=./aws-credentials.txt
135
135
```
136
136
137
- View the secret with ` kubectl describe secret `
138
-
139
- {{< hint type="note" >}}
140
- The size may be larger if there are extra blank spaces in your text file.
141
- {{< /hint >}}
142
-
143
- ``` shell {copy-lines="1"}
144
- kubectl describe secret aws-secret -n crossplane-system
145
- Name: aws-secret
146
- Namespace: crossplane-system
147
- Labels: < none>
148
- Annotations: < none>
149
-
150
- Type: Opaque
151
-
152
- Data
153
- ====
154
- creds: 114 bytes
155
- ```
156
-
157
137
## Create a ProviderConfig
158
138
A {{< hover label="providerconfig" line="3">}}ProviderConfig{{</ hover >}}
159
139
customizes the settings of the AWS Provider.
180
160
This attaches the AWS credentials, saved as a Kubernetes secret, as a
181
161
{{< hover label="providerconfig" line="9">}}secretRef{{</ hover>}}.
182
162
183
- The
184
- {{< hover label="providerconfig" line="11">}}spec.credentials.secretRef.name{{< /hover >}}
185
- value is the name of the Kubernetes secret containing the AWS credentials in the
186
- {{< hover label="providerconfig" line="10">}}spec.credentials.secretRef.namespace{{< /hover >}}.
187
-
188
163
## Create a namespace
189
164
Before we can create our namespaced S3 bucket managed resource, we must create a
190
165
namespace for it.
@@ -214,19 +189,10 @@ spec:
214
189
EOF
215
190
```
216
191
217
- The {{< hover label="xr" line="2">}}apiVersion{{< /hover >}} and
218
- {{< hover label="xr" line="3">}}kind{{</hover >}} are from the provider's CRDs.
219
-
220
192
The {{< hover label="xr" line="6">}}metadata.generateName{{< /hover >}} gives a
221
193
pattern that the provider will use to create a unique name for the bucket in S3.
222
194
The generated name will look like ` crossplane-bucket-<hash> ` .
223
195
224
- The {{< hover label="xr" line="9">}}spec.forProvider.region{{< /hover >}} tells
225
- AWS which AWS region to use when deploying resources.
226
-
227
- The region can be any
228
- [ AWS Regional endpoint] ( https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints ) code.
229
-
230
196
Use ` kubectl -n crossplane-aws-app get buckets.s3.aws.m.upbound.io ` to verify Crossplane created the bucket.
231
197
232
198
{{< hint type="tip" >}}
@@ -241,7 +207,7 @@ crossplane-bucket-7tfcj True True crossplane-bucket-7tfcj 3m4s
241
207
```
242
208
243
209
## Delete the managed resource
244
- Before shutting down your Kubernetes cluster, delete the S3 bucket just created.
210
+ Before shutting down your Kubernetes cluster, delete the S3 bucket that was just created.
245
211
246
212
Use ` kubectl -n crossplane-aws-app delete buckets.s3.aws.m.upbound.io <bucketname> ` to remove the bucket.
247
213
0 commit comments