The enterprise administrator has the authority to add clusters. The cluster addition is roughly divided into 2 steps:
Install the Kubernetes cluster.
Initialize the Kato cluster Region service on the Kubernetes cluster, and then connect to the console management.
As shown in the figure above, click Add Cluster under the enterprise view cluster page to enter the Kato cluster adding page.
Kubernetes Cluster Preparation
Install from Bare Metal
Kato uses the RKE cluster installation solution to automate the installation of Kubernetes clusters. The user selects
Start installation from the host to enter this type of cluster list page, and the configuration window will pop up automatically if it is installed for the first time.
Fill in the cluster name and planning node attributes on the configuration page. The cluster name needs to be unique. The node attributes can be set as required. All node attributes must include
ETCD must be an odd number. The IP address of the node refers to the address that can be accessed through the host where the console is located, and the intranet IP address is the address for service communication between nodes. The SSH port is set according to the real port of the node, and the default is
Each node must meet the following conditions:
- Can connect to the Internet.
- X86 Linux operating systems such as Ubuntu, Centos, Debian, etc. have been installed.
- The system kernel is better than 5.10.
- Single node resource configuration test environment >= 4GB/2Core; production environment recommendation >= 32GB/8Core
- The disk root directory space is better than 30GB, the production environment
/var/lib/dockerseparately mount the disk >= 200GB, the root directory >= 100GB.
- Needs to be a clean operating system install.
After the installation of the cluster installed by the host, you can continue to add nodes, so it is not necessary to prepare all the nodes during the first experience. The
Computenodes can be expanded later as needed.
After the node planning is completed, you need to run the node initialization command on all nodes according to the prompts on the configuration page. This command mainly completes the operating system check, the password-free login configuration, the detection and installation of the Docker service, and the installation of related system tools.
After the node is ready, click the
Start Installation button to enter the installation process of the Kubernetes cluster.
Please note that the console cannot be closed during the installation process, otherwise the installation will enter a non-continuous state.
As shown in the figure above, the cluster is being installed. If you want to view more detailed logs, you can close the window and click the
View log function option in the cluster list. The cluster installation log will be queried. If an abnormal situation occurs, please make relevant node-related adjustments according to the log prompts and then
After the cluster is installed successfully, the cluster will be running. The running cluster supports operations such as querying Kubeconfig, node expansion, and deletion. This state can go to the next step [cluster initialization] (#kato-cluster initialization)
The kubectl command line tool does not exist in the cluster host installed in this way by default. If you need to use it, please refer to kubectl installation
Access to Kubernetes Cluster
The prerequisite for accessing the Kubernetes cluster is that you have installed the Kubernetes cluster and have a certain foundation for the basic use and operation of the Kubernetes cluster. Otherwise, we recommend that you use 1 or 3 to prepare the Kubernetes cluster. Before starting, the cluster needs to meet the following requirements:
- The cluster version should be v1.16 and above.
- We need to provide our Kubeconfig file with cluster management authority, and at the same time ensure that the network where the Kato console is located can use the Kubeconfig to communicate with the cluster.
- The first node of the node needs to ensure that ports 80, 443, 6060, 7070, 8443, 10254, 18080, 18081 are in idle state. These ports are required by the Kato gateway service.
Connect to Kubernetes cluster, and the docking Kubernetes cluster window will pop up when you first add it. You need to fill in the correct Kubeconfig file for confirmation. If the communication is normal, the cluster will be displayed in the list in the running state. In this state, you can enter the next step [cluster initialization] (#kato-cluster initialization).
Use Alibaba Cloud ACK cluster
This method requires the user to prepare an Alibaba Cloud RAM account with the correct permissions and fill in the AK/SK.
First, you need to activate the ACK service on Alibaba Cloud, and configure the RAM account and service permissions according to the product page guide as shown in the figure above. If an ACK cluster already exists in your account, all clusters will be listed after filling in AK/SK. If you have not purchased an ACK cluster, click Buy Cluster to help you quickly complete the cluster purchase.
Purchasing an ACK cluster in Alibaba Cloud is also a transaction with a certain threshold. If you have insufficient knowledge of Kubernetes clusters, the purchase process may even take more than 30 minutes. Kato will automate the process for you.
If you are a user of Tencent Cloud or Huawei Cloud, please actively provide feedback in the community. We will support it according to the intensity of user feedback.
Please note that the resources purchased by Kato are all paid on a pay-as-you-go model. If you need a monthly subscription, please upgrade it yourself.
Initialization of Kato Cluster
There are three forms of access to the Kubernetes cluster. If the status meets the requirements, you can choose to initialize the Kato cluster. The Kato cluster initialization means that the Kato Region-side service will be deployed in the Kubernetes cluster to control and take over the resources of the cluster. Deploy cloud-native applications.
Precautions for cluster initialization are as follows:
If you choose a Kubernetes cluster that is already in use, don’t worry, the next initialization action will not affect the existing business form of the cluster.
When the Kato cluster is initialized, the first and second nodes are used as the gateway node and the construction node by default. You can also add Annotations to the Kubernetes node to specify the corresponding node (kato.io/gateway-node=true or kato.io/chaos -node=true).
The following ports of the gateway node must be free: 80, 443, 6060, 7070, 8443, 10254, 18080, 18081, otherwise the initialization will fail.
If the number of cluster nodes is greater than 3, the high-availability mode will be installed by default.
During the installation process, you need to access the ports 6443, 8443, and 6060 of the gateway node. Please make sure that the relevant ports are accessible.
The initial state of all services in Kato Region is expected to occupy 2GB of memory space. Among them, monitoring services and database resources take up a lot.
After confirming that there is no problem with the appeal conditions, you can start the cluster initialization. For ACK clusters, Kato will automatically purchase RDS as the cluster database, NAS as the default storage, and SLB as the load balancer. Other cluster types deploy NFS storage types and single-instance databases by default. The initialization process is based on the product display process. Please do not close the window during the cluster initialization process.
If the initialization process has not been completed for a long time, you can use the following command to view it in the cluster:
kubectl get katocluster katocluster -n rbd-system
If the cluster is installed through the host, the kubectl command does not exist, please refer to kubectl installation to install the command.
To learn about custom cluster initialization parameters, please refer to the document Custom Cluster Initialization Parameters