HA Install on K8s

This article describes how to install a highly available Kato cluster on an existing highly available Kubernetes cluster, suitable for production environments.

Before You Start

Before starting the installation and deployment, you need to prepare the following resources:

  • Highly available Kubernetes cluster, and the version is greater than or equal to 1.13.
  • Highly available shared storage, this article takes Glusterfs as an example, refer to Glusterfs distributed storage.
  • Highly available databases, such as MySQL 8.0 database cluster or RDS database service, create two databases console and region.
  • ETCD cluster, can reuse the existing ETCD cluster of Kubernetes cluster.

Use Helm 3 to Install Kato Operator

It is recommended to use Helm to install Kato Opeartor.

Install Helm 3

Use the following command to mirror the installation (if Helm 3 is already installed, you can skip this step):

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

Verify that Helm has been successfully installed in the following ways:

helm version

Install Kato Operator

  1. Create namespace, recommend using rbd-system:
kubectl create ns rbd-system
  1. Add the chart warehouse of Kato Operator:
helm repo add kato https://openchart.gridworkz.com/gridworkz/kato
  1. Install Kato Operator
helm install kato-operator kato/kato-operator \
--namespace rbd-system \
--version 1.1.1
  1. Confirm status
$ kubectl get pod -n rbd-system
NAME READY STATUS RESTARTS AGE
kato-operator-0 2/2 Running 0 110s

High-availability Installation Kato

Visit Kato Operator to start the installation of Kato.

1. 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 acquired SERVER_IP is an internal network address, please use it directly or replace it with an external network address according to the actual situation.

2. Configure Installation Mode

3. Configure Mirror Repository

Select New installation mirror repository (support HA), it will automatically install a mirror repository that supports high availability during the installation process.

If you choose Provide Existing Mirror Warehouse, you need to provide the domain name, space name, user name and password of the existing mirror warehouse.

4. Configure the Data Center Database

In a highly available installation environment, the user must provide an external highly available Mysql 8.0 database, in which the region database needs to be created in advance:

5. Configure the Console Database

In a highly available installation environment, the user must provide an external highly available Mysql 8.0 database, in which the console database needs to be created in advance:

6. Configure ETCD

Select New installation ETCD (support HA), and the highly available ETCD cluster will be automatically installed during the installation process:

If you choose Provide Existing ETCD, you need to provide a list of addresses of existing ETCD cluster instances:

Reuse Kubernetes ETCD

  • The ETCD address format is: IP:PORT or Domain:PORT

    Please confirm whether the document kubernetes high availability installation is passed, if not, please confirm whether the ETCD address Domain:PORT is normal Or change the ETCD address to IP:PORT

  • TLS authentication turned on:

    • CA certificate: /etc/kubernetes/ssl/ca.pem
    • Client certificate: /etc/etcd/ssl/etcd.pem
    • Client key: /etc/etcd/ssl/etcd-key.pem

7. Configure Gateway Node

In a high-availability environment, select at least 2 nodes as the cluster gateway node, and by default, the eligible master node in the Kubernetes cluster will be selected as the gateway node.

If there is no master node in your cluster (for example, you use a managed cluster provided by various public cloud service providers), then you can search for 2 80, 443, 6060, 7070, 8443, 10254, 18080, 18081 ports The occupied node node serves as the gateway node.

Tip: If you cannot search and select a gateway IP, please refer to Cannot select gateway node.

8. Configure Build Service Running Node

In a high-availability environment, select at least 2 nodes as the cluster build service running node. By default, the eligible master node in the Kubernetes cluster will be selected as the gateway node.

If there is no master node in your cluster (for example, you use a managed cluster provided by various public cloud service providers), then you can search and select 2 node nodes (it is recommended that the nodes have the ability to access the public network) to run as a build service node.

9. Configure and Assign Default Domain Name

When the cluster has the ability to access the public network, enable this function (default), which can assign a pan-resolution domain name that can be resolved by the public network to the cluster.

When the cluster does not have the ability to access the public network, turn off this function.

10. Configure the Gateway Public Network IP

In a high availability environment, this option is required, and you can only choose from the following two options:

11. Configure Shared Storage

In a highly available environment, be sure to provide existing shared storage:

Use the existing StorageClass in the cluster, the storage must support multiple read and write (RWX), if the user has installed Glusterfs distributed storage or Already Docking with external NFS storage, you can directly choose:

If it is an Alibaba Cloud environment, it is recommended to use Aliyun NAS:

12. Configure Block Device Storage

This option is not required.

If there is a deployed block device storage driver in the cluster, you can directly select it, such as ceph-rbd block storage.

If it is an Alibaba Cloud environment, you can choose Alibaba Cloud Disk.

After the configuration is complete, click Next.

13. Installation Environment Test

Kato-Operator will automatically detect the installation environment. After all of them are passed, click Passed to start installation.

If the installation is blocked, you can refer to Troubleshooting, or contact the corresponding manager.

Verify Installation

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

The installation is complete. Click Access Address to register and start using Kato.

Troubleshooting

In the process of installation and use, please refer to Installation Troubleshooting Document and Cluster Problem Diagnosis Document

Install command line tools

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

Uninstall

The uninstaller will delete RBAC permissions, rbd-system namespace and all related resources.

Uninstall Kato

Visit the UI interface of Kato Operator and click Uninstall.

Uninstall Kato Operator

helm delete kato-operator -n rbd-system