RetailPulse is modernizing its inventory tracking application by migrating it from an on-premises Kubernetes cluster to Amazon EKS. The Solutions Architect has decided to use EKS with AWS Fargate profiles to run the application pods. The pods must run in private subnets without direct internet access and cannot use a NAT gateway due to strict corporate security policies. The pods must securely connect to an Amazon RDS for PostgreSQL database located in a database VPC within the same region. The database uses IAM database authentication, and static credentials must not be stored within the containers. Additionally, the pods need to pull container images from an Amazon ECR private repository in the same region. Which TWO configurations must the Solutions Architect implement to meet these requirements?
- Configure an IAM OpenID Connect (OIDC) identity provider for the EKS cluster. Create an IAM role with the rds-db:connect permission and a trust policy that permits the OIDC provider to assume the role. Create a Kubernetes service account annotated with the IAM role ARN, and configure the application pods to use this service account.Cevap
- Set the EKS cluster endpoint access to private. Create interface VPC endpoints in the application VPC for ECR API and ECR Docker registry, and create a gateway VPC endpoint for Amazon S3. Establish a VPC peering connection or Transit Gateway between the application VPC and the database VPC, and update the VPC route tables and security groups accordingly.Cevap
- CAttach the rds-db:connect policy to the Amazon EKS Fargate execution role, and specify the database endpoints and execution parameters inside the Kubernetes ConfigMap associated with the Fargate profile.
- DConfigure the EKS cluster endpoint access to public. Deploy a single NAT Gateway in a public subnet of the application VPC to allow the pods to pull images from the ECR registry and connect to the database VPC over the internet.
- EDeploy the Amazon EKS Pod Identity Agent on the Fargate nodes, and create an EKS Pod Identity association that maps the Kubernetes service account directly to an IAM role containing the rds-db:connect permissions.