This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Configuring IPv6

This section describes how to use Huawei CSI to configure IPv6.

1 - Configuring IPv6 During the Initial Installation of Huawei CSI

This section describes how to specify IPv6 during the initial installation of Huawei CSI.

Prerequisites

  • IPv6 can be configured only when the storage backend type is oceanstor-nas, oceanstor-san, or oceanstor-dtree.
  • The host environment and Kubernetes cluster environment support IPv6. For details, see IPv4/IPv6 dual-stack of Kubernetes .

Procedure

  1. Install the CSI-dependent components by following the instructions in 1 to 7 in Installation Procedure .

  2. Run the vi values.yaml command to open the configuration file 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. Install and deploy Huawei CSI by following the instructions in 8 to 9 in Installation Procedure .

  4. Run the following command to check the status of the service in the huawei-csi namespace.

    kubectl get service -n huawei-csi
    

    The following is an example of the command output.

    NAME                    TYPE        CLUSTER-IP         EXTERNAL-IP   PORT(S)    AGE
    huawei-csi-controller   ClusterIP   fd00:10:96::8136   <none>        4433/TCP   19m
    
  5. Run the following command to check the value of ipFamilies for the huawei-csi-controller service.

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

    The following is an example of the command output.

    ["IPv6"]
    
  6. Run the following command to check the value of ipFamilyPolicy for the huawei-csi-controller service.

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

    The following is an example of the command output.

    SingleStack
    

2 - 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"]