EKS Pod Identity Not Working: Agent, Association and Trust Policy

Logeshwaran
—

EKS Pod Identity not working means the AWS credentials never reached your pod; one of four links in the chain is broken.

The short version: check in order. (1) The eks-pod-identity-agent add-on is installed and running on Linux EC2 nodes; Fargate and Windows nodes aren’t supported. (2) An association exists for the exact namespace and service account the pod uses. (3) The IAM role trusts pods.eks.amazonaws.com with sts:AssumeRole and sts:TagSession. (4) The pod started after the association: restart it, then look for AWS_CONTAINER_CREDENTIALS_FULL_URI in its environment. The node role also needs eks-auth:AssumeRoleForPodIdentity, which AmazonEKSWorkerNodePolicy includes.

Quick answer: Check the cluster version and compute type; verify the EKS Pod Identity Agent; list the exact cluster/namespace/service-account association; inspect the role trust policy for pods.eks.amazonaws.com, sts:AssumeRole, and sts:TagSession; restart affected pods; then inspect container credential variables and run aws sts get-caller-identity from a compatible debug container. Do not use this mechanism for Fargate pods.

Jake: "My EKS application says it cannot read a secret. I attached Secrets Manager permissions to its IAM role. Why does it still fail?"

Ethan: "We first need to prove the pod actually received that role. A correct permission policy does nothing if the identity association or agent is broken."

What EKS Pod Identity does in plain English

A Kubernetes service account identifies a workload inside the cluster. An AWS IAM role authorizes AWS API operations. EKS Pod Identity bridges the two through an association managed by the EKS service. A pod does not receive permanent IAM keys, and it does not need application code that explicitly calls STS. Instead, a compatible AWS SDK uses a container credential provider to retrieve short-lived credentials. Those credentials are scoped by the IAM role policies and any applicable resource policies.

The Pod Identity Agent runs on eligible Linux EC2 worker nodes as a DaemonSet. It serves a local credentials endpoint. Behind the scenes, the agent requests credentials from EKS Auth using its node permissions, and EKS Auth assumes the associated IAM role. The application receives temporary credentials automatically through the normal AWS SDK provider chain. EKS Auto Mode includes this capability without installing the agent as a separate add-on.

The chain to troubleshoot is: application and default credential chain → injected container variables and token → node-local agent → EKS Auth service → association → role trust → identity and resource permissions → destination AWS service. Diagnose from the left to the right before editing a Secrets Manager policy.

Pod Identity versus IRSA: different trust and token flows

QuestionEKS Pod IdentityIAM Roles for Service Accounts (IRSA)
Cluster IAM OIDC providerNot requiredRequired
Runtime componentEKS Pod Identity Agent on supported nodesEKS service-account token projection and admission integration
IAM trust principalService: pods.eks.amazonaws.comFederated: cluster IAM OIDC provider
STS actionAssumeRole and TagSession through EKS AuthAssumeRoleWithWebIdentity
Injected variablesAWS_CONTAINER_CREDENTIALS_FULL_URI and AWS_CONTAINER_AUTHORIZATION_TOKEN_FILEAWS_ROLE_ARN and AWS_WEB_IDENTITY_TOKEN_FILE
Fargate podsNot supportedSupported with appropriate setup
Role reuseCan create associations to the same-account role in multiple clustersTrust must include each cluster OIDC provider

An IRSA trust policy copied into a Pod Identity role will not repair it. The two use different principals, different request actions, and different credential discovery. Both methods may coexist in a cluster, but a particular workload should have an intentionally chosen credential path. A pre-existing IRSA web-identity provider or environment credentials can take precedence over the Pod Identity container provider and confuse tests.

You will fix this fastest by checking the layers in the order your credentials travel. Here is that order.

The fastest ordered diagnostic checklist

