Switching from IPv4 to IPv6 for Huawei CSI

This section describes how to switch from IPv4 to IPv6 when updating Huawei CSI.

Prerequisites

  • The host environment and Kubernetes cluster environment support IPv6. For details, see IPv4/IPv6 dual-stack of Kubernetes .
  • Huawei CSI has been installed and services are running properly.

Procedure

  1. Run the following command to obtain the original service configuration file. helm-huawei-csi indicates the Helm chart name specified during the installation of the earlier version, and huawei-csi indicates the Helm chart namespace specified during the installation of the earlier version.

    helm get values helm-huawei-csi -n huawei-csi -a > ./update-values.yaml
    
  2. Run the vi update-values.yaml command to open the file obtained in 1 and modify the service.ipFamilyPolicy and service.ipFamilies configuration items. For details about the parameters, see Table 5 .

    The following is an example:

    service:
      ipFamilyPolicy: SingleStack
      ipFamilies:
        - IPv6
    
  3. Before switching to IPv6, run the following command to delete the service in the huawei-csi namespace.

    kubectl delete service -n huawei-csi --all
    
  4. Run the following command to upgrade Huawei CSI. In the following command, helm-huawei-csi indicates the specified Helm chart name, huawei-csi indicates the specified Helm chart namespace, and update-values.yaml indicates the file obtained in 1 .

    helm upgrade helm-huawei-csi ./ -n huawei-csi -f ./values.yaml -f ./update-values.yaml
    
  5. Run the following command to query the ipFamilies parameter of the huawei-csi-controller service after the update.

    kubectl get svc -n huawei-csi huawei-csi-controller -o=jsonpath='{.spec.ipFamilies}'
    

    The expected output is as follows:

    ["IPv6"]