aws / karpenter-provider-aws

Karpenter is a Kubernetes Node Autoscaler built for flexibility, performance, and simplicity.
https://karpenter.sh
Apache License 2.0
6.58k stars 915 forks source link

Upgrade process for Karpenter #6515

Open boxymat opened 1 month ago

boxymat commented 1 month ago

Description

Hi, I read documentation and have a question about the how the upgrade process should look like.

  1. First update CRDs kubectl apply -f https://raw.githubusercontent.com/aws/karpenter/v0.37.0/pkg/apis/crds/karpenter.sh_nodepools.yaml kubectl apply -f https://raw.githubusercontent.com/aws/karpenter/v0.37.0/pkg/apis/crds/karpenter.sh_nodeclaims.yaml kubectl apply -f https://raw.githubusercontent.com/aws/karpenter/v0.37.0/pkg/apis/crds/karpenter.k8s.aws_ec2nodeclasses.yaml
  2. Update the version. I have 0.34.1 and want go to 0.37, so helm upgrade --install --namespace karpenter --create-namespace \ karpenter oci://public.ecr.aws/karpenter/karpenter \ --version 0.37.0 \ --set "serviceAccount.annotations.eks\.amazonaws\.com/role-arn=${KARPENTER_IAM_ROLE_ARN}" \ --set settings.clusterName=${CLUSTER_NAME} \ --set settings.interruptionQueue=${CLUSTER_NAME} \ --wait Can I go to 0.37 that or I need to make version to version update?
  3. I have on 1.29 EKS version. How I can update to 1.30. Make steps 1-2 and then update EKS from AWS Console?

Additional question:

  1. Currently I have 5 nodes. First two, are karpenter controller and rest of are nodes made by karpenter image. How I can update the AMIs of the karpenter controller?
    • Edit manually the Auto Scalling Group in AWS EC2 Console creating new Launch Template for that?
    • Click Update now in AMI Release version in EKS cluster page? image
boxymat commented 1 month ago

It is look like that working after my work and just to left information what i do in order.

  1. Upgrade EKS kubernetes version from 1.29 to 1.30
  2. Apply the new CRDs
  3. Update AMI from the EKS console for the karpenter controller node's from 1.29 to 1.30.
  4. Terminate existing node's created by karpenter to relaunch with the new AMI
  5. Upgrade helm chart.

As far I see there is no error in logs.