Skip to content

Commit 0e4f30a

Browse files
authored
Merge pull request #875 from snyk/docs/using-EKS-without-assigning-IAM-role-Node-Group
docs: alternative way to read a projected service account token
2 parents 49a268d + c06714c commit 0e4f30a

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

snyk-monitor/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,20 @@ If you prefer to override this, you can add your own list of namespaces to exclu
223223
--set excludedNamespaces="{kube-node-lease,kube-public,local-path-storage,some_namespace}"
224224
```
225225

226+
## Using EKS without assigning an IAM role to a Node Group
227+
228+
If you do not want to assign an IAM role to a Node Group, you can use the IAM role for Service Accounts and configure the snyk-monitor as follows:
229+
- Setting an IAM role for a service account: [IAM role for a Service Accounts](https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html)
230+
- Modify the fsGroup of the mounted EKS credentials in snyk-monitor to the user `nobody` (uid `65534`)
231+
- Annotate the snyk-monitor service account with the IAM role
232+
```shell
233+
helm upgrade --install snyk-monitor snyk-charts/snyk-monitor \
234+
--namespace snyk-monitor \
235+
--set securityContext.fsGroup=65534 \
236+
--set rbac.serviceAccount.annotations."eks.amazonaws.com/role-arn"="<iam role name>" \
237+
--set volumes.projected.serviceAccountToken=true
238+
```
239+
226240
## Using custom CA certificate
227241
You can provide custom CA certificates to use for validating TLS connections by adding them to a ConfigMap named snyk-monitor-certs. These additional certificates are used when pulling images from container registries.
228242

0 commit comments

Comments
 (0)