Deploy KubeBlocks based on KubeSphere to achieve database freedom

Author: Yin Min, KubeSphere Contributor & Ambassador, webmaster of KubeSphere Community User Committee Hangzhou Station.

What is KubeSphere?

KubeSphere is a distributed operating system built on Kubernetes for cloud-native applications. It is completely open source, supports multi-cloud and multi-cluster management, provides full-stack IT automated operation and maintenance capabilities, and simplifies enterprise DevOps workflows. Its architecture enables plug-and-play integration of third-party applications with cloud-native ecological components. As a full-stack multi-tenant container platform, KubeSphere provides an operation and maintenance-friendly wizard-style operation interface to help enterprises quickly build a powerful and feature-rich container cloud platform. KubeSphere provides users with multiple functions needed to build an enterprise-level Kubernetes environment, such as multi-cloud and multi-cluster management, Kubernetes resource management, DevOps, application lifecycle management, microservice governance (service grid), log query and collection, service and Network, multi-tenant management, monitoring and alarming, event and audit query, storage management, access control, GPU support, network policy, image warehouse management, security management, etc.

What are KubeBlocks?

The name KubeBlocks comes from Kubernetes and LEGO building blocks, suggesting that building database and analytical workloads on Kubernetes is efficient and enjoyable, like playing with LEGO toys. KubeBlocks combines the large-scale production experience of top cloud service providers with enhanced usability and stability improvements to help users easily build containerized, declarative relational, NoSQL, streaming and vector database services.

Official website: https://kubeblocks.io/.

Why do you need KubeBlocks?

Kubernetes has become the de facto standard for container orchestration. It leverages the scalability and availability provided by ReplicaSets and the rollout and rollback capabilities provided by deployments to manage increasing numbers of stateless workloads. However, managing stateful workloads poses significant challenges to Kubernetes. Although StatefulSet provides stable persistent storage and unique network identifiers, these features are not enough for complex stateful workloads.

In order to meet these challenges and solve complexity problems, KubeBlocks introduces a new workload-RSM (Replicated State Machines), which has the following capabilities:

  • Role-based update sequencing reduces downtime caused by upgrading versions, scaling, and restarting.
  • Maintain the state of data replication and automatically fix replication errors or delays.

What benefits will the combination of the two bring?

KubeSphere provides a mature Kubernetes container management platform, and KubeBlocks builds database professional capabilities on top of it. This innovative integration breaks down the technical barriers to database service containerization and enables "out-of-the-box use". KubeSphere allows KubeBlocks applications to enjoy cluster-level resource scheduling and service management. KubeBlocks enables database services to have professional capabilities in automated operation and maintenance in KubeSphere. The synergy and complementation of the two not only simplify the cloud transformation of the database, but also make database application delivery faster and more reliable.

Deployment starts

Deployment prerequisites

  • Make sure that the KubeSphere platform is available. If it has not been deployed yet, please go to the official website to deploy it. Official website address: https://kubesphere.io/zh/docs/v3.4/.

  • Make sure the host network is connected and can access the Internet.

Log in to the KubeSphere platform and add the KubeBlocks official warehouse

Warehouse address: https://apecloud.github.io/helm-charts.

Select a clean NameSpace and add the KubeBlocks service

1. Navigate and click the [Create] button on the right

2. Select [Apply Template]

3. Select the [Application Warehouse] just created and search for the KubeBlocks service

4. Select the current stable version [0.6.1]

5. There is no need to change the value of Values ​​by default. Pay extra attention to the configuration of StorageClass.

6. After waiting patiently, confirm that the application service startup status is normal.

Install kbcli

Currently supports macOS, Windows, and Linux. This tutorial uses Linux as an example.

1. Install kbcli

curl -fsSL https://kubeblocks.io/installer/install_cli.sh | bash

2. Verify installation

kbcli version

3. Check the Kubeblocks related information just deployed

kbcli kubeblocks status

Create and connect to a MySQL instance

Note: KubeBlocks officially supports kbcli and kubectl to create clusters. This tutorial uses kbcli as a demonstration.

1. View all database types and versions available for creating a cluster

kbcli clusterdefinition list

kbcli clusterversion list

2. Create a MySQL instance

kbcli cluster create mysql mycluster

3. Check instance status

kbcli cluster list

4. Connect to the MySQL instance

kbcli cluster connect mycluster -n default

Summarize

KubeSphere provides GUI and DevOps tools, which greatly reduces the threshold for learning and using Kubernetes. KubeBlocks realizes application decoupling and reuse based on the K8s Operator mode, and is an important choice for cloud native architecture. The two parties are deeply integrated and give full play to their respective advantages in ease of use and agile development. KubeSphere makes KubeBlocks easier to deploy and use, and KubeBlocks makes applications more flexible and flexible on KubeSphere. By combining the advantages of both, enterprises can more easily implement application-centric digital transformation and achieve business innovation.

This article is published by OpenWrite, a blog that publishes multiple articles !

Lei Jun: The official version of Xiaomi’s new operating system ThePaper OS has been packaged. A pop-up window on the Gome App lottery page insults its founder. The U.S. government restricts the export of NVIDIA H800 GPU to China. The Xiaomi ThePaper OS interface is exposed. A master used Scratch to rub the RISC-V simulator and it ran successfully. Linux kernel RustDesk remote desktop 1.2.3 released, enhanced Wayland support After unplugging the Logitech USB receiver, the Linux kernel crashed DHH sharp review of "packaging tools": the front end does not need to be built at all (No Build) JetBrains launches Writerside to create technical documentation Tools for Node.js 21 officially released
{{o.name}}
{{m.name}}

Guess you like

Origin my.oschina.net/u/4197945/blog/10120485