Skip to content

k8s Deployment Version Upgrade

  1. Obtain the k8s YAML deployment file for the upgrade version. Configuration files can be referenced from Pre-deployment Preparation.
  2. 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.
  3. In the k8s environment, data backup is not performed by default during the upgrade process. Perform data backup as needed k8s Environment Backup and Restore.
  4. 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.
    shell
       containers:
         - 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, a new Redis component is added. 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 the hengshi.yaml and metadb.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
  5. Check the startup status of all component pods. If the STATUS is Running, the service has started successfully.
  6. After the upgrade, access the service address via a browser to use the HENGSHI SENSE service.
  7. Notes:
    1. The Flink component has been removed in version 5.1.x and does not need to be run. After the upgrade, consider stopping and cleaning up the Flink containers.

Helm Deployment Version Upgrade

  1. 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.
  2. Compare the complete example of custom configuration in Helm Deployment to confirm whether the new version has added or removed configurations.
  3. In the Helm environment, data backup is not performed by default during the upgrade process. You can perform data backup as needed: k8s Environment Backup and Restore.

For non-major version upgrades, it is usually sufficient to perform data backup and then specify the version number using --version for the upgrade.

Example Config Reference

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] #

User Manual for Hengshi Analysis Platform