Rate This Document
Findability
Accuracy
Completeness
Readability

One-Click Installation (Recommended)

Prerequisites

  • The Docker and Kubernetes components (kubeadm, kubectl, and kubelet) have been installed on the node to be deployed.
  • The node to be deployed can properly pull Docker images.

Procedure

  1. Set the master Kubernetes nodes during initialization.

    In this section, the 10.16.0.0/16 network segment is used as the network driver classless inter-domain routing (CIDR) and the default gateway is used as the network broadcast address. If you need to specify another network segment, modify the commands accordingly.

    1
    2
    3
    4
    kubeadm init --pod-network-cidr=10.16.0.0/16
    mkdir -p $HOME/.kube
    cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
    chown $(id -u):$(id -g) $HOME/.kube/config
    

    After the initialization is complete, information in Figure 1 and Figure 2 are displayed. Check whether the pod information of the Kubernetes cluster is normal and whether the node status is NotReady. Back up the kubeadm join command in the output for future use. Then, deploy the network plane.

    Figure 1 Successful initialization of the master Kubernetes nodes
    Figure 2 Initialization status of the master Kubernetes nodes
  2. Obtain and edit the one-click installation script. For details about how to obtain the script, see One-Click Installation Script.

    Download and edit the Kube-OVN one-click installation script install.sh and deploy it on the Kunpeng processor platform. You need to add the suffix -arm to the VERSION field to support proper running on the ARM64 platform. Set the following variables in the file to expected values based on the site requirements. Set NETWORK_TYPE to geneve or vlan based on site requirements.

    The Kube-OVN version and features are evolving rapidly. It is recommended that the Kube-OVN version obtained by the one-click installation script is the same as the image version. Otherwise, Kube-OVN may fail to be deployed and started in one-click mode.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    REGISTRY="kubeovn"
    NAMESPACE="kube-system"        # The ns to deploy kube-ovn
    POD_CIDR="10.16.0.0/16"          # Do NOT overlap with NODE/SVC/JOIN CIDR
    SVC_CIDR="10.96.0.0/12"          # Do NOT overlap with NODE/POD/JOIN CIDR
    JOIN_CIDR="100.64.0.0/16"        # Do NOT overlap with NODE/POD/SVC CIDR
    LABEL="node-role.kubernetes.io/master" # The node label to deploy OVN DB
    IFACE=""                        # The nic to support container network, if empty will use the nic that the default route use
    NETWORK_TYPE="geneve"        # geneve or vlan
    VERSION="v1.2.1-arm"
    
  3. Use the install.sh script to deploy cluster network components.
    1
    sh install.sh
    

    After the deployment is complete, the coredns service is in the Running state and nodes are in the Ready state, as shown in Figure 3 and Figure 4.

    Figure 3 Pods after Kube-OVN deployment
    Figure 4 Node status after Kube-OVN deployment
  4. Add nodes to the cluster.

    On other Kubernetes nodes to be deployed, run the kubeadm join command backed up in 1 to add the nodes to be deployed to the Kubernetes cluster.

    1
    2
    kubeadm join <master-ip:port> --token <your-token> \
    --discovery-token-ca-cert-hash sha256:<your-sha256-ca>
    

    After the cluster nodes are added, "This node has joined the cluster" is displayed, as shown in Figure 5. The Kube-OVN networking procedure is complete.

    Figure 5 Successful adding of cluster nodes