aws-samples / eks-cluster-upgrade

Automated Amazon EKS cluster upgrade
MIT No Attribution
154 stars 35 forks source link

Bug: Upgrade failing on Kubernetes client model attribute #51

Closed quixoticmonk closed 1 year ago

quixoticmonk commented 1 year ago

Expected Behaviour

Cluster is upgraded and the nodes are updated as required.

Current Behaviour

Upgrade fails after preflights and cluster upgrade in the node eviction stage.

ERROR:eksupgrade.src.k8s_client:Exception encountered while attempting to drain nodes! Node: ip-*-*-*-*.ec2.internal Cluster: eksup-cluster - Error: module 'kubernetes.client.models' has no attribute 'v1beta1_eviction'
ERROR:eksupgrade.starter:Error encountered during actual update! Exception: Unable to Delete the Node
ERROR:eksupgrade.starter:Exception encountered in main method - Error: Unable to Delete the Node

Code snippet

eksupgrade eksup-cluster 1.22 us-east-1

Possible Solution

Update the reference to v1_eviction

Steps to Reproduce

  1. Created a cluster using eksctl eksctl create cluster -f cluster.yaml. Config yaml below
    
    apiVersion: eksctl.io/v1alpha5
    kind: ClusterConfig

metadata: name: eksup-cluster region: us-east-1 version: "1.21" nodeGroups:

Amazon EKS upgrade version

0.4.0

Python runtime version

3.9

Packaging format used

PyPi

Debugging logs

Debug logs attached in an earlier section.