Huawei Cloud Connect to Kato

This article mainly explains how to install Kato on Cloud Container Engine on HUAWEI CLOUD and connect to Kato Cloud.

Prerequisites

Before you begin, please check the following prerequisites:

  1. Understand Kato Cloud and proceed to register and Login.
  2. Make sure that your HUAWEI CLOUD account supports on-demand purchase of resources, such as account balance greater than 100 dollars and real-name authentication.

Prepare a CCE cluster

Before installing Kato, a standard kubernetes on CCE is required. The version of our cluster is v1.17.9, the node specification is s6.large.4 (2 cores, 8GB), the control node is 3, and the computing node is 2.

  1. Only 3 control nodes can ensure the high availability of the kubernetes cluster.
  2. s6.large.4 (2 cores, 8GB), 2 nodes is the minimum configuration. In a production environment, it is recommended to choose a higher configuration according to the actual situation.
  3. Kato’s minimum requirement for Kubernetes version is 1.13. It is recommended to select the highest version supported by CCE v1.17.9.

Prepare an Elastic Load Balancing ELB

In order to ensure the high availability of the Kato cluster, it is necessary to add a layer of load balancing before the traffic enters the gateway node of Kato. For details, please refer to Elastic Load Balancing ELB.

ELB needs to open the 4 ports 80, 443, 8443, and 6060.

Prepare an RDS

Prepare an RDS with a database engine of MySQL and a version of 5.7.

In addition, you need to create a database for Kato, the database name is region.

Connect to CCE Cluster Through kubectl

CCE provides two ways to connect to the cluster, namely kubectl and web-terminal plugin. web-terminal is a plug-in that supports the use of kubectl on the web interface. There are restrictions when using linux commands. It is recommended to use kubectl directly. For details, please refer to Connect to CCE cluster through kubectl or web-terminal plug-in.

Install Helm

Use the following command to install:

wget https://gitlab.com/gridworkz/kato/pkg/helm && chmod +x helm && mv helm /usr/local/bin/

Note: The version of helm needs to be 3.0 and above, helm 2.0+ is not supported.

Install Kato Operator

  1. Create namespace: rbd-system:
 kubectl create ns rbd-system
  1. Install Kato Operator
 # Add repository
 helm repo add kato https://openchart.gridworkz.com/gridworkz/kato
 # Installation
 helm install kato-operator-cloud kato/kato-operator \
 --namespace rbd-system \
 --version 1.1.0-cloud

To learn more about Kato Operator parameters, please refer to here.

  1. Confirm Kato Operator status
 $ kubectl get pod -n rbd-system
 NAME READY STATUS RESTARTS AGE
 kato-operator-0 2/2 Running 0 110s
Wait for a while (depending on the specific network environment) until the status of kato-operator-0 becomes `Running`.

Install Kato

Visit Kato Operator to start the installation of Kato.

Visit Kato Operator

Open the browser and enter the host IP address: http://<SERVER_IP>:30008. You can obtain SERVER_IP through the following command:

echo $(kubectl get po kato-operator-0 -n rbd-system -o jsonpath="{..hostIP}")

Note that the obtained SERVER_IP is an internal network address, please use it directly or replace it with an external network address according to the actual situation.

Parameter Configuration

  1. Installation Mode select high availability
  2. Fill in the prepared RDS information into Data Center Database
  3. Gateway node, Build service running node Select the two prepared computing nodes
  4. Gateway public IP fill in the prepared ELB
  5. Shared storage: Select Choose an existing storage driver in the cluster -> csi-nas
  6. Block storage: Select Choose an existing storage driver in the cluster -> csi-disk
  7. After completing the above configuration, click Configure ready to start the installation

Verify Installation

When the installation progress is completed, it will jump to the following page:

The installation is complete.

Install Command Line Tools

To facilitate the operation and maintenance of the cluster, please refer to document to install the grctl command line tool.

After the installation is complete, execute grctl config to obtain Region Config. Region Config is used in the next step of Connecting to Kato Cloud.

Connect to Kato Cloud

The specific docking method is as follows, add a cluster in the enterprise view cluster interface of the registered enterprise; the process is as follows:

  1. Click on Add Cluster

  2. Select Import:

  3. Fill in the relevant information:

    Cluster ID: Custom, cannot be modified after the cluster is added;

    Cluster name: The name of the currently added cluster, customized, and can be modified after adding;

    Remarks: The current cluster remarks information, just customize;

    Region Config: The Region Config file defines the current cluster configuration information, including cluster API address, Web Socket communication address, HTTP application default domain name suffix, TCP application default access IP, etc. After adding the Region Config file when adding a cluster, the above information will be automatically read.

How to Use the Cluster

Select the cluster in Create Team and create a team belonging to the cluster. Since then, the resources of the cluster will be used when creating components under the team . s