The pod_identity_agent_enable
parameter enables the AWS Pod Identity Agent in your EKS cluster. This feature allows Kubernetes pods to assume IAM roles directly, providing a more secure way to grant AWS permissions to your applications without using long-lived credentials or environment variables.
When enabled, this parameter installs and configures the AWS Pod Identity Agent, which facilitates the association between Kubernetes service accounts and AWS IAM roles.
The default value for pod_identity_agent_enable
is false
.
To enable the AWS Pod Identity Agent, use the following command:
$ convox rack params set pod_identity_agent_enable=true -r rackName
Setting parameters... OK
Once enabled at the rack level, you can configure services in your convox.yml
file to use specific IAM policies:
services:
web:
build: .
port: 3000
accessControl:
awsPodIdentity:
policyArns:
- "arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly"
- "arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess"
- "arn:aws:iam::123456789012:policy/MyCustomPolicy"
In this example, the web
service is granted permissions defined in three AWS IAM policies:
awsPodIdentity
configuration.eksctl-<cluster-name>-addon-pod-identity-role
.This feature requires at least Convox rack version 3.18.1
.