Amazon EKS manages the Kubernetes control plane. Choose how Pods run, reach storage, receive AWS permissions, and scale; Auto Mode also manages cluster infrastructure.
Cluster compute options
Amazon EKS runs Kubernetes, a system that places and maintains container workloads. Its control planeThe control plane maintains cluster state and schedules Kubernetes workloads. stores cluster state and schedules work. A nodeA node is a machine that runs containerized applications for a Kubernetes cluster. is the machine running that work; its kubelet agent keeps containers running inside PodsA Pod is a Kubernetes unit that runs one or more containers together., the units Kubernetes schedules.
How it works
- Choose compute for the workload. A cluster can mix the options below.
| Compute | Who manages it | Selection cue |
|---|---|---|
| Managed node group | EKS provisions an EC2 Auto Scaling group; you deploy patched node images | EC2 capacity with managed node lifecycle |
| Self-managed nodes | You maintain the nodes | Direct node maintenance |
| Fargate | AWS provides compute for matching Pods | Avoid managing virtual machines |
| Auto Mode | EKS provisions, scales, and patches nodes and integrates load balancing and block storage | Managed cluster infrastructure |
| Hybrid Nodes | You manage machines outside AWS | On-premises compute |
- A DaemonSetA DaemonSet runs copies of a Pod across nodes., which runs a copy of a Pod on nodes, cannot run on Fargate. Neither can privileged containers, GPUs,
HostPort, orHostNetwork. - Choose how operators and nodes reach the Kubernetes API endpoint, the cluster management address.
| Public access | Private access | API path |
|---|---|---|
| Enabled | Disabled | Default for new clusters; public endpoint |
| Enabled | Enabled | Cluster VPC traffic uses the private endpoint; public access CIDRs restrict internet access |
| Disabled | Enabled | Clients must be in the VPC or a connected network; cluster security group controls access |
- For persistent storage, use a persistent volumeA persistent volume provides storage independently of an individual Pod., which holds storage independently of a Pod. The Container Storage InterfaceThe Container Storage Interface connects Kubernetes volume operations to a storage driver. (CSI) driver connects Kubernetes storage requests to AWS storage APIs. Give the EBS CSI driver IAM permissions through Pod Identity or IAM roles for service accountsA service account is a Kubernetes identity used by applications in Pods..
| Storage choice | Fargate support |
|---|---|
| EBS | Cannot mount EBS |
| EFS persistent volume | Static provisioningStatic provisioning makes an existing storage resource available as a persistent volume.; no manual driver installation required |
Exam cues
- If the question says an EKS workload needs a GPU or a privileged node agent, think EC2 nodes, because Fargate does not support those features.
- If the question says the Kubernetes API must have no public access, think private endpoint access with public access disabled, because management clients must then use the VPC or a connected network.
- If the question says a Fargate Pod needs persistent file storage, think statically provisioned EFS, because Fargate cannot mount EBS.
- If the question says EBS volume creation fails with
UnauthorizedOperation, think CSI driver IAM permissions and role association, because the driver calls AWS APIs.
Remember
- New clusters default to public API access enabled and private access disabled.
- Public access CIDRs, meaning allowed IP address ranges, do not control the private endpoint.
- Managed node groups still require deploymentA Deployment maintains application replicas and manages updates to their version. of patched node images.
Trap: Choosing managed node groups does not transfer deployment of patched AMIs to AWS. Auto Mode includes operating system patching.
Da documentação da AWS (23)
- Standard EKS manages the Kubernetes control plane, which schedules workloads and maintains cluster state.
- A node is a machine that runs containerized applications; its kubelet keeps containers running in their Pods.
- An EKS cluster can combine Auto Mode nodes, managed node groups, self-managed nodes, Fargate, and Hybrid Nodes.
- Managed node groups provision and manage EC2 nodes in EKS-managed Auto Scaling groups in your account.
- For an EKS optimized AMI, AWS builds patched images and the customer deploys those images to managed node groups.
- EKS Auto Mode handles node provisioning, scaling, operating system patching, load balancing, and block storage integration.
- Self-managed nodes require the customer to maintain the nodes; Hybrid Nodes run on customer-managed machines outside AWS.
- EKS Fargate does not support DaemonSets, privileged containers, GPUs, HostPort, or HostNetwork.
- New EKS clusters default to public API endpoint access enabled and private endpoint access disabled.
- With public and private API access enabled, API requests from the cluster VPC use the private endpoint; public access CIDRs restrict only the public endpoint.
- With public API access disabled and private access enabled, kubectl must run within the VPC or a connected network; the cluster security group controls private endpoint access.
- The EBS Container Storage Interface driver manages EBS volumes for Kubernetes persistent volumes, storage that persists independently of a Pod.
- The EBS CSI driver needs IAM permissions to call AWS APIs; missing permissions can cause UnauthorizedOperation during volume provisioning.
- Associate the EBS CSI driver IAM role through Pod Identity or IAM roles for service accounts when configuring the add-on or controller service account.
- EBS volumes cannot be mounted by Fargate Pods.
- Fargate Pods can mount statically provisioned EFS persistent volumes without manual EFS driver installation; dynamic provisioning is not supported on Fargate.
- EKS clusters on Kubernetes 1.28 or later envelope-encrypt all Kubernetes API data, including Secrets, before it reaches etcd, using KMS with an AWS owned key by default or a customer managed KMS key you choose.
- Amazon EKS Connector registers any conformant Kubernetes cluster, such as one on premises or in another cloud, so its status, configuration and workloads show in the EKS console.
- Pod Identity associates an IAM role with a service account in a namespace of an EKS cluster; Pods use that service account to obtain workload permissions.
- Pod Identity roles trust the pods.eks.amazonaws.com service principal, and the same role trust can serve associations in multiple clusters without an OIDC provider.
- Pod Identity needs the Pod Identity Agent on nodes; Auto Mode includes it without a separate installation.
- IAM roles for service accounts use a cluster IAM OIDC provider and a service account token exchanged with STS using AssumeRoleWithWebIdentity.
- Pod Identity is supported for Pods on Linux EC2 workers, not Fargate or Windows EC2 workers.
Pod and node scaling
EKS scaling has separate workload and compute decisions. The Horizontal PodA Pod is a Kubernetes unit that runs one or more containers together. Autoscaler (HPA) changes the number of Pod replicasA replica is a copy of an application Pod.. A nodeA node is a machine that runs containerized applications for a Kubernetes cluster. autoscaler supplies machines where those Pods can run. More requested replicas need somewhere to fit.
How it works
- Give Pods resource requestsA resource request reserves CPU or memory for Kubernetes placement decisions., the CPU and memory reservations used for placement. Configure HPA with a metric target.
- HPA adjusts the replica count to meet its metric target.
- When replicas cannot be scheduled, use a compute scaling mechanism.
| Mechanism | Scaling action | Capacity model |
|---|---|---|
| Cluster Autoscaler | Simulates placement and adjusts desired capacity | Existing EC2 Auto Scaling groups |
| Karpenter | Provisions compute for workload requirements | Instance selection from workload constraints |
| EKS Auto Mode | Provisions, consolidates, and removes nodes | Managed compute scaling built on Karpenter |
- Check that resource requests fit the possible nodes. A node group must have compatible labelsA label is a key-value attribute used to identify or select Kubernetes resources., key-value attributes, and taintsA taint restricts which Pods a node accepts., restrictions on which Pods it accepts. More nodes with incompatible scheduling properties will not solve placement.
Exam cues
- If the question says HPA increased replicas but they cannot be scheduled, think node capacity and placement constraints, because HPA changes replicas without provisioning nodes.
Remember
- The HPA walkthrough documents a five-minute default scale-down timeframe; it is configurable.
Trap: HPA changes Pod replicas, but it does not add nodes. Unschedulable Pods need compatible node capacity.
HPA requests more replicas from its metric target.
Unschedulable replicas expose the need for additional compute.
The node autoscaler supplies compatible node capacity.
Da documentação da AWS (7)
- The Horizontal Pod Autoscaler changes Pod replica counts to meet a configured metric target; it does not provision nodes.
- Resource requests are the CPU and memory reservations used when scheduling Pods; node groups must have capacity and scheduling properties that fit unscheduled Pods.
- Cluster Autoscaler watches unschedulable Pods and underused nodes, simulates placement changes, and changes EC2 Auto Scaling group desired capacity.
- Cluster Autoscaler expects nodes within a node group to have identical scheduling properties, including labels, taints, and resources.
- Karpenter provisions compute according to workload compute, storage, acceleration, and scheduling requirements.
- Auto Mode builds on Karpenter, creates nodes when Pods do not fit existing nodes, and consolidates workloads and removes nodes.
- The EKS HPA walkthrough documents a default five-minute scale-down timeframe that can be changed.
Flashcards
Nada para revisar aqui agora. Escolha outros tópicos ou outro filtro.
·
Todos os 11 flashcards em lista
Does Amazon EKS always manage only the control plane?
No. Standard EKS manages the control plane; Auto Mode also manages compute and infrastructure integration. Managed node groups still require you to deploy patched node images.
An EKS team needs GPU workloads and a privileged node agent. Should it choose Fargate?
Use suitable EC2 nodes. Fargate supports neither GPUs nor privileged containers nor DaemonSets.
An EKS team disables public API access. Where must its kubectl client run?
Inside the cluster VPC or a connected network, with access allowed by the cluster security group. Public access CIDRs do not grant private endpoint access.
An EKS application on Fargate needs persistent file storage. Can it mount an EBS volume?
Use a statically provisioned EFS persistent volume. Fargate cannot mount EBS volumes and does not support EFS dynamic provisioning.
An EKS EBS persistent volume claim fails with UnauthorizedOperation. What should the team configure?
Give the EBS CSI driver an IAM role with EBS API permissions, associated through Pod Identity or IAM roles for service accounts. A storage request alone does not grant AWS permissions.
Kubernetes Secrets on an EKS cluster must be encrypted with a key the company controls and audits in CloudTrail. What should they configure?
EKS envelope encryption with their own customer managed KMS key. EKS already envelope-encrypts API data with an AWS owned key by default.
A company wants to see its on-premises Kubernetes clusters next to its EKS clusters in the EKS console. What feature does that?
Amazon EKS Connector, which registers the external clusters for viewing in the console.
How do EKS Pod Identity and IAM roles for service accounts differ for workload permissions?
Both associate a workload role with a service account. Pod Identity uses the node agent and trusts
pods.eks.amazonaws.comwithout a cluster OIDC provider. IRSA uses OIDC and STS web identity. Pod Identity supports Linux EC2 Pods, not Fargate.Which autoscaling components change EKS Pod counts and node capacity?
HPA changes Pod replicas. Cluster Autoscaler changes Auto Scaling group desired capacity. Karpenter provisions compute for workload requirements. Auto Mode builds on Karpenter and manages node scaling and consolidation.
An EKS HPA adds replicas but the Pods remain unschedulable. What should the team check?
Check resource requests and node scheduling requirements against available node-group capacity. HPA does not add nodes; a node autoscaler must be able to create capacity that fits those Pods.
Does an EKS cluster need a separately managed Karpenter installation to get Auto Mode compute scaling?
Auto Mode provides managed compute scaling built on Karpenter, including provisioning nodes for Pods that do not fit and consolidation.