### Configure KubeCube Installation Parameters Source: https://kubecube-io.github.io/docs/installation-guide/legacy-install/install-on-k8s Set various parameters to customize the KubeCube installation, including whether it's a pivot or member cluster, if Kubernetes is being installed, the node mode, and network-related configurations. These variables control the deployment behavior and cluster setup. ```bash # if install kubecube on pivot cluster INSTALL_KUBECUBE_PIVOT="true" # if install kubecube on member cluster INSTALL_KUBECUBE_MEMBER="false" # if install k8s INSTALL_KUBERNETES="false" # there are four node mode below: # "master" : node will be installed as a master of cluster # "node-join-master" : node will be install as a worker of cluster to join master # "control-plane-master" : node will be installed as a master to control plane of cluster # "node-join-control-plane" : node will be installed as a master to join control plane NODE_MODE="master" # +optional # must be set when INSTALL_KUBECUBE_MEMBER="true" # this value is the name of member cluster you # want to take over MEMBER_CLUSTER_NAME="" # +optional # must be set when NODE_MODE="control-plane-master" # or "node-join-control-plane" CONTROL_PLANE_ENDPOINT="" #{ip}:{port} , dns # master ip means master node ip of cluster MASTER_IP="x.x.x.x" # +optional # KUBECUBE_HOST must be set when as a member cluster to # join pivot cluster, the value is pivot node ip KUBECUBE_HOST="" # zone has two choice # 1. "cn" : in mainland # 2. "others" : out of mainland ZONE="cn" # k8s version you want to install KUBERNETES_VERSION="1.20.9" # +optional # the user who can access master node, it can be empty # when NODE_MODE="master" or "control-plane-master" SSH_USER="root" # +optional # the port specified to access master node, it can be empty # when NODE_MODE="master" or "control-plane-master" SSH_PORT=22 # +optional # must be empty when ACCESS_PRIVATE_KEY_PATH set # password for master user to access master node ACCESS_PASSWORD="" # +optional # must be empty when ACCESS_PASSWORD set # ACCESS_PRIVATE_KEY for master user to access master node ACCESS_PRIVATE_KEY_PATH="/root/.ssh/id_rsa" ``` -------------------------------- ### Install KubeCube (v1.8.x) Source: https://kubecube-io.github.io/docs/installation-guide/all-in-one/_print Download and execute the KubeCube installation script for v1.8.x. ```bash curl -fsSL https://kubecube.nos-eastchina1.126.net/kubecube-installer/release/v1.3/entry.sh | bash ``` -------------------------------- ### Install KubeCube (v1.4.x) Source: https://kubecube-io.github.io/docs/installation-guide/all-in-one/_print Download and execute the KubeCube installation script for v1.4.x, using the specified version. ```bash curl -fsSL https://kubecube.nos-eastchina1.126.net/kubecube-installer/${KUBECUBE_VERSION}/entry.sh | bash ``` -------------------------------- ### Configure Installation Parameters Source: https://kubecube-io.github.io/docs/installation-guide/legacy-install/install-on-k8s Set these parameters to customize the KubeCube installation on Kubernetes. Key settings include whether to install on a pivot cluster, if Kubernetes itself should be installed, the CNI to use, node modes, cluster zone, Kubernetes version, and various optional configurations for member clusters and SSH access. ```shell # if install kubecube on pivot cluster INSTALL_KUBECUBE_PIVOT="true" # if install k8s INSTALL_KUBERNETES="false" # k8s cni, support now is calico only CNI="calico" # there are four node mode below: # "master" : node will be installed as a master of cluster # "node-join-master" : node will be install as a worker of cluster to join master # "control-plane-master" : node will be installed as a master to control plane of cluster # "node-join-control-plane" : node will be installed as a master to join control plane NODE_MODE="master" # zone has two choice # 1. "cn" : in mainland # 2. "others" : out of mainland ZONE="cn" # k8s version you want to install # support now is: 1.19.13, 1.20.9, 1.21.2, 1.22.2, 1.23.5 KUBERNETES_VERSION="1.23.5" # +optional # must be set when NODE_MODE="control-plane-master" # or "node-join-control-plane" CONTROL_PLANE_ENDPOINT="" #{ip}:{port} , dns # +optional # KUBERNETES_BIND_ADDRESS generally is node_ip # can be set when NODE_MODE="master" ot "control-plane-master" # default value is $(hostname -I |awk '{print $1}') KUBERNETES_BIND_ADDRESS="" #{node_ip} ####################################################################### # member cluster config # used when INSTALL_KUBECUBE_MEMBER="true" ####################################################################### # if install kubecube on member cluster INSTALL_KUBECUBE_MEMBER="false" # +optional # KUBECUBE_HOST must be set when as a member cluster to # join pivot cluster, the value is pivot node ip KUBECUBE_HOST="" # +optional # must be set when INSTALL_KUBECUBE_MEMBER="true" # this value is the name of member cluster you # want to take over MEMBER_CLUSTER_NAME="" ####################################################################### # ssh config # used when NODE_MODE="node-join-master" or node-join-control-plane ####################################################################### # +optional # master ip means master node ip of cluster MASTER_IP="" # +optional # the user who can access master node, it can be empty SSH_USER="root" # +optional # the port specified to access master node, it can be empty SSH_PORT=22 # +optional # must be empty when ACCESS_PRIVATE_KEY_PATH set # password for master user to access master node ACCESS_PASSWORD="" # +optional # must be empty when ACCESS_PASSWORD set # ACCESS_PRIVATE_KEY for master user to access master node ACCESS_PRIVATE_KEY_PATH="/root/.ssh/id_rsa" ####################################################################### # offline config # used when offline install choose, must lift offline pkg first ####################################################################### OFFLINE_INSTALL="false" OFFLINE_PKG_PATH="" ####################################################################### # container runtime config # if value is docker, then use docker as container runtime # else if value is containerd, then use containerd as container runtime ####################################################################### CONTAINER_RUNTIME="containerd" ``` -------------------------------- ### Install CertManager Source: https://kubecube-io.github.io/docs/user-guide/kubediag/_print Run this command to quickly install CertManager, which KubeDiag uses for certificate management. Skip if CertManager is already installed. ```bash kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v1.0.2/cert-manager.yaml ``` -------------------------------- ### KubeCube Installation Parameters Source: https://kubecube-io.github.io/docs/installation-guide/legacy-install/install-on-k8s Configure essential parameters for installing KubeCube on an existing Kubernetes cluster. This includes setting the pivot cluster flag, Kubernetes installation status, CNI, node mode, zone, Kubernetes version, and control plane endpoint. ```bash # if install kubecube on pivot cluster INSTALL_KUBECUBE_PIVOT="true" # if install k8s INSTALL_KUBERNETES="false" # k8s cni, support now is calico only CNI="calico" # there are four node mode below: # "master" : node will be installed as a master of cluster # "node-join-master" : node will be install as a worker of cluster to join master # "control-plane-master" : node will be installed as a master to control plane of cluster # "node-join-control-plane" : node will be installed as a master to join control plane NODE_MODE="master" # zone has two choice # 1. "cn" : in mainland # 2. "others" : out of mainland ZONE="cn" # k8s version you want to install # support now is: 1.19.13, 1.20.9, 1.21.2, 1.22.2, 1.23.5 KUBERNETES_VERSION="1.23.5" # +optional # must be set when NODE_MODE="control-plane-master" # or "node-join-control-plane" CONTROL_PLANE_ENDPOINT="" #{ip}:{port} , dns # +optional # KUBERNETES_BIND_ADDRESS generally is node_ip # can be set when NODE_MODE="master" ot "control-plane-master" # default value is $(hostname -I |awk '{print $1}') KUBERNETES_BIND_ADDRESS="" #{node_ip} ``` -------------------------------- ### Configure Member Cluster Installation Parameters Source: https://kubecube-io.github.io/docs/installation-guide/legacy-install/add-member-k8s Set installation parameters to configure the cluster as a member, specifying Kubernetes installation, cluster name, and pivot cluster IP. ```shell # if install kubecube on pivot cluster INSTALL_KUBECUBE_PIVOT="false" # if install k8s INSTALL_KUBERNETES="true" # k8s cni, support now is calico only CNI="calico" # there are four node mode below: # "master" : node will be installed as a master of cluster # "node-join-master" : node will be install as a worker of cluster to join master # "control-plane-master" : node will be installed as a master to control plane of cluster # "node-join-control-plane" : node will be installed as a master to join control plane NODE_MODE="master" # zone has two choice # 1. "cn" : in mainland # 2. "others" : out of mainland ZONE="cn" # k8s version you want to install # support now is: 1.19.13, 1.20.9, 1.21.2, 1.22.2, 1.23.5 KUBERNETES_VERSION="1.23.5" # +optional # must be set when NODE_MODE="control-plane-master" # or "node-join-control-plane" CONTROL_PLANE_ENDPOINT="" #{ip}:{port} , dns # +optional # KUBERNETES_BIND_ADDRESS generally is node_ip # can be set when NODE_MODE="master" ot "control-plane-master" # default value is $(hostname -I |awk '{print $1}') KUBERNETES_BIND_ADDRESS="" #{node_ip} ####################################################################### # member cluster config # used when INSTALL_KUBECUBE_MEMBER="true" ####################################################################### # if install kubecube on member cluster INSTALL_KUBECUBE_MEMBER="true" # +optional # KUBECUBE_HOST must be set when as a member cluster to # join pivot cluster, the value is pivot node ip KUBECUBE_HOST="y.y.y.y" # +optional # must be set when INSTALL_KUBECUBE_MEMBER="true" # this value is the name of member cluster you # want to take over MEMBER_CLUSTER_NAME="member-1" ####################################################################### # ssh config # used when NODE_MODE="node-join-master" or node-join-control-plane ####################################################################### # +optional # master ip means master node ip of cluster MASTER_IP="" # +optional # the user who can access master node, it can be empty SSH_USER="root" # +optional # the port specified to access master node, it can be empty SSH_PORT=22 # +optional # must be empty when ACCESS_PRIVATE_KEY_PATH set # password for master user to access master node ACCESS_PASSWORD="" # +optional # must be empty when ACCESS_PASSWORD set # ACCESS_PRIVATE_KEY for master user to access master node ACCESS_PRIVATE_KEY_PATH="/root/.ssh/id_rsa" ####################################################################### # offline config # used when offline install choose, must lift offline pkg first ####################################################################### OFFLINE_INSTALL="false" OFFLINE_PKG_PATH="" ####################################################################### # container runtime config # if value is docker, then use docker as container runtime # else if value is containerd, then use containerd as container runtime ####################################################################### CONTAINER_RUNTIME="containerd" ``` -------------------------------- ### Configure KubeCube Member Cluster Installation Parameters Source: https://kubecube-io.github.io/docs/installation-guide/_print Sets parameters for installing KubeCube on a member cluster, including Kubernetes installation, cluster naming, and pivot cluster host IP. ```shell # if install kubecube on pivot cluster INSTALL_KUBECUBE_PIVOT="false" # if install kubecube on member cluster INSTALL_KUBECUBE_MEMBER="true" # if install k8s INSTALL_KUBERNETES="true" # there are four node mode below: # "master" : node will be installed as a master of cluster # "node-join-master" : node will be install as a worker of cluster to join master # "control-plane-master" : node will be installed as a master to control plane of cluster # "node-join-control-plane" : node will be installed as a master to join control plane NODE_MODE="master" # +optional # must be set when INSTALL_KUBECUBE_MEMBER="true" # this value is the name of member cluster you # want to take over MEMBER_CLUSTER_NAME="member-1" # +optional # must be set when NODE_MODE="control-plane-master" # or "node-join-control-plane" CONTROL_PLANE_ENDPOINT="" # master ip means master node ip of cluster MASTER_IP="x.x.x.x" # +optional # KUBECUBE_HOST must be set when as a member cluster to # join pivot cluster, the value is pivot node ip KUBECUBE_HOST="y.y.y.y" # zone has two choice # 1. "cn" : in mainland # 2. "others" : out of mainland ZONE="cn" # k8s version you want to install KUBERNETES_VERSION="1.20.9" # +optional # the user who can access master node, it can be empty # when NODE_MODE="master" or "control-plane-master" SSH_USER="root" # +optional # the port specified to access master node, it can be empty # when NODE_MODE="master" or "control-plane-master" SSH_PORT=22 # +optional # must be empty when ACCESS_PRIVATE_KEY_PATH set # password for master user to access master node ACCESS_PASSWORD="" # +optional # must be empty when ACCESS_PASSWORD set # ACCESS_PRIVATE_KEY for master user to access master node ACCESS_PRIVATE_KEY_PATH="/root/.ssh/id_rsa" ``` -------------------------------- ### Configure KubeCube Installation Parameters Source: https://kubecube-io.github.io/docs/installation-guide/legacy-install/install-on-multi-node Configure installation parameters in the install.conf file to customize the KubeCube deployment. This includes settings for high availability, Kubernetes installation, CNI, node modes, zones, Kubernetes versions, and cluster configurations. ```bash # if install kubecube on pivot cluster INSTALL_KUBECUBE_PIVOT="true" # if install k8s INSTALL_KUBERNETES="false" # k8s cni, support now is calico only CNI="calico" # there are four node mode below: # "master" : node will be installed as a master of cluster # "node-join-master" : node will be install as a worker of cluster to join master # "control-plane-master" : node will be installed as a master to control plane of cluster # "node-join-control-plane" : node will be installed as a master to join control plane NODE_MODE="master" # zone has two choice # 1. "cn" : in mainland # 2. "others" : out of mainland ZONE="cn" # k8s version you want to install # support now is: 1.19.13, 1.20.9, 1.21.2, 1.22.2, 1.23.5 KUBERNETES_VERSION="1.23.5" # +optional # must be set when NODE_MODE="control-plane-master" # or "node-join-control-plane" CONTROL_PLANE_ENDPOINT="" #{ip}:{port} , dns # +optional # KUBERNETES_BIND_ADDRESS generally is node_ip # can be set when NODE_MODE="master" ot "control-plane-master" # default value is $(hostname -I |awk '{print $1}') KUBERNETES_BIND_ADDRESS="" #{node_ip} ####################################################################### # member cluster config # used when INSTALL_KUBECUBE_MEMBER="true" ####################################################################### # if install kubecube on member cluster INSTALL_KUBECUBE_MEMBER="false" # +optional # KUBECUBE_HOST must be set when as a member cluster to # join pivot cluster, the value is pivot node ip KUBECUBE_HOST="" # +optional # must be set when INSTALL_KUBECUBE_MEMBER="true" # this value is the name of member cluster you # want to take over MEMBER_CLUSTER_NAME="" ####################################################################### # ssh config # used when NODE_MODE="node-join-master" or node-join-control-plane ####################################################################### # +optional # master ip means master node ip of cluster MASTER_IP="" # +optional # the user who can access master node, it can be empty SSH_USER="root" # +optional # the port specified to access master node, it can be empty SSH_PORT=22 # +optional # must be empty when ACCESS_PRIVATE_KEY_PATH set # password for master user to access master node ACCESS_PASSWORD="" # +optional # must be empty when ACCESS_PASSWORD set # ACCESS_PRIVATE_KEY for master user to access master node ACCESS_PRIVATE_KEY_PATH="/root/.ssh/id_rsa" ####################################################################### # offline config # used when offline install choose, must lift offline pkg first ####################################################################### OFFLINE_INSTALL="false" OFFLINE_PKG_PATH="" ####################################################################### # container runtime config # if value is docker, then use docker as container runtime # else if value is containerd, then use containerd as container runtime ####################################################################### CONTAINER_RUNTIME="docker" ``` -------------------------------- ### Execute KubeCube Installation Script Source: https://kubecube-io.github.io/docs/installation-guide/legacy-install/install-on-k8s Run the KubeCube installation script by downloading it using curl and piping it to bash. The CUSTOMIZE environment variable should be set to 'true' to allow for custom configurations. ```bash export CUSTOMIZE="true";curl -fsSL https://kubecube.nos-eastchina1.126.net/kubecube-installer/${KUBECUBE_VERSION}/entry.sh | bash ``` -------------------------------- ### Configure Node Installation Parameters Source: https://kubecube-io.github.io/docs/installation-guide/legacy-install/add-k8s-node Configure essential parameters for installing Kubernetes and Kubecube on the new node. This includes setting the node mode, zone, Kubernetes version, and SSH access details for the master node. ```bash # if install kubecube on pivot cluster INSTALL_KUBECUBE_PIVOT="false" # if install k8s INSTALL_KUBERNETES="true" # there are four node mode below: # "master" : node will be installed as a master of cluster # "node-join-master" : node will be install as a worker of cluster to join master # "control-plane-master" : node will be installed as a master to control plane of cluster # "node-join-control-plane" : node will be installed as a master to join control plane NODE_MODE="node-join-master" # zone has two choice # 1. "cn" : in mainland # 2. "others" : out of mainland ZONE="cn" # k8s version you want to install # support now is: 1.20.9, 1.19.13, 1.18.20, 1.21.2 KUBERNETES_VERSION="1.20.9" # +optional # must be set when NODE_MODE="control-plane-master" # or "node-join-control-plane" CONTROL_PLANE_ENDPOINT="" ####################################################################### # member cluster config # used when INSTALL_KUBECUBE_MEMBER="true" ####################################################################### # if install kubecube on member cluster INSTALL_KUBECUBE_MEMBER="false" # +optional # KUBECUBE_HOST must be set when as a member cluster to # join pivot cluster, the value is pivot node ip KUBECUBE_HOST="" # +optional # must be set when INSTALL_KUBECUBE_MEMBER="true" # this value is the name of member cluster you # want to take over MEMBER_CLUSTER_NAME="" ####################################################################### # ssh config # used when NODE_MODE="node-join-master" or node-join-control-plane ####################################################################### # +optional # master ip means master node ip of cluster MASTER_IP="y.y.y.y" # +optional # the user who can access master node, it can be empty SSH_USER="root" # +optional # the port specified to access master node, it can be empty SSH_PORT=22 # +optional # must be empty when ACCESS_PRIVATE_KEY_PATH set # password for master user to access master node ACCESS_PASSWORD="" # +optional # must be empty when ACCESS_PASSWORD set # ACCESS_PRIVATE_KEY for master user to access master node ACCESS_PRIVATE_KEY_PATH="/root/.ssh/id_rsa" ####################################################################### # offline config # used when offline install choose, must lift offline pkg first ####################################################################### OFFLINE_INSTALL="false" OFFLINE_PKG_PATH="" ``` -------------------------------- ### Set KubeCube Version and Execute Installer Source: https://kubecube-io.github.io/docs/_print Set the KUBECUBE_VERSION environment variable and then download and execute the KubeCube installer script. This script handles the deployment process. ```bash KUBECUBE_VERSION=v1.2 ``` ```bash export CUSTOMIZE="true";curl -fsSL https://kubecube.nos-eastchina1.126.net/kubecube-installer/${KUBECUBE_VERSION}/entry.sh | bash ``` -------------------------------- ### Configure KubeCube Installation Parameters Source: https://kubecube-io.github.io/docs/installation-guide/legacy-install/install-on-k8s Configure essential parameters for the KubeCube installation script. This includes setting whether KubeCube is installed on a pivot or member cluster, Kubernetes version, node mode, zone, and SSH access details if applicable. ```bash # if install kubecube on pivot cluster INSTALL_KUBECUBE_PIVOT="true" # if install k8s INSTALL_KUBERNETES="false" # there are four node mode below: # "master" : node will be installed as a master of cluster # "node-join-master" : node will be install as a worker of cluster to join master # "control-plane-master" : node will be installed as a master to control plane of cluster # "node-join-control-plane" : node will be installed as a master to join control plane NODE_MODE="master" # zone has two choice # 1. "cn" : in mainland # 2. "others" : out of mainland ZONE="cn" # k8s version you want to install # support now is: 1.20.9, 1.19.13, 1.18.20, 1.21.2 KUBERNETES_VERSION="1.20.9" # +optional # must be set when NODE_MODE="control-plane-master" # or "node-join-control-plane" CONTROL_PLANE_ENDPOINT="" #{ip}:{port} , dns ####################################################################### # member cluster config # used when INSTALL_KUBECUBE_MEMBER="true" ####################################################################### # if install kubecube on member cluster INSTALL_KUBECUBE_MEMBER="false" # +optional # KUBECUBE_HOST must be set when as a member cluster to # join pivot cluster, the value is pivot node ip KUBECUBE_HOST="" # +optional # must be set when INSTALL_KUBECUBE_MEMBER="true" # this value is the name of member cluster you # want to take over MEMBER_CLUSTER_NAME="" ####################################################################### # ssh config # used when NODE_MODE="node-join-master" or node-join-control-plane ####################################################################### # +optional # master ip means master node ip of cluster MASTER_IP="" # +optional # the user who can access master node, it can be empty SSH_USER="root" # +optional # the port specified to access master node, it can be empty SSH_PORT=22 # +optional # must be empty when ACCESS_PRIVATE_KEY_PATH set # password for master user to access master node ACCESS_PASSWORD="" # +optional # must be empty when ACCESS_PASSWORD set # ACCESS_PRIVATE_KEY for master user to access master node ACCESS_PRIVATE_KEY_PATH="/root/.ssh/id_rsa" ####################################################################### # offline config # used when offline install choose, must lift offline pkg first ####################################################################### OFFLINE_INSTALL="false" OFFLINE_PKG_PATH="" ``` -------------------------------- ### KubeCube Installation Configuration (install.conf) Source: https://kubecube-io.github.io/docs/installation-guide/legacy-install/install-on-multi-node Configure KubeCube installation parameters in the install.conf file. This includes setting the node mode, zone, Kubernetes version, and control plane endpoint. ```shell # if install kubecube on pivot cluster INSTALL_KUBECUBE_PIVOT="true" # if install k8s INSTALL_KUBERNETES="false" # there are four node mode below: # "master" : node will be installed as a master of cluster # "node-join-master" : node will be install as a worker of cluster to join master # "control-plane-master" : node will be installed as a master to control plane of cluster # "node-join-control-plane" : node will be installed as a master to join control plane NODE_MODE="control-plane-master" # zone has two choice # 1. "cn" : in mainland # 2. "others" : out of mainland ZONE="cn" # k8s version you want to install # support now is: 1.20.9, 1.19.13, 1.18.20, 1.21.2 KUBERNETES_VERSION="1.20.9" # +optional # must be set when NODE_MODE="control-plane-master" # or "node-join-control-plane" CONTROL_PLANE_ENDPOINT="" #{ip}:{port} , dns ####################################################################### # member cluster config # used when INSTALL_KUBECUBE_MEMBER="true" ####################################################################### # if install kubecube on member cluster INSTALL_KUBECUBE_MEMBER="false" # +optional # KUBECUBE_HOST must be set when as a member cluster to # join pivot cluster, the value is pivot node ip KUBECUBE_HOST="" # +optional # must be set when INSTALL_KUBECUBE_MEMBER="true" # this value is the name of member cluster you # want to take over MEMBER_CLUSTER_NAME="" ####################################################################### # ssh config # used when NODE_MODE="node-join-master" or node-join-control-plane ####################################################################### # +optional # master ip means master node ip of cluster MASTER_IP="10.173.32.4" # +optional # the user who can access master node, it can be empty SSH_USER="root" # +optional # the port specified to access master node, it can be empty SSH_PORT=22 # +optional # must be empty when ACCESS_PRIVATE_KEY_PATH set # password for master user to access master node ACCESS_PASSWORD="" # +optional # must be empty when ACCESS_PASSWORD set # ACCESS_PRIVATE_KEY for master user to access master node ACCESS_PRIVATE_KEY_PATH="/root/.ssh/id_rsa" ####################################################################### # offline config # used when offline install choose, must lift offline pkg first ####################################################################### OFFLINE_INSTALL="false" OFFLINE_PKG_PATH="" ``` -------------------------------- ### Offline Installation Configuration Source: https://kubecube-io.github.io/docs/installation-guide/legacy-install/install-on-k8s Configure parameters for offline installation. Set OFFLINE_INSTALL to 'true' and specify the path to the offline package. ```bash ####################################################################### # offline config # used when offline install choose, must lift offline pkg first ####################################################################### OFFLINE_INSTALL="false" OFFLINE_PKG_PATH="" ``` -------------------------------- ### KubeCube Helm Chart Values Configuration Source: https://kubecube-io.github.io/docs/installation-guide/_print Example configuration for the `pivot-value.yaml` file when installing KubeCube via Helm. This includes settings for node IP, dependencies, logging, and kubeconfig. ```yaml # pivot-value.yaml global: # 管控集群的 Node IP,用来暴露 KubeCube 的 NodePort service nodeIP: x.x.x.x dependencesEnable: ingressController: "false" # 如果集群中没有部署 ingress controller,请将此设置为 "true" localPathStorage: "false" # 如果集群中没有部署 local path storage,请将此设置为 "true" metricServer: "false" # # 如果集群中没有部署 metric server,请将此设置为 "true" # 如果要启动日志功能,请假以下值设置为 "enabled" hotPlugEnable: pivot: logseer: "disabled" logagent: "disabled" elasticsearch: "disabled" localKubeConfig: xx # 管控集群的 kubeconfig 的 base64 pivotKubeConfig: xx # 管控集群的 kubeconfig 的 base64 warden: containers: warden: args: cluster: "pivot-cluster" # 管控集群名 ``` -------------------------------- ### Configure Node and Cluster Settings Source: https://kubecube-io.github.io/docs/installation-guide/legacy-install/install-on-multi-node Configure essential parameters for installing Kubecube, including Kubernetes installation, CNI, node mode, zone, Kubernetes version, and cluster endpoint. ```shell # if install kubecube on pivot cluster INSTALL_KUBECUBE_PIVOT="false" # if install k8s INSTALL_KUBERNETES="true" # k8s cni, support now is calico only CNI="calico" # there are four node mode below: # "master" : node will be installed as a master of cluster # "node-join-master" : node will be install as a worker of cluster to join master # "control-plane-master" : node will be installed as a master to control plane of cluster # "node-join-control-plane" : node will be installed as a master to join control plane NODE_MODE="node-join-master" # zone has two choice # 1. "cn" : in mainland # 2. "others" : out of mainland ZONE="cn" # k8s version you want to install # support now is: 1.19.13, 1.20.9, 1.21.2, 1.22.2, 1.23.5 KUBERNETES_VERSION="1.23.5" # +optional # must be set when NODE_MODE="control-plane-master" # or "node-join-control-plane" CONTROL_PLANE_ENDPOINT="" #{ip}:{port} , dns # +optional # KUBERNETES_BIND_ADDRESS generally is node_ip # can be set when NODE_MODE="master" ot "control-plane-master" # default value is $(hostname -I |awk '{print $1}') KUBERNETES_BIND_ADDRESS="" #{node_ip} ``` -------------------------------- ### Install Local Manifests Source: https://kubecube-io.github.io/docs/developer-guide/_print Installs local manifests for Kubernetes. Ensure K8S_API_SERVER_ENDPOINT is set to your k8s api-server address. ```bash K8S_API_SERVER_ENDPOINT="0.0.0.0:6443" bash hack/install_local.sh ${K8S_API_SERVER_ENDPOINT} ``` -------------------------------- ### Execute Kubecube Installer Script Source: https://kubecube-io.github.io/docs/installation-guide/legacy-install/add-k8s-node Download and execute the Kubecube installer script to add a new node. The script can be run with or without pre-downloading offline packages and images. ```bash export CUSTOMIZE="true";curl -fsSL https://kubecube.nos-eastchina1.126.net/kubecube-installer/${KUBECUBE_VERSION}/entry.sh | bash ``` ```bash export PRE_DOWNLOAD="true";curl -fsSL https://kubecube.nos-eastchina1.126.net/kubecube-installer/${KUBECUBE_VERSION}/entry.sh | bash ``` -------------------------------- ### Configure Control-Plane Master Node Installation Parameters Source: https://kubecube-io.github.io/docs/installation-guide/legacy-install/_print Set environment variables to configure the installation of Kubecube on a new control-plane master node. Key parameters include NODE_MODE, MASTER_IP, and CONTROL_PLANE_ENDPOINT for high availability. ```bash # if install kubecube on pivot cluster INSTALL_KUBECUBE_PIVOT="false" # if install kubecube on member cluster INSTALL_KUBECUBE_MEMBER="false" # if install k8s INSTALL_KUBERNETES="true" # there are four node mode below: # "master" : node will be installed as a master of cluster # "node-join-master" : node will be install as a worker of cluster to join master # "control-plane-master" : node will be installed as a master to control plane of cluster # "node-join-control-plane" : node will be installed as a master to join control plane NODE_MODE="node-join-control-plane" # +optional # must be set when INSTALL_KUBECUBE_MEMBER="true" # this value is the name of member cluster you # want to take over MEMBER_CLUSTER_NAME="" # +optional # must be set when NODE_MODE="control-plane-master" # or "node-join-control-plane" CONTROL_PLANE_ENDPOINT="10.173.32.10" # master ip means master node ip of cluster MASTER_IP="10.173.32.4" # +optional # KUBECUBE_HOST must be set when as a member cluster to # join pivot cluster, the value is pivot node ip KUBECUBE_HOST="" # zone has two choice # 1. "cn" : in mainland # 2. "others" : out of mainland ZONE="cn" # k8s version you want to install KUBERNETES_VERSION="1.20.9" # +optional # the user who can access master node, it can be empty # when NODE_MODE="master" or "control-plane-master" SSH_USER="root" # +optional # the port specified to access master node, it can be empty # when NODE_MODE="master" or "control-plane-master" SSH_PORT=22 # +optional # must be empty when ACCESS_PRIVATE_KEY_PATH set # password for master user to access master node ACCESS_PASSWORD="" # +optional # must be empty when ACCESS_PASSWORD set # ACCESS_PRIVATE_KEY for master user to access master node ACCESS_PRIVATE_KEY_PATH="/root/.ssh/id_rsa" ``` -------------------------------- ### Set Kubecube Version and Deploy Source: https://kubecube-io.github.io/docs/installation-guide/_print Sets the Kubecube version and executes the installation script. Ensure the KUBECUBE_VERSION is correctly set before running. ```bash KUBECUBE_VERSION=v1.2 ``` ```bash export CUSTOMIZE="true";curl -fsSL https://kubecube.nos-eastchina1.126.net/kubecube-installer/${KUBECUBE_VERSION}/entry.sh | bash ``` -------------------------------- ### Kubecube Installation Configuration Source: https://kubecube-io.github.io/docs/installation-guide/legacy-install/_print Configure installation parameters for Kubecube. This includes cluster type, Kubernetes version, and SSH access details. ```shell # if install kubecube on pivot cluster INSTALL_KUBECUBE_PIVOT="false" # if install k8s INSTALL_KUBERNETES="true" # there are four node mode below: # "master" : node will be installed as a master of cluster # "node-join-master" : node will be install as a worker of cluster to join master # "control-plane-master" : node will be installed as a master to control plane of cluster # "node-join-control-plane" : node will be installed as a master to join control plane NODE_MODE="node-join-master" # zone has two choice # 1. "cn" : in mainland # 2. "others" : out of mainland ZONE="cn" # k8s version you want to install # support now is: 1.20.9, 1.19.13, 1.18.20, 1.21.2 KUBERNETES_VERSION="1.20.9" # +optional # must be set when NODE_MODE="control-plane-master" # or "node-join-control-plane" CONTROL_PLANE_ENDPOINT="" #{ip}:{port} , dns ####################################################################### # member cluster config # used when INSTALL_KUBECUBE_MEMBER="true" ####################################################################### # if install kubecube on member cluster INSTALL_KUBECUBE_MEMBER="false" # +optional # KUBECUBE_HOST must be set when as a member cluster to # join pivot cluster, the value is pivot node ip KUBECUBE_HOST="" # +optional # must be set when INSTALL_KUBECUBE_MEMBER="true" # this value is the name of member cluster you # want to take over MEMBER_CLUSTER_NAME="" ####################################################################### # ssh config # used when NODE_MODE="node-join-master" or node-join-control-plane ####################################################################### # +optional # master ip means master node ip of cluster MASTER_IP="y.y.y.y" # +optional # the user who can access master node, it can be empty SSH_USER="root" # +optional # the port specified to access master node, it can be empty SSH_PORT=22 # +optional # must be empty when ACCESS_PRIVATE_KEY_PATH set # password for master user to access master node ACCESS_PASSWORD="" # +optional # must be empty when ACCESS_PASSWORD set # ACCESS_PRIVATE_KEY for master user to access master node ACCESS_PRIVATE_KEY_PATH="/root/.ssh/id_rsa" ####################################################################### # offline config # used when offline install choose, must lift offline pkg first ####################################################################### OFFLINE_INSTALL="false" OFFLINE_PKG_PATH="" ``` -------------------------------- ### Configure Member Cluster Installation Parameters Source: https://kubecube-io.github.io/docs/installation-guide/legacy-install/_print These parameters are essential when installing KubeCube on a member cluster. Ensure MEMBER_CLUSTER_NAME is unique and MASTER_IP/KUBECUBE_HOST point to the correct nodes. ```bash # if install kubecube on pivot cluster INSTALL_KUBECUBE_PIVOT="false" # if install k8s INSTALL_KUBERNETES="true" # there are four node mode below: # "master" : node will be installed as a master of cluster # "node-join-master" : node will be install as a worker of cluster to join master # "control-plane-master" : node will be installed as a master to control plane of cluster # "node-join-control-plane" : node will be installed as a master to join control plane NODE_MODE="master" # zone has two choice # 1. "cn" : in mainland # 2. "others" : out of mainland ZONE="cn" # k8s version you want to install # support now is: 1.20.9, 1.19.13, 1.18.20, 1.21.2 KUBERNETES_VERSION="1.20.9" # +optional # must be set when NODE_MODE="control-plane-master" # or "node-join-control-plane" CONTROL_PLANE_ENDPOINT="" #{ip}:{port} , dns ####################################################################### # member cluster config # used when INSTALL_KUBECUBE_MEMBER="true" ####################################################################### # if install kubecube on member cluster INSTALL_KUBECUBE_MEMBER="true" # +optional # KUBECUBE_HOST must be set when as a member cluster to # join pivot cluster, the value is pivot node ip KUBECUBE_HOST="y.y.y.y" # +optional # must be set when INSTALL_KUBECUBE_MEMBER="true" # this value is the name of member cluster you # want to take over MEMBER_CLUSTER_NAME="member-1" ####################################################################### # ssh config # used when NODE_MODE="node-join-master" or node-join-control-plane ####################################################################### # +optional # master ip means master node ip of cluster MASTER_IP="" # +optional # the user who can access master node, it can be empty SSH_USER="root" # +optional # the port specified to access master node, it can be empty SSH_PORT=22 # +optional # must be empty when ACCESS_PRIVATE_KEY_PATH set # password for master user to access master node ACCESS_PASSWORD="" # +optional # must be empty when ACCESS_PASSWORD set # ACCESS_PRIVATE_KEY for master user to access master node ACCESS_PRIVATE_KEY_PATH="/root/.ssh/id_rsa" ####################################################################### # offline config # used when offline install choose, must lift offline pkg first ####################################################################### OFFLINE_INSTALL="false" OFFLINE_PKG_PATH="" ``` -------------------------------- ### Configure Member Cluster Installation Parameters Source: https://kubecube-io.github.io/docs/installation-guide/legacy-install/_print Set these parameters when installing KubeCube on a member cluster. Ensure MEMBER_CLUSTER_NAME is unique and provide the correct IP addresses for the node and pivot cluster. ```shell # if install kubecube on pivot cluster INSTALL_KUBECUBE_PIVOT="false" # if install k8s INSTALL_KUBERNETES="true" # k8s cni, support now is calico only CNI="calico" # there are four node mode below: # "master" : node will be installed as a master of cluster # "node-join-master" : node will be install as a worker of cluster to join master # "control-plane-master" : node will be installed as a master to control plane of cluster # "node-join-control-plane" : node will be installed as a master to join control plane NODE_MODE="master" # zone has two choice # 1. "cn" : in mainland # 2. "others" : out of mainland ZONE="cn" # k8s version you want to install # support now is: 1.19.13, 1.20.9, 1.21.2, 1.22.2, 1.23.5 KUBERNETES_VERSION="1.23.5" # +optional # must be set when NODE_MODE="control-plane-master" # or "node-join-control-plane" CONTROL_PLANE_ENDPOINT="" #{ip}:{port} , dns # +optional # KUBERNETES_BIND_ADDRESS generally is node_ip # can be set when NODE_MODE="master" ot "control-plane-master" # default value is $(hostname -I |awk '{print $1}') KUBERNETES_BIND_ADDRESS="" #{node_ip} ####################################################################### # member cluster config # used when INSTALL_KUBECUBE_MEMBER="true" ####################################################################### # if install kubecube on member cluster INSTALL_KUBECUBE_MEMBER="true" # +optional # KUBECUBE_HOST must be set when as a member cluster to # join pivot cluster, the value is pivot node ip KUBECUBE_HOST="y.y.y.y" # +optional # must be set when INSTALL_KUBECUBE_MEMBER="true" # this value is the name of member cluster you # want to take over MEMBER_CLUSTER_NAME="member-1" ####################################################################### # ssh config # used when NODE_MODE="node-join-master" or node-join-control-plane ####################################################################### # +optional # master ip means master node ip of cluster MASTER_IP="" # +optional # the user who can access master node, it can be empty SSH_USER="root" # +optional # the port specified to access master node, it can be empty SSH_PORT=22 # +optional # must be empty when ACCESS_PRIVATE_KEY_PATH set # password for master user to access master node ACCESS_PASSWORD="" # +optional # must be empty when ACCESS_PASSWORD set # ACCESS_PRIVATE_KEY for master user to access master node ACCESS_PRIVATE_KEY_PATH="/root/.ssh/id_rsa" ####################################################################### # offline config # used when offline install choose, must lift offline pkg first ####################################################################### OFFLINE_INSTALL="false" OFFLINE_PKG_PATH="" ####################################################################### # container runtime config # if value is docker, then use docker as container runtime # else if value is containerd, then use containerd as container runtime ####################################################################### CONTAINER_RUNTIME="docker" ```