k8s Deployment Version Upgrade
- Obtain the k8s YAML deployment file for the upgrade version. Configuration files can be referenced from Deployment Preparation.
- Acquire the new version service image, import it into the k8s cluster or add it to the internal private repository, ensuring the k8s cluster can access the image information.
- No automatic backup is available; manual data backup is required before upgrading! k8s Environment Backup and Restore
- Compare the component dependencies in the installed version with those in the version to be upgraded.
- If the component dependencies are the same, update the image version information in the
hengshi.yaml
configuration file.
shellcontainers: - name: hengshi-sense-ins imagePullPolicy: IfNotPresent image: registry.hengshi.org/hengshi-sense:xxxxx # Update to the new version image tag ## Execute the following deployment command to complete the upgrade kubectl -n hengshi apply -f hengshi.yaml
- If the component dependencies differ, for example, upgrading from 4.0 to 4.2 introduces a new Redis component, update the
hengshi.yaml
,redis.yaml
images, and PVC-related configuration information.
shell## Execute the following deployment commands to complete the upgrade kubectl -n hengshi apply -f configmap.yaml kubectl -n hengshi apply -f service.yaml kubectl -n hengshi apply -f redis.yaml kubectl -n hengshi apply -f hengshi.yaml
- If the component dependencies are the same but there are known component optimizations in the upgrade version, contact technical personnel to confirm the components that need updating. For example, if the
metadb
component has optimizations, update the image information in thehengshi.yaml
andmetadb.yaml
configuration files.
shell## Execute the following deployment commands to complete the upgrade kubectl -n hengshi apply -f metadb.yaml kubectl -n hengshi apply -f hengshi.yaml
- If the component dependencies are the same, update the image version information in the
- Check the startup status of all component pods. If the STATUS is "Running," the service has started successfully.
- After the upgrade, access the service address via a browser to use the HENGSHI SENSE service.
- Notes:
- The Flink component has been removed in version 5.1.x and is no longer required. After the upgrade, consider stopping and cleaning up the Flink containers.
k8s Deployment Rollback
- Rollback Procedure
- Rollback Data
Use the operation process of k8s Restore.
Helm Deployment Version Upgrade
- Obtain the new version of the service image, import it into the k8s cluster or add it to the internal private repository, ensuring the k8s cluster can access the image information.
- Compare the Helm Deployment complete example of custom configuration to confirm whether the new version has added or removed configurations.
- In the Helm environment, data backup is not performed by default during the upgrade process. Perform data backup manually if needed: k8s Environment Backup and Restore.
- No automatic backup is available; manual data backup is required before upgrading! k8s Environment Backup and Restore.
For non-major version upgrades, typically, you only need to perform data backup and then specify the version number using --version
to upgrade.
Cluster Example Configuration
shell
hsImage:
hengshi:
address: "registry.hengshi.org/hengshi-sense:6.0-xxxxx" # Replace with the new version image
gpdb:
address: "registry.hengshi.org/gpdb:6.25.4.0" # Replace with the new version image
hsContainer:
gpdb:
segment_replicas: 3
gpdb_segments:
- segment-0
- segment-1
- segment-2
# If you need to change the storage volume size, you can enable the following parameters
hsVolume:
storage_class_name: "longhorn" # Replace with the StorageClass you are using
# Public cloud disks may have minimum limits, such as Alibaba Cloud's minimum of 20G
# gpdb:
# master_size: "50Gi"
# segment_size: "50Gi"
# metadb:
# hengshi_db_size: "50Gi"
# minio:
# hengshi_minio_size: "50Gi"
# redis:
# hengshi_redis_size: "10Gi"
Single Node Example Configuration
shell
hsImage:
hengshi:
address: "registry.hengshi.org/hengshi-sense:6.0-xxxxxx" # Replace with the new version image
gpdb:
address: "registry.hengshi.org/gpdb:6.25.4.0" # Replace with the new version image
# If you need to change the storage volume size, you can enable the following parameters
hsVolume:
storage_class_name: "longhorn" # Replace with the StorageClass you are using
# Public cloud disks may have minimum limits, such as Alibaba Cloud's minimum of 20G
# gpdb:
# master_size: "50Gi"
# segment_size: "50Gi"
# metadb:
# hengshi_db_size: "50Gi"
# minio:
# hengshi_minio_size: "50Gi"
# redis:
# hengshi_redis_size: "10Gi"
shell
helm upgrade -f example-config.yaml HENGSHI-SENSE hengshi-charts/hengshi-sense --version [chart_version] -n [namespace] #
Helm Rollback
- Rollback Procedure
- Rollback Data
Use K8s Restore to restore the metadb operation process.