Q45 — AWS SAA-C03 Ch.13

Question 45 of 100 | ← Chapter 13

Q945. A company is migrating an application from an on-premises location to Amazon Elastic Kubernetes Service (Amazon EKS). The company must use a custom subnet for pods that are in the company's VPC to comply with requirements. The company also needs to ensure that the pods can communicate securely within the pods' VPC.Which solution will meet these requirements?

Correct Answer: C. Use the Amazon VPC CNI plugin for Kubernetes.Define custom subnets in the VPC cluster for the pods to use

Explanation

The correct answer is C. Use the Amazon VPC CNI plugin for Kubernetes. Define custom subnets in the VPC cluster for the pods to use.Here's why:Custom Subnets: The Amazon VPC CNI plugin allows you to define custom subnets within your EKS cluster's VPC. This gives you granular control over pod placement and network configuration. Pod Communication: The VPC CNI plugin ensures that pods within the custom subnets can communicate securely within the VPC using the standard Kubernetes networking model. Compliance: Using custom subnets within the VPC adheres to the company's requirement for pods to be in their designated VPC.Why other options are not suitable:A. Configure AWS Transit Gateway to directly manage custom subnet configurations for the pods in Amazon EKS: Transit Gateway is a networking service for connecting VPCs, not for managing pod subnets within a single VPC.B. Create an AWS Direct Connect connection from the company's on-premises IP address ranges to the EKS pods: Direct Connect provides a dedicated connection between your on-premises network and AWS, but it's not designed for managing pod communication within a VPC. D. Implement a Kubernetes network policy that has pod anti-affinity rules to restrict pod placement to specific nodes that are within custom subnets: While network policies can control pod communication, they don't directly define custom subnets for pod placement.In summary:The Amazon VPC CNI plugin provides the most direct and effective way to meet the company's requirements. It allows you to create custom subnets within the EKS cluster's VPC, ensuring pod placement within the designated VPC and secure communication between pods.