Offline Deployment/Upgrade Guide for Worker Clusters¶
Note
This document is specifically designed for deploying or upgrading the Kubernetes version of worker clusters created on the DCE 5.0 platform in offline mode. It does not cover the deployment or upgrade of other Kubernetes components.
This guide is applicable to the following offline scenarios:
- You can follow the operational guidelines to deploy the recommended Kubernetes version in a non-GUI environment created by the DCE 5.0 platform.
- You can upgrade the Kubernetes version of worker clusters created using the DCE 5.0 platform by generating incremental offline packages.
The overall approach is as follows:
- Build the offline package on an integrated node.
- Import the offline package to the bootstrap node.
- Update the Kubernetes version manifest for the global service cluster.
- Use the DCE 5.0 UI to create or upgrade the Kubernetes version of the worker cluster.
Note
For a list of currently supported offline Kubernetes versions, refer to the list of Kubernetes versions supported by Kubean.
Building the Offline Package on an Integrated Node¶
Since the offline environment cannot connect to the internet, you need to prepare an integrated node in advance to build the incremental offline package and start Docker or Podman services on this node. Refer to How to Install Docker?
-
Check the status of the Docker service on the integrated node.
You should see output similar to the following:
-
Create a file named manifest.yaml in the /root directory of the integrated node with the following command:
The content of manifest.yaml should be as follows:
manifest.yamlimage_arch: - "amd64" kube_version: # Specify the version of the cluster to be upgraded - "v1.28.0"
- image_arch specifies the CPU architecture type, with options for amd64 and arm64.
- kube_version indicates the version of the Kubernetes offline package to be built. You can refer to the supported offline Kubernetes versions mentioned earlier.
-
Create a folder named /data in the /root directory to store the incremental offline package.
Run the following command to generate the offline package using the kubean
airgap-patch
image. Make sure the tag of theairgap-patch
image matches the Kubean version, and that the Kubean version covers the Kubernetes version you wish to upgrade.# Assuming the Kubean version is v0.13.9 docker run --rm -v $(pwd)/manifest.yaml:/manifest.yaml -v $(pwd)/data:/data ghcr.m.daocloud.io/kubean-io/airgap-patch:v0.13.9
After the Docker service completes running, check the files in the /data folder. The folder structure should look like this:
Importing the Offline Package to the Bootstrap Node¶
-
Copy the /data files from the integrated node to the /root directory of the bootstrap node. On the integrated node , run the following command:
Replace
x.x.x.x
with the IP address of the bootstrap node. -
On the bootstrap node, copy the image files in the /data folder to the built-in Docker registry of the bootstrap node. After logging into the bootstrap node, run the following commands:
-
Navigate to the directory where the image files are located.
-
Run the import_images.sh script to import the images into the built-in Docker Registry of the bootstrap node.
Note
The above command is only applicable to the built-in Docker Registry of the bootstrap node. If you are using an external registry, use the following command:
REGISTRY_SCHEME=https REGISTRY_ADDR=${registry_address} REGISTRY_USER=${username} REGISTRY_PASS=${password} ./import_images.sh
- REGISTRY_ADDR is the address of the image repository, such as 1.2.3.4:5000.
- If the image repository requires username and password authentication, set REGISTRY_USER and REGISTRY_PASS accordingly.
-
-
On the bootstrap node, copy the binary files in the /data folder to the built-in Minio service of the bootstrap node.
-
Navigate to the directory where the binary files are located.
-
Run the import_files.sh script to import the binary files into the built-in Minio service of the bootstrap node.
-
Note
The above command is only applicable to the built-in Minio service of the bootstrap node. If you are using an external Minio, replace http://127.0.0.1:9000
with the access address of the external Minio. "rootuser" and "rootpass123" are the default account and password for the built-in Minio service of the bootstrap node.
Updating the Kubernetes Version Manifest for the Global Service Cluster¶
Run the following command on the bootstrap node to deploy the localartifactset
resource to the global service cluster:
Next Steps¶
Log into the DCE 5.0 UI management interface to continue with the following actions:
-
Refer to the Creating Cluster Documentation to create a worker cluster, where you can select the incremental version of Kubernetes.
-
Refer to the Upgrading Cluster Documentation to upgrade your self-built worker cluster.