OrderCommand or placeWhat failure suggests
1. Supported platformaws eks describe-cluster; kubectl get pods -o wideOld platform, Fargate or unsupported node type
2. Agentaws eks describe-addon; kubectl get daemonset -n kube-systemMissing, unscheduled or crashing agent
3. Associationaws eks list-pod-identity-associationsWrong namespace, name, role or cluster
4. Service accountkubectl get pod -o jsonpath; kubectl get saPod not using the account you associated
5. IAM trustaws iam get-roleWrong principal or missing STS actions
6. Fresh pod injectionkubectl rollout restart deploymentOld pod predates association
7. Container identityenv; aws sts get-caller-identitySDK precedence, missing agent or bad node access
8. Service permissionaws secretsmanager get-secret-valueRole exists but lacks Secrets Manager or KMS permission

Use this sequence, so you change one layer at a time instead of three at once. Record the exact cluster, Region, namespace, service-account name, pod name and IAM role ARN. If the error changes from "Unable to locate credentials" to "AccessDeniedException" on Secrets Manager, that is progress: credential delivery likely works and the remaining problem is authorization.

First confirm the cluster version and compute environment

aws eks describe-cluster --name demo-prod --region us-east-1 \
  --query 'cluster.{Version:version,Platform:platformVersion,Status:status}'
kubectl get nodes -o wide
kubectl get pods -A -o wide | grep invoice-api

Check both the Kubernetes and EKS platform versions rather than relying on a blog that quotes a single historic minimum. Kubernetes 1.28 needs platform version eks.4 or later; versions not listed in the support table work on all their platform versions. The documentation changes as EKS releases versions, so confirm the supported platform for the exact cluster.

EKS Pod Identity is supported on Linux EC2 worker nodes, not Fargate pods or Windows EC2 worker nodes. A Fargate-only deployment must use an appropriate alternative such as IRSA. An application scheduled on Fargate will not suddenly begin receiving Pod Identity credentials merely because you installed the EKS add-on.

Verify that the Pod Identity Agent add-on exists

aws eks describe-addon --cluster-name demo-prod \
  --addon-name eks-pod-identity-agent --region us-east-1
kubectl -n kube-system get daemonset eks-pod-identity-agent
kubectl -n kube-system get pods -l app.kubernetes.io/name=eks-pod-identity-agent -o wide

A missing add-on is a common cause on ordinary EKS EC2-backed clusters. Check the add-on status, version, health issues and the DaemonSet desired versus ready count. If it is missing, select a compatible version from the EKS add-on version catalog and install the managed add-on. A basic AWS CLI installation is shown below; omit an explicit version to let EKS select a suitable default where supported.

aws eks create-addon --cluster-name demo-prod \
  --addon-name eks-pod-identity-agent --region us-east-1
aws eks describe-addon --cluster-name demo-prod \
  --addon-name eks-pod-identity-agent --region us-east-1

Leave the agent without an IRSA service-account role ARN. Its node IAM role needs permission to call eks-auth:AssumeRoleForPodIdentity. The AWS-managed AmazonEKSWorkerNodePolicy includes this permission; restricted node roles may need a carefully scoped custom statement.

If the agent is installed but failing, read its logs

kubectl -n kube-system describe daemonset eks-pod-identity-agent
kubectl -n kube-system get pods -o wide | grep eks-pod-identity-agent
kubectl -n kube-system logs daemonset/eks-pod-identity-agent --all-containers=true --tail=120
kubectl -n kube-system get events --sort-by=.lastTimestamp | tail -30

Look for failed image pulls, resource shortages, unsupported architecture, DNS/network failures, permission errors against EKS Auth, and address-binding problems. The agent uses a node-local link-local endpoint (169.254.170.23) and also binds IPv6 unless configured otherwise. Where IPv6 is disabled, use the add-on configuration setting for IPv4-only nodes rather than repeatedly restarting a crashing DaemonSet.

