EKS Auto Mode Scaling Behavior Quiz
Related Document: Scaling Behavior
Multiple Choice Questions
1. What is the behavior of NodePool's consolidationPolicy: WhenEmptyOrUnderutilized?
- A) Only removes empty nodes
- B) Consolidates both empty and underutilized nodes
- C) Always keeps all nodes
- D) Only removes nodes at specific times
Show Answer
Answer: B) Consolidates both empty and underutilized nodes
Explanation: The WhenEmptyOrUnderutilized policy consolidates not only empty nodes but also underutilized nodes to optimize costs. This allows consolidating workloads from multiple underutilized nodes onto fewer nodes.
disruption:
consolidationPolicy: WhenEmptyOrUnderutilized
consolidateAfter: 1m # Consolidate 1 minute after condition is metComparison:
WhenEmpty: Only removes empty nodes (conservative)WhenEmptyOrUnderutilized: Consolidates empty + underutilized nodes (aggressive)
2. What is the kubectl command to check NodeClaim status?
- A)
kubectl get nodes --show-claims - B)
kubectl get nodeclaims - C)
kubectl describe karpenter claims - D)
kubectl get ec2-nodes
Show Answer
Answer: B) kubectl get nodeclaims
Explanation: NodeClaim is a resource that represents the state of a node being provisioned.
# List NodeClaims
kubectl get nodeclaims
# Detailed information for specific NodeClaim
kubectl describe nodeclaim <name>
# View NodeClaims with node information
kubectl get nodeclaims -o wide3. Under what condition does node provisioning start when a Pending Pod occurs in Auto Mode?
- A) When Pod has been Pending for more than 5 minutes
- B) When no node satisfies the NodePool's requirements
- C) When total node count falls below threshold
- D) When manual scale-up command is executed
Show Answer
Answer: B) When no node satisfies the NodePool's requirements
Explanation: Auto Mode analyzes the requirements of Pending Pods and immediately provisions a new node if no suitable node exists.
Provisioning Flow:
- Pod enters Pending state
- Karpenter analyzes Pod's resource requests, nodeSelector, affinity
- Checks requirements of suitable NodePools
- Selects optimal instance type
- Launches EC2 instance (40-90 seconds)
4. In which cases does Consolidation NOT occur?
- A) When node has do-not-disrupt annotation
- B) When node only has DaemonSet Pods
- C) When consolidateAfter time has not elapsed
- D) All of the above
Show Answer
Answer: D) All of the above
Explanation: Consolidation does not occur in the following situations:
- do-not-disrupt annotation: Nodes or Pods with this annotation are excluded from consolidation
- Only DaemonSet Pods: DaemonSets run on all nodes, so treated as empty node
- consolidateAfter not elapsed: Must wait specified time after condition is met
metadata:
annotations:
karpenter.sh/do-not-disrupt: "true"5. What situations trigger Drift detection?
- A) When NodeClass spec changes
- B) When new AMI becomes available
- C) When security groups change
- D) All of the above
Show Answer
Answer: D) All of the above
Explanation: Drift detection is triggered when the current state of a node differs from the desired state:
- NodeClass changes: AMI family, subnets, security groups, etc. changed
- New AMI: EKS optimized AMI updated
- Security group changes: Referenced security groups modified
When Drift is detected, nodes are replaced sequentially.
6. Which AMI family is recommended for optimizing node provisioning speed?
- A) AL2023
- B) Bottlerocket
- C) Ubuntu
- D) Amazon Linux 2
Show Answer
Answer: B) Bottlerocket
Explanation: Bottlerocket is an OS designed specifically for containers, providing faster boot times than AL2023.
Boot Time Comparison:
- AL2023: 20-40 seconds
- Bottlerocket: 15-25 seconds
Additional Bottlerocket benefits:
- Smaller attack surface
- Immutable file system
- Automatic security updates