From ebd9a940ed6f1ac386dd5ff1d30916a10cab7117 Mon Sep 17 00:00:00 2001 From: Volodymyr Stoiko Date: Mon, 16 Mar 2026 18:59:17 +0000 Subject: [PATCH] Add detailed docs for kubeshark irsa setup --- helm-chart/docs/snapshots_cloud_storage.md | 96 +++++++++++++++++++++- 1 file changed, 93 insertions(+), 3 deletions(-) diff --git a/helm-chart/docs/snapshots_cloud_storage.md b/helm-chart/docs/snapshots_cloud_storage.md index 09c6b9745..81f3cfb81 100644 --- a/helm-chart/docs/snapshots_cloud_storage.md +++ b/helm-chart/docs/snapshots_cloud_storage.md @@ -95,7 +95,85 @@ helm install kubeshark kubeshark/kubeshark \ ### Example: IRSA (recommended for EKS) -Create a ConfigMap with bucket configuration: +[IAM Roles for Service Accounts (IRSA)](https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html) lets EKS pods assume an IAM role without static credentials. EKS injects a short-lived token into the pod automatically. + +**Prerequisites:** + +1. Your EKS cluster must have an [OIDC provider](https://docs.aws.amazon.com/eks/latest/userguide/enable-iam-roles-for-service-accounts.html) associated with it. +2. An IAM role with a trust policy that allows the Kubeshark service account to assume it. + +**Step 1 — Create an IAM policy scoped to your bucket:** + +```json +{ + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": [ + "s3:GetObject", + "s3:PutObject", + "s3:DeleteObject", + "s3:GetObjectVersion", + "s3:DeleteObjectVersion", + "s3:ListBucket", + "s3:ListBucketVersions", + "s3:GetBucketLocation", + "s3:GetBucketVersioning" + ], + "Resource": [ + "arn:aws:s3:::my-kubeshark-snapshots", + "arn:aws:s3:::my-kubeshark-snapshots/*" + ] + } + ] +} +``` + +> For read-only access, remove `s3:PutObject`, `s3:DeleteObject`, and `s3:DeleteObjectVersion`. + +**Step 2 — Create an IAM role with IRSA trust policy:** + +```bash +# Get your cluster's OIDC provider URL +OIDC_PROVIDER=$(aws eks describe-cluster --name CLUSTER_NAME \ + --query "cluster.identity.oidc.issuer" --output text | sed 's|https://||') + +# Create a trust policy +# The default K8s SA name is "-service-account" (e.g. "kubeshark-service-account") +cat > trust-policy.json <