Nodes in isolated private subnets must reach the regional EKS Auth API, typically using the com.amazonaws.REGION.eks-auth interface VPC endpoint with private DNS and appropriate endpoint security groups. The ordinary EKS control-plane endpoint is not a substitute for the EKS Auth endpoint. ECR image connectivity is also needed when your agent image must be pulled.

Confirm the association is for the exact namespace and service account

aws eks list-pod-identity-associations \
  --cluster-name demo-prod --region us-east-1
kubectl -n payments get deployment invoice-api \
  -o jsonpath='{.spec.template.spec.serviceAccountName}{"\n"}'
kubectl -n payments get serviceaccount invoice-reader -o yaml

The tuple is cluster + namespace + service-account name. A service account called invoice-reader in default is different from invoice-reader in payments. An association created in staging does nothing for a pod in production. Verify your workload YAML, not merely the intended name in a Terraform variable. A blank serviceAccountName may mean the pod uses the namespace default service account.

aws eks create-pod-identity-association \
  --cluster-name demo-prod \
  --namespace payments \
  --service-account invoice-reader \
  --role-arn arn:aws:iam::111122223333:role/payments-secrets-reader \
  --region us-east-1

The caller creating this association needs suitable EKS permissions and iam:PassRole for the target IAM role. A valid association does not itself attach IAM permissions to the role. It only selects which role the workload should receive.

Inspect the IAM role trust policy, not just its permission policy

aws iam get-role --role-name payments-secrets-reader \
  --query 'Role.AssumeRolePolicyDocument' --output json

Your trust policy must allow the EKS Pod Identity service principal and both required STS actions. The following is the essential working shape, shown without additional organization-specific conditions. Replace role and account values in subsequent commands; the Service principal itself stays exactly as shown, with no account-specific values.

{
  "Version": "2012-10-17",
  "Statement": [{
    "Sid": "AllowPodIdentity",
    "Effect": "Allow",
    "Principal": {"Service": "pods.eks.amazonaws.com"},
    "Action": ["sts:AssumeRole", "sts:TagSession"]
  }]
}

A role that trusts sts.amazonaws.com, eks.amazonaws.com or an OIDC federated principal is not automatically suitable for Pod Identity. You can add conditions using AWS session request tags such as aws:RequestTag/kubernetes-namespace and aws:RequestTag/kubernetes-service-account. Organization-scoping conditions such as aws:SourceOrgId add protection where they fit your setup. Test condition keys carefully, because a typo can make a correct association fail.

{
  "Version": "2012-10-17",
  "Statement": [{
    "Effect": "Allow",
    "Principal": {"Service": "pods.eks.amazonaws.com"},
    "Action": ["sts:AssumeRole", "sts:TagSession"],
    "Condition": {"StringEquals": {
      "aws:RequestTag/kubernetes-namespace": "payments",
      "aws:RequestTag/kubernetes-service-account": "invoice-reader"
    }}
  }]
}

If your association and trust policy both look right, check when your pod started. This one catches almost everyone.

Restart pods created before the association existed

kubectl -n payments rollout restart deployment/invoice-api
kubectl -n payments rollout status deployment/invoice-api
kubectl -n payments get pods -o wide

The pod admission process injects the credentials URI, token path and token volume into new matching pods. If the association was created after an existing pod started, that already-running pod may lack the injection. Restarting its deployment is the predictable fix. A Deployment rolling restart recreates pods; it does not require deleting the service account or rebooting every EC2 node.

For StatefulSets, Jobs or bare pods, plan a replacement appropriate to the controller and application availability. Verify that the association is correct before restarting repeatedly. An old pod cannot be repaired merely by changing a configuration value inside an unrelated application ConfigMap.

Inspect the injected container environment variables

kubectl -n payments exec deploy/invoice-api -- sh -c \
  'env | grep -E "^AWS_CONTAINER_|^AWS_ROLE_ARN=|^AWS_WEB_IDENTITY_TOKEN_FILE=" || true'
