Fleet Plan Template¶
This is a ready-to-use Fleet Plan template. You can customize it by changing details such as the project name and Fleet Plan name according to your requirements.
This Fleet Plan is designed for a scenario where users intend to upgrade from Kubernetes version 1.24 to 1.25. It includes the following prehooks and an action:
-
Check for Deprecated APIs: This step ensures that the cluster is compatible with the new version by checking for any APIs that have been deprecated.
-
Check for AWS Load Balancer Controller Version : This prehook step in this fleet plan checks the version of the AWS Load Balancer Controller. To upgrade from Kubernetes 1.24 to 1.25, you will have to upgrade the controller to 2.4.7 before you upgrade to Kubernetes 1.25.
- Cluster Upgrade Action: Once the above prechecks have passed, the action for cluster upgrade will be triggered to start upgrading the fleet of the cluster to the required Kubernetes version (1.25 in this case).
Detection Tools¶
The Fleet Plan uses a Docker container image check-aws-load-balancer-controller:v1
built by Rafay that checks the version number of the AWS Load Balancer Controller running on the cluster as EKS 1.25 requires the version to be equal to v2.4.7 or greater. It also uses the open-source tools kube-no-trouble and kubepug to detect deprecated Kubernetes APIs.
EKS Upgrade Fleet Plan¶
To customize the configuration to match your environment, follow these steps:
-
Update the
project
field with the name of your project. -
Update the
deployment name
andnamespace
of AWS Load Balancer Controller in prehook "check-aws-load-balancer" with the appropriate values running on your cluster.
kind: FleetPlan
apiVersion: infra.k8smgmt.io/v3
metadata:
name: eks-fleet1-plan-1-24
project: demofleet
spec:
fleet:
kind: clusters
labels:
rafay.dev/clusterType: aws-eks
rafay.dev/k8sVersion: '1.24'
projects:
- name: demofleet
operationWorkflow:
operations:
- name: eks-1-24-plan
prehooks:
- name: deprecated-api-check
description: Deprecated APIs Check
inject:
- KUBECONFIG
containerConfig:
runner:
type: cluster
image: ghcr.io/doitintl/kube-no-trouble:latest
arguments:
- '-o'
- json
- '-e'
cpuLimitMilli: '4'
memoryLimitMb: '100'
timeoutSeconds: 60
- name: pre-upgrade-checker
description: >-
deprecated API's and will verify the current context against
v1.25.13 version
inject:
- KUBECONFIG
containerConfig:
runner:
type: cluster
image: ctadeu/kubepug:latest
arguments:
- '--k8s-version=v1.25.13'
cpuLimitMilli: '4'
memoryLimitMb: '100'
timeoutSeconds: 60
- name: check-aws-load-balancer
description: ''
inject:
- KUBECONFIG
containerConfig:
runner:
type: cluster
image: >-
registry.rafay-edge.net/rafay/check-aws-load-balancer-controller:v1
arguments:
- aws-load-balancer-controller-name
- aws-namespace
cpuLimitMilli: '4'
memoryLimitMb: '100'
timeoutSeconds: 60
action:
type: nodeGroupsAndControlPlaneUpgrade
description: upgrade to 1.25
name: eks-cluster-upgrade
nodeGroupsAndControlPlaneUpgradeConfig:
version: '1.25'
To run and execute the fleet plan, please use the following command:
./rctl apply -f eks-1-124-upgrade-plan.yaml
To retrieve the details of the job created by the above command, use the following command:
./rctl getjobs fleetplan <fleetplan name>
Failure due to incompatible version of AWS Load Balancer Controller¶
If the prehooks encounter that the version of AWS Load Balancer Controller is less than v2.4.7, the screen will display error messages similar to the following:
This is an example of an upgrade plan for EKS. Additionally, there is another example for a blueprint upgrade in the GitHub repository. To access these examples, please clone the repository and refer to the /getstarted/fleet-plan/eks
folder available at the following link: