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: doc/dev_guide/create_aws_sts_setup_on_minikube.md
+46-34Lines changed: 46 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,36 +81,10 @@ ls -al
81
81
82
82
Note: every time you do `minikube delete` and `minikube start` you will need to create this new file (and the 2 files that are described in next steps).
83
83
84
-
### Creating AWS resources manually - Using the Amazon web console:
85
-
7. Create s3 bucket (you already did it in the step Initial Setup - Create S3 Bucket).
86
-
87
-
8. Create Identity Provider: IAM → Identity providers → Add provider → Provider type: choose OpenID Connect → Provider URL: paste the value of OPENID_BUCKET_URL → click on `Get thumbprint`` → Audience: api (type api in the field) → Click on add provider.
88
-
89
-
9. Create role: IAM → Roles → Create Role → Trusted entity type: Web Identity → Identity Provider should be the name of the provider that we added (with structure: https://<oidc_bucket_name>.s3.<aws_region>.amazonaws.com ) → Add the permission: `AmazonS3FullAccess`.
90
-
91
-
When you finish, check in the Trusted entities that you see:
10. In later steps you will need to provide the ARN of the role (you can easily copy it from AWS console, it looks like `arn:aws:iam::<id-account>:role/<role-name>` you can create a variable in the terminal:
105
-
106
-
```bash
107
-
OIDC_ROLE_ARN='<paste here you role ARN>'
108
-
```
109
-
110
84
### Build an OIDC configuration
111
85
Note: those steps were taken from [OCP 4.7 doc](https://docs.openshift.com/container-platform/4.7/authentication/managing_cloud_provider_credentials/cco-mode-sts.html#sts-mode-installing-manual-config_cco-mode-sts), there you can read the full explanations for each command).
112
86
113
-
11. Create a file named `keys.json` that contains the following information:
87
+
7. Create a file named `keys.json` that contains the following information:
### Creating AWS resources manually - Using the Amazon web console:
179
+
12. Create s3 bucket (you already did it in the step Initial Setup - Create S3 Bucket).
180
+
181
+
13. Create Identity Provider: IAM → Identity providers → Add provider → Provider type: choose OpenID Connect → Provider URL: paste the value of OPENID_BUCKET_URL → click on `Get thumbprint`` → Audience: api (type api in the field) → Click on add provider.
182
+
183
+
14. Create role: IAM → Roles → Create Role → Trusted entity type: Web Identity → Identity Provider should be the name of the provider that we added (with structure: https://<oidc_bucket_name>.s3.<aws_region>.amazonaws.com ) → Add the permission: `AmazonS3FullAccess`.
184
+
185
+
When you finish, check in the Trusted entities that you see:
15. In later steps you will need to provide the ARN of the role (you can easily copy it from AWS console, it looks like `arn:aws:iam::<id-account>:role/<role-name>` you can create a variable in the terminal:
199
+
200
+
```bash
201
+
OIDC_ROLE_ARN='<paste here you role ARN>'
202
+
```
203
+
204
204
### Test:
205
205
We would create an nginx pod and fetch the Service Account token from it and then run `assume-role-with-web-identity` and see that we can get the credentials.
206
206
207
-
15. Create a nginx pod
207
+
16. Create a nginx pod
208
208
209
209
```bash
210
210
kubectl apply -f - <<EOF
@@ -230,13 +230,13 @@ spec:
230
230
EOF
231
231
```
232
232
233
-
16. Fetch the Projected service account token and save it in `WEB_IDENTITY_TOKEN`.
233
+
17. Fetch the Projected service account token and save it in `WEB_IDENTITY_TOKEN`.
0 commit comments