kubectl -n payments exec deploy/invoice-api -- sh -c \
  'test -r "$AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE" && echo "Pod Identity token readable"'

For Pod Identity, expect AWS_CONTAINER_CREDENTIALS_FULL_URI to point to the local agent, commonly http://169.254.170.23/v1/credentials, and AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE to reference the projected Pod Identity token. Keep your token and credentials out of shared logs. If these variables are missing, investigate association match and pod age. If the variables exist but credentials cannot be retrieved, check the node agent, EKS Auth access, SDK version and host networking.

If AWS_ROLE_ARN and AWS_WEB_IDENTITY_TOKEN_FILE are also present, investigate IRSA configuration and the credential provider order. Static AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables can override Pod Identity and are a security risk when bundled into workload manifests.

Verify the identity used by the real application

kubectl -n payments exec deploy/invoice-api -- aws sts get-caller-identity
kubectl -n payments exec deploy/invoice-api -- python -c \
  'import boto3; print(boto3.client("sts").get_caller_identity()["Arn"])'

The application container may not include the AWS CLI or Python. If so, use a temporary diagnostic pod built from an approved image with a current AWS CLI, scheduled onto an eligible EC2 node with the same service account. A generic kubectl run command uses the default service account unless you set serviceAccountName in the pod spec. A failed CLI check in a slim container with no CLI installed is not evidence of a Pod Identity failure.

A healthy caller identity generally shows an assumed-role ARN referencing payments-secrets-reader. If it shows the node role, inspect IMDS access and SDK precedence. If it shows another workload role, find the hidden earlier credential source. If credentials are available yet secretsmanager:GetSecretValue still fails, proceed to policy-level checks rather than reinstalling the add-on.

Use supported AWS SDK versions and the default provider chain

The SDK must understand the container credentials provider used by Pod Identity. For Python, the minimum versions with Pod Identity support are boto3 1.34.41 and botocore 1.34.41; newer releases are better. Supported AWS CLI v2 begins at 2.15.0. Other languages have different minimum versions. Verify inside your actual container image—not on your laptop or CI runner.

python -c 'import boto3,botocore; print(boto3.__version__,botocore.__version__)'
aws --version

Initialize the client normally: boto3.client("secretsmanager", region_name="us-east-1"). Keep long-lived access keys out of your code. Leave out any profile that exists on your laptop but not in the container. AWS credential discovery is ordered, so explicitly supplied keys, profiles or IRSA variables can cause a correctly injected Pod Identity configuration to be ignored.

Fix node IAM permissions and EKS Auth connectivity

aws iam list-attached-role-policies --role-name EKSNodeRole
aws ec2 describe-vpc-endpoints --filters \
  Name=service-name,Values=com.amazonaws.us-east-1.eks-auth \
  --region us-east-1

Your node must be authorized to call eks-auth:AssumeRoleForPodIdentity. With a custom minimum-permission node role, confirm that action is present. In private subnets without suitable NAT, create an EKS Auth interface VPC endpoint, enable private DNS where appropriate, and ensure security groups allow HTTPS from worker nodes to the endpoint. Your agent also needs image pulls from the appropriate ECR endpoints or through NAT during startup.

The credentials URI is local to a node, but that does not mean the credentials can be obtained entirely offline. The agent exchanges the pod token through EKS Auth. An endpoint DNS failure, HTTP timeout or blocked port 443 can therefore present as an application credential timeout rather than a friendly AWS message about VPC routing.

Here is one failure followed from start to finish, so you can see each check in the order you would run it.

Work through a complete Secrets Manager failure example

Imagine an invoice processing service running as Deployment payments/invoice-api. It uses serviceAccountName: invoice-reader. A developer created an IAM role with Secrets Manager read permission, but the pod logs say it cannot find credentials. The developer checks AWS Secrets Manager first and finds that the secret exists. The actual failure sits several layers earlier.

