How aws-samples/eks-cluster-upgrade works
eksupgrade is a command-line utility for upgrading Amazon EKS clusters. The main workflow accepts a cluster, target Kubernetes version, and region; loads cluster and node-group state; requests the control-plane upgrade; then updates managed node groups and rolls self-managed instances while coordinating Kubernetes node and pod operations. The README also describes add-on upgrades and force-aware pod eviction. Edges reflect calls shown in excerpts or capabilities documented in the README; several deeper model and add-on call paths are unsampled, so their internal links are omitted.
Main entry points: cli.py Upgrade CLI · starter.py Self-managed rollout · k8s_client.py Kubernetes node and pod ops · eks_get_image_type.py Node image detection
Components 13
Command entry
- Upgrade CLI
eksupgrade/cli.py - Upgrade errors
eksupgrade/exceptions.py
Upgrade orchestration
- Node image detection
eksupgrade/src/eks_get_image_type.py - Managed node groups
eksupgrade/src/self_managed.py - Self-managed rollout
eksupgrade/starter.py
Cluster resources
- Cluster model
eksupgrade/models/eks.py - AWS resource base
eksupgrade/models/base.py
Cloud and cluster APIs
- Instance and ASG operations
eksupgrade/src/boto_aws.py - Recommended AMI lookup
eksupgrade/src/latest_ami.py - Kubernetes node and pod ops
eksupgrade/src/k8s_client.py
Other components
- Operator
- AWS APIs
- Kubernetes API
Connections 18
- Operator → Upgrade CLI: invokes
README.md - Upgrade CLI → Cluster model: loads cluster
eksupgrade/cli.py - Upgrade CLI → Self-managed rollout: starts rollout
eksupgrade/cli.py - Upgrade CLI → Upgrade errors: handles failures
eksupgrade/cli.py - Cluster model → AWS resource base: uses base
eksupgrade/models/eks.py - Cluster model → AWS APIs: queries cluster
eksupgrade/models/eks.py - Upgrade CLI → AWS APIs: requests control-plane upgrade
README.md - Upgrade CLI → AWS APIs: updates managed groups
README.md - Self-managed rollout → Node image detection: detects image type
eksupgrade/starter.py - Self-managed rollout → Recommended AMI lookup: finds recommended AMI
eksupgrade/starter.py - Self-managed rollout → Instance and ASG operations: replaces instances
eksupgrade/starter.py - Self-managed rollout → Kubernetes node and pod ops: drains and removes nodes
eksupgrade/starter.py - Node image detection → Kubernetes node and pod ops: reads node details
eksupgrade/src/eks_get_image_type.py - Node image detection → AWS APIs: looks up images
eksupgrade/src/eks_get_image_type.py - Recommended AMI lookup → AWS APIs: queries image services
eksupgrade/src/latest_ami.py - Instance and ASG operations → AWS APIs: manages instances
eksupgrade/src/boto_aws.py - Kubernetes node and pod ops → Kubernetes API: manages pods and nodes
eksupgrade/src/k8s_client.py - Kubernetes node and pod ops → AWS APIs: queries EKS add-ons
eksupgrade/src/k8s_client.py