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.23 to 1.24. 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 Docker Socket Mounts: This step checks if any applications in the cluster are using Docker socket mounts. Dockershim, which was used to support Docker socket mounts, has been removed in 1.24. So, if any applications are using Docker socket mounts, they will need to be updated before upgrading to 1.24.
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.24 in this case).
The Fleet Plan uses an open-source tool called 'Detector for Docker Socket' to detect Docker socket mounts. It's a reliable tool that can help you identify pods using Docker socket mounts, along with 'kube-no-trouble' and 'kubepug,' both open-source and famous tools, to detect deprecated Kubernetes APIs.
EKS Upgrade Fleet Plan¶
kind: FleetPlan apiVersion: infra.k8smgmt.io/v3 metadata: name: eks-fleet1-plan-1-23 project: defaultproject spec: fleet: kind: clusters labels: rafay.dev/clusterType: aws-eks rafay.dev/k8sVersion: '1.23' projects: - name: demofleet operationWorkflow: operations: - name: eks-1-23-plan prehooks: - description: Deprecated APIs Check inject: - KUBECONFIG name: deprecated-api-check containerConfig: runner: cluster image: ghcr.io/doitintl/kube-no-trouble:latest arguments: - '-o' - json - '-e' - description: >- deprecated API's and will verify the current context against v1.24.15 version name: pre-upgrade-checker containerConfig: runner: cluster image: ctadeu/kubepug:latest arguments: - '--k8s-version=v1.24.15' - inject: - KUBECONFIG name: docker-socket-detector-check containerConfig: runner: cluster image: registry.rafay-edge.net/rafay/dockersocketdetector:v1 arguments: - '-e' action: type: nodeGroupsAndControlPlaneUpgrade description: upgrade to 1.24 name: eks-cluster-upgrade nodeGroupsAndControlPlaneUpgradeConfig: version: '1.24'
To run and execute the fleet plan, please use the following command:
./rctl apply -f eks-1-123-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 Deprecated APIs¶
If the prehooks encounter any deprecated APIs during execution, 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: