Skip to content

Commit f04ff14

Browse files
Add Windows Powershell steps for updating aws-auth configmap
Add Windows Powershell steps for updating aws-auth config map
1 parent d7362b3 commit f04ff14

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

11-DevOps-with-AWS-Developer-Tools/README.md

+36
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,42 @@ kubectl patch configmap/aws-auth -n kube-system --patch "$(cat /tmp/aws-auth-pat
212212
kubectl get configmap aws-auth -o yaml -n kube-system
213213
```
214214

215+
### This is for the changing the Configmap with Windows PowerShell
216+
```t
217+
This is for the changing the Configmap and PowerShell
218+
219+
In PowerShell, the following steps can be used:
220+
221+
1. kubectl edit -n kube-system configmap/aws-auth
222+
2. In step1, there will be a file opened for you to edit configmap/aws-auth.
223+
In the opened file, there is a mapRoles field such as:
224+
data:
225+
mapRoles: |
226+
- rolearn: <ARN of instance role>
227+
username: system:node:{{EC2PrivateDNSName}}
228+
groups:
229+
- system:bootstrappers
230+
- system:nodes
231+
232+
3. Add the EksCodeBuildKubectlRole information into the mapRoles field of the file such as:
233+
data:
234+
mapRoles: |
235+
- rolearn: arn:aws:iam::018185988195:role/EksCodeBuildKubectlRole
236+
username: build
237+
groups:
238+
- system:masters
239+
- rolearn: <ARN of instance role (not instance profile)>
240+
username: system:node:{{EC2PrivateDNSName}}
241+
groups:
242+
- system:bootstrappers
243+
- system:nodes
244+
245+
Save the file.
246+
247+
248+
4. After the file is saved and closed, configmap/aws-auth has been edited. You can check configmap/aws-auth using the command "kubectl describe -n kube-system configmap/aws-auth".
249+
```
250+
215251
## Step-08: Review the buildspec.yml for CodeBuild & Environment Variables
216252

217253
### Code Build Introduction

0 commit comments

Comments
 (0)