Jake: "The secret is there, and the policy looks right. Should I make the policy broader?"

Ethan: "No. The error says the application has no credentials at all. We should first prove the association, then the trust, then the runtime identity."

aws eks describe-addon --cluster-name demo-prod \
  --addon-name eks-pod-identity-agent --region us-east-1
aws eks list-pod-identity-associations \
  --cluster-name demo-prod --region us-east-1
kubectl -n payments get deploy invoice-api \
  -o jsonpath='{.spec.template.spec.serviceAccountName}{"\n"}'

The agent is Running. The association list contains payments/invoice-readonly but the deployment uses payments/invoice-reader. This one-character identity mismatch means the pod receives no credentials at all. Correct the association after confirming the intended service account, and ensure the role trust contains the Pod Identity principal.

aws eks create-pod-identity-association \
  --cluster-name demo-prod --namespace payments \
  --service-account invoice-reader \
  --role-arn arn:aws:iam::111122223333:role/payments-secrets-reader \
  --region us-east-1
kubectl -n payments rollout restart deployment/invoice-api
kubectl -n payments rollout status deployment/invoice-api

Now add only the target secret read permission. The example grants access to a specific secret ARN pattern; replace it with the actual ARN. If your secret is encrypted with a customer-managed KMS key, separately allow kms:Decrypt under your IAM and key policies. The secret ARN suffix can change if the secret is recreated, so confirm its live ARN.

{
  "Version":"2012-10-17",
  "Statement":[{
    "Effect":"Allow",
    "Action":"secretsmanager:GetSecretValue",
    "Resource":"arn:aws:secretsmanager:us-east-1:111122223333:secret:payments/invoice-api-*"
  }]
}
kubectl -n payments exec deploy/invoice-api -- aws sts get-caller-identity
kubectl -n payments exec deploy/invoice-api -- \
  aws secretsmanager describe-secret \
  --secret-id payments/invoice-api --region us-east-1

For a controlled validation, retrieve a harmless test secret rather than printing production secret values to a terminal or CI log. A service returning success proves credentials and permissions are working. The resolution is complete when the pod’s assumed role matches the intended role and the real application reads its secret without hard-coded keys. Note that DescribeSecret requires its own IAM permission; for a least-privilege GetSecretValue-only role, perform the actual read without displaying its contents instead.

Running IRSA and Pod Identity side by side

Existing IRSA workloads can continue while new EC2-backed workloads adopt Pod Identity. They can move one workload at a time. However, migration should be service-account by service-account, with explicit checkpoints. First establish the Pod Identity agent and role trust, then create an association, deploy a fresh pod, and prove the assumed role. Only after that remove the service account’s eks.amazonaws.com/role-arn annotation, any IRSA-specific environment variables, and no-longer-needed role configuration.

An existing pod keeps its credential provider until you replace it. The SDK chain may continue using IRSA or static credentials ahead of Pod Identity, and projected environment variables are normally injected at pod creation. During coexistence, include provider-source inspection in your testing; otherwise your application may seem healthy even though the new association is not being used.

Jake: "Can I leave the old IRSA annotation until I know the new path works?"

Ethan: "Yes for a staged rollout, but check the assumed identity. Merely adding the new association does not prove the pod switched credential sources."

Can the same IAM role work across clusters?

Yes, within the same AWS account, you can associate a suitable IAM role to different service accounts in multiple EKS clusters without adding each cluster’s OIDC provider to the trust policy. That is a practical difference from IRSA. The cluster, namespace and service account associations are still separate EKS objects, and each workload must have its own fresh pods with injection.

For least privilege, reuse a role only for pods that genuinely need identical access. Where apps in different clusters have different data permissions, create separate roles or tighten trust with permitted request tags. The role in an EKS Pod Identity association must live in the same AWS account as the cluster. If your pod needs resources in another account, the association can also name a target IAM role in that account (--target-role-arn), and EKS does the role chaining for you. The target role has to trust your Pod Identity role, so check both trust policies when cross-account calls fail. Resource-based policies on the destination service are the other option.

Why an association exists but the pod still gets AccessDenied

AccessDenied has two very different meanings. An EKS Auth or STS denial while obtaining credentials indicates a trust or agent authorization problem. An AccessDeniedException returned by Secrets Manager, S3 or DynamoDB after the caller identity is known indicates an application permission issue. Use CloudTrail to identify the specific action and principal, then inspect IAM policies, permissions boundaries, service control policies, resource policies and KMS key policies when applicable.

Fix the credential delivery itself; granting secretsmanager:* to your node role only hides it. That can inadvertently expand privileges for other workloads on the node, hides the underlying problem and weakens isolation. Keep application permissions on your workload role, agent permissions on your node role and node metadata access appropriately restricted.

Diagnostic matrix for common errors

SymptomLikely causeNext check
No AWS_CONTAINER_* variablesNo matching association at pod creationNamespace/service account/rollout
Container URI present; timeoutAgent unavailable or networking to EKS AuthDaemonSet logs, private VPC endpoint
EKS Auth AccessDeniedNode permission or IAM trust conditioneks-auth action, role trust tags
Credential provider not foundOld SDK or explicit provider overrideSDK version and environment
Caller identity is node roleIMDS fallback or credential precedencePod variables and node metadata restrictions
Correct assumed role, secret deniedMissing IAM, key or resource permissionCloudTrail and destination policy
Pod Identity works on EC2, not FargateUnsupported compute platformMove pod or use IRSA
Agent CrashLoop with IPv6 disabledListener configuration mismatchSupported agent IPv6 disable setting

Useful kubectl and AWS CLI commands to keep together

# Inspect pod and service account
kubectl -n payments describe pod POD_NAME
kubectl -n payments get pod POD_NAME -o yaml
kubectl -n payments get serviceaccount invoice-reader -o yaml

# Check agent and its logs
kubectl -n kube-system get daemonset eks-pod-identity-agent
kubectl -n kube-system logs daemonset/eks-pod-identity-agent --tail=200

# Check association and role trust
aws eks list-pod-identity-associations --cluster-name demo-prod
aws iam get-role --role-name payments-secrets-reader \
  --query Role.AssumeRolePolicyDocument

# Refresh deployment
kubectl -n payments rollout restart deployment/invoice-api

Commands assume you have AWS CLI credentials, a current kubectl context, and authority to inspect the cluster. Confirm your current AWS account and kubectl context before writing associations or restarting workloads. Production changes should be peer reviewed, especially role trust changes that might authorize new workloads.

How to diagnose a problem on a fully private EKS cluster

Private cluster networking often produces deceptively application-level symptoms. The pod contacts a local credential endpoint, but the local agent must communicate with EKS Auth. Your EKS Auth endpoint must have valid private DNS resolution, reachable endpoint network interfaces and a security group allowing HTTPS from node sources. A restrictive network ACL can block return traffic. An available EKS API endpoint alone does not fulfill the EKS Auth dependency.

Inspect your agent logs, confirm endpoint VPC and subnets, and test name resolution and HTTPS reachability from your node environment with approved operational tools. A 403 response can be an IAM policy or endpoint policy issue; a timeout suggests connectivity. Keep your VPC security group rules as they are while you diagnose; loosening them proves nothing. Fix only the specific blocked path, then recreate a test pod to confirm credentials.

Separate production hardening from immediate troubleshooting

After you restore connectivity, use one role per permission boundary rather than one shared administrator role. Where it fits your setup, prefer trust policy conditions on request tags and organization context. Use CloudTrail to audit EKS Auth and downstream API access. Ensure application images carry up-to-date SDK versions, and pin add-on versions through an audited upgrade pipeline instead of making unmanaged edits to system DaemonSets.

