I repeated got unauthorized errors from the cluster until I updated the rolearn to arn:aws:iam::XXXXXXXXXXXX:role/gitlab-runner. After that change my access worked as expected.
If it makes a difference, I'm using assume-role on our gitlab-runner, and using aws eks update-kubeconfig --region=us-east-1 --name=my-cluster to get kubectl configured.
I have a role with an ARN that looks like this:
arn:aws:iam::XXXXXXXXXXXX:role/gitlab-ci/gitlab-runner
. My aws-auth configmap was as follow:I repeated got unauthorized errors from the cluster until I updated the
rolearn
toarn:aws:iam::XXXXXXXXXXXX:role/gitlab-runner
. After that change my access worked as expected.If it makes a difference, I'm using assume-role on our gitlab-runner, and using
aws eks update-kubeconfig --region=us-east-1 --name=my-cluster
to get kubectl configured.