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
After applying this module to create the AWS Identity providers and roles, theres more to be done in
4
+
order for your Github Actions pipeline to have permissions to an EKS cluster. You will need to
5
+
give permission to this role to the EKS cluster.
6
+
7
+
How to identify what the problem is.
8
+
9
+
# Your pipeline runs and fails
10
+
When the pipeline is trying to reach out to the EKS cluster, it fails to authenticate.
11
+
12
+

13
+
14
+
You can look at the `CloudWatch` logs and determine what it failed on.
15
+
Go to in the AWS console: `cloudwatch -> Log Group -> <cluster> -> authenticator-xxx logs`
16
+
17
+
Search for the word denied and something like this will come up:
18
+
```
19
+
time="2022-01-04T21:29:45Z" level=warning msg="access denied" arn="arn:aws:iam::xxxx:role/github_oidc" client="127.0.0.1:34720" error="ARN is not mapped: arn:aws:iam::xxxx:role/github_oidc" method=POST path=/authenticate sts=sts.amazonaws.com
20
+
```
21
+
22
+
This means that your EKS cluster don't have this role mapped and dont know it should trust it.
23
+
24
+
You will need to add this into your EKS cluster's role map.
25
+
26
+
If you are using `kubernetes-ops`' EKS Terraform module, you can add it here: https://github.com/ManagedKube/kubernetes-ops/blob/main/terraform-modules/aws/eks/variables.tf#L53
27
+
28
+
It will be similar to the based Terraform EKS module and add in:
29
+
30
+
```
31
+
[
32
+
{
33
+
rolearn = "arn:aws:iam::xxxx:role/github_oidc"
34
+
username = "github"
35
+
groups = ["system:masters"]
36
+
},
37
+
]
38
+
```
39
+
40
+
Apply this and your cluster will allow this AWS IAM role perform actions on the EKS cluster.
0 commit comments