Limit your node IAM permissions to what the agent needs, restrict access to node instance metadata, and have a plan for rotating your customer-managed KMS keys or changing secrets. Pod Identity distributes temporary credentials, but it cannot compensate for unrelated data policy errors or vulnerable code running with legitimately authorized credentials.

When to choose Pod Identity or IRSA on a new cluster

For standard EKS workloads on supported Linux EC2 nodes, Pod Identity is a strong default: it avoids cluster-specific OIDC trust entries, provides simpler association management and allows reusable roles. For Fargate workloads, use IRSA because the Pod Identity Agent cannot run there. Existing stable IRSA deployments do not need an urgent conversion simply because Pod Identity exists. Make the choice based on compute compatibility, SDK versions, operations model and security controls.

Remember that EKS Auto Mode includes the Pod Identity capability, while other supported EC2-backed EKS clusters normally require installing the add-on. For Windows, Fargate or custom Kubernetes environments that lack EKS’s identity service integration, check support before you choose.

A safe step-by-step verification and rollback process

Before changing production, capture the current association list, role trust JSON, application service-account configuration and desired rollout state. In a test namespace, deploy an approved pod image using the target service account. Confirm injected variables without printing token contents. Call get-caller-identity, then a low-risk read-only API on the intended AWS resource. Only after those checks succeed should you roll the production Deployment.

If your deployment fails, roll back application image changes separately from identity changes. Revert an incorrect association or role trust deliberately, and verify which IAM provider the rolled-back pods use. Keep your old IRSA role until every dependent workload has moved and monitoring confirms the new credentials work.

Jake and Ethan: the final diagnosis

Jake: "I have the agent Running, an IAM role with the right permissions, and a matching service account. Why does the old pod still fail?"

Ethan: "Because it started before the association existed. The container environment and token injection happen when the pod is created. Restart the Deployment and verify the new pod."

Jake: "The new pod can call STS, but Secrets Manager still says AccessDenied."

Ethan: "Now identity delivery is fixed. Use the returned assumed-role ARN and CloudTrail to check the secret’s exact ARN, IAM policy, resource policy and any customer KMS key."

Jake: "Can I use that same role in the next EKS cluster?"

Ethan: "Yes, in the same account, with another association. Scope the trust and permissions so reuse does not accidentally broaden access."

Final checklist before closing the incident

A working EKS Pod Identity configuration passes all of these tests: supported Kubernetes platform; pod on eligible Linux EC2 compute; healthy agent (unless included through EKS Auto Mode); agent’s node IAM permission and EKS Auth connectivity; exact service-account association; correct role trust including both STS actions; fresh pod injection; supported SDK; correct caller identity; and successful authorization on the destination service.

The critical lesson is to prove each layer independently. A missing environment variable is not a Secrets Manager policy error. An EKS Auth AccessDenied is not a reason to broaden the node role’s access to application data. A successful assumed-role identity followed by resource denial is not a reason to reinstall the agent.

Official references for this guide

For readers preparing for an AWS certification

We have been covering AWS certifications alongside our fixes, so here is a short extra for readers studying for one. If you only came for the fix, you already have it; feel free to skip this part.

Exams that test this topic: DevOps Engineer – Professional (DOP-C02) • Security – Specialty (SCS-C03) • CloudOps Engineer – Associate (SOA-C03).

Here are the exam-style questions this topic tends to raise, with the reasoning you need to answer them:

1. Pods should get AWS credentials through EKS Pod Identity. What must run in the cluster?

The Amazon EKS Pod Identity Agent add-on, which runs as a DaemonSet on the nodes.

2. Which principal must the IAM role's trust policy allow for EKS Pod Identity?

The service principal pods.eks.amazonaws.com, with the actions sts:AssumeRole and sts:TagSession.

3. How do you link an IAM role to a workload with EKS Pod Identity?

Create a pod identity association for the cluster, namespace and service account (aws eks create-pod-identity-association).

4. An association exists, but the pods still use the node role. What are the usual causes?

The namespace or service account name does not exactly match the association, or the pods were not restarted after it was created; credentials are wired in when a pod starts.

5. How does an AWS SDK inside the pod find Pod Identity credentials?

Through the container credential provider, using the AWS_CONTAINER_CREDENTIALS_FULL_URI and AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE variables injected into the pod; older SDK versions do not support it.

6. Which needs an IAM OIDC provider for each cluster: IRSA or EKS Pod Identity?

IRSA. EKS Pod Identity does not, and the same role can be reused across clusters.

Exam codes and dates change often. Our AWS certification changes page keeps track of what is current.

Frequently Asked Questions

What is EKS Pod Identity?

It is an EKS mechanism that associates a Kubernetes service account with an IAM role and delivers temporary credentials to supported pods through the Pod Identity Agent.

Does EKS Pod Identity need an IAM OIDC provider?

No. Unlike IRSA, it uses the EKS Auth service and the pods.eks.amazonaws.com IAM service principal.

Does EKS Pod Identity work on Fargate?

No. EKS Pod Identity is not supported for Fargate pods. IRSA remains an option for those workloads.

Does a pod need a restart after creating an association?

Yes for existing pods that were started before the association, so they receive the required token volume and credential environment variables when recreated.

What IAM trust policy does EKS Pod Identity require?

The role must trust the service principal pods.eks.amazonaws.com and allow sts:AssumeRole and sts:TagSession; additional conditions may restrict its use.

How do I list Pod Identity associations?

Run aws eks list-pod-identity-associations --cluster-name CLUSTER --region REGION, then inspect the namespace, service account and role ARN.

How do I know which role a pod is really using?

Run aws sts get-caller-identity through a compatible AWS CLI or SDK inside the pod and check the assumed-role ARN.

What are the two Pod Identity environment variables?

AWS_CONTAINER_CREDENTIALS_FULL_URI identifies the local agent endpoint, and AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE points to the projected token file.

Why does Pod Identity work on one node but not another?

The agent may be missing or unhealthy on one node, or that node may have different IAM permissions, address bindings or private network access.

Can one IAM role be used by pods in several EKS clusters?

Yes, if the clusters are in the same AWS account as the role, create a matching Pod Identity association in each cluster.

Can I migrate from IRSA gradually?

Yes. Create and validate the new association, then remove conflicting IRSA settings and recreate pods service-account by service-account.

Can I run IRSA and Pod Identity in the same EKS cluster?

Yes. Workloads can use different mechanisms, but credential-provider precedence must be checked carefully during migration.

Why does Secrets Manager still deny access after Pod Identity works?

The IAM role may lack secretsmanager:GetSecretValue, the secret resource policy may deny access, or a customer-managed KMS key may require additional permission.

What if the Pod Identity Agent cannot reach EKS Auth?

For private nodes, configure the regional EKS Auth interface endpoint and validate DNS, security groups, node IAM and network reachability.

Which SDK versions support Pod Identity?

Use current SDKs; the minimum for Python is boto3 and botocore 1.34.41, and for AWS CLI v2 it is 2.15.0.

Is EKS Pod Identity better for a new cluster?

For supported Linux EC2-backed EKS or EKS Auto Mode workloads, it is often simpler than IRSA. For Fargate pods, select IRSA because Pod Identity is unsupported.

A reliable investigation starts by identifying the exact failure layer. Fix association and credential delivery before broadening IAM permissions, and always verify the role used by the live pod.

Final takeaway: Agent → Association → Trust → Fresh pod → Credential variables → Assumed role → AWS service authorization. Test in this order.

Revision note. Written October 24, 2026; updated November 23, 2026 with exam-style practice questions. "Trust, but verify," says the old Russian proverb; the trust policy decides everything here.

Related