--- MTPE: windsonsea date: 2024-01-09 --- # Deploy and Upgrade Compatible Versions of Kubean in Offline Scenarios In order to meet the customer's demand for building Kubernetes (K8s) clusters with lower versions, Kubean provides the capability to be compatible with lower versions and create K8s clusters with those versions. Currently, the supported versions for self-built working clusters range from `1.26.0-v1.28`. Please refer to the [DCE 5.0 Cluster Version Support System](./cluster-version.md) for more information. This article will demonstrate how to deploy a K8s cluster with a lower version. !!! note Node environment used in the document: - X86 architecture - CentOS 7 Linux distribution ## Prerequisites - Prepare a management cluster where kubean resides, and the current environment has deployed the `podman`, `skopeo`, and `minio client` commands. If not supported, you can install the dependent components through the script, [Installing Prerequisite Dependencies](../install-tools.md). - Go to [kubean](https://github.com/kubean-io/kubean) to view the released [artifacts](https://kubean-io.github.io/kubean/en/releases/artifacts/), and choose the specific artifact version based on the actual situation. The currently supported artifact versions and their corresponding cluster version ranges are as follows: | Artifact Version | Cluster Range | DCE 5.0 Support | | ----------- | ----------- | ------ | | release-2.21 | v1.23.0 ~ v1.25.6 | Supported since installer v0.14.0 | | release-2.22 | v1.24.0 ~ v1.26.9 | Supported since installer v0.15.0 | | release-2.23 | v1.25.0 ~ v1.27.7 | Expected to support from installer v0.16.0 | This article demonstrates the offline deployment of a K8s cluster with version 1.23.0 and the offline upgrade of a K8s cluster from version 1.23.0 to 1.24.0, so we choose the artifact `release-2.21`. ## Procedure ### Prepare the Relevant Artifacts for the Lower Version of Kubespray Release Import the spray-job image into the registry of the offline environment. ```bash # Assuming the registry address in the bootstrap cluster is 172.30.41.200 REGISTRY_ADDR="172.30.41.200" # The image spray-job can use the accelerator address here, and the image address is determined based on the selected artifact version SPRAY_IMG_ADDR="ghcr.m.daocloud.io/kubean-io/spray-job:2.21-d6f688f" # skopeo parameters SKOPEO_PARAMS=" --insecure-policy -a --dest-tls-verify=false --retry-times=3 " # Online environment: Export the spray-job image of version release-2.21 and transfer it to the offline environment skopeo copy docker://${SPRAY_IMG_ADDR} docker-archive:spray-job-2.21.tar # Offline environment: Import the spray-job image of version release-2.21 into the bootstrap registry skopeo copy ${SKOPEO_PARAMS} docker-archive:spray-job-2.21.tar docker://${REGISTRY_ADDR}/${SPRAY_IMG_ADDR} ``` ### Create Offline Resources for the Earlier Versions of K8s 1. Prepare the manifest.yml file. ```bash cat > "manifest.yml" <