kubeblocks

module
v1.0.0-alpha.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2024 License: AGPL-3.0

README

Welcome to the KubeBlocks project!

Documentation status OpenSSF Best Practices CICD Push CodeQL Releases Release LICENSE Go Report Card Docker Pulls Codecov maturity Artifact Hub

image

Motivation

If you are a developer using multiple types of databases in your application and are considering deploying both your application and databases on K8s for cost or efficiency reasons, you need to find suitable operators for each database. Learning so many different operators and their APIs introduces a significant learning curve and time costs, not to mention the effort required to maintain them.

KubeBlocks uses a unified set of APIs (CRDs) and code to manage various databases on K8s. For example, we can use the Cluster resource to create a PostgreSQL cluster, a Redis cluster, or a Kafka cluster. This abstraction and unified API allow us to further use a single set of operator code to manage multiple types of databases, as well as handle day-2 operations, theoretically extending to any type of database engine.

What is KubeBlocks

KubeBlocks is an open-source control plane software that runs and manages multiple popular database engines on K8s through a unified set of code and APIs. The core of KubeBlocks is a K8s operator, which defines a set of CRDs to abstract the common attributes of various database engines and uses these abstractions to manage the engine's lifecycle and day-2 operations.

KubeBlocks manages various types of stateful engines, including RDBMSs (MySQL, PostgreSQL), Caches(Redis), NoSQLs (MongoDB), MQs(Kafka, Pulsar), vector databases(Milvus, Qdrant, Weaviate), and data warehouses(ClickHouse, ElasticSearch, OpenSearch, Doris, StarRocks). Adding a new engine to KubeBlocks can be achieved by writing a KubeBlocks Addon. The community is actively integrating more types of engines into KubeBlocks, and it currently supports 35 types of engines.

The name KubeBlocks is inspired by Kubernetes and LEGO blocks, signifying that through the KubeBlocks API, adding, composing and managing database engines on K8s can be easy, standard and productive, like playing with LEGO blocks.

Why you need KubeBlocks

KubeBlocks integrates the most popular database engines and provides rich management functions, along with declarative APIs, in various environments. KubeBlocks offers the following benefits:

  • Production-level

    KubeBlocks has already been adopted by large internet companies, private clouds, the financial industry including banks and securities firms, telecom industry, the automotive industry, and SaaS software providers.

  • Reliability

    KubeBlocks supports the integration of various mature high-availability best practices, such as Orchestrator, Patroni, and Sentinel. KubeBlocks also supports full backups, continuous backups, and point-in-time recovery (PITR).

  • Ease of use

    KubeBlocks not only provides a YAML-based API but also offers an interactive kbcli tool to further simplify usage as a complement to kubectl. For example, you can install KubeBlocks and launch a playground environment on a desktop or cloud with a single command.

  • Observability

    KubeBlocks collects monitoring metrics from rich data sources, integrates with the Prometheus stack, and provides insightful Grafana templates. In addition, troubleshooting tools such as slow logs are also provided.

  • Extensibility

    KubeBlocks provides the addon mechanism for integrating new engines. So it can be extended to run the databases your project needs.

Goals
  • Smoothing the learning curve of managing various databases on K8s
  • Exploring standard APIs for managing databases on Kubernetes
  • Being open and cloud-neutral, as well as engine-neutral
Key features
  • Supports various databases, including MySQL, PostgreSQL, Redis, MongoDB, Kafka, Clickhouse, ElasticSearch and more
  • Provides production-level performance, resilience, and observability
  • Simplifies day-2 operations, such as upgrading, scaling, monitoring, backup, and restore
  • Contains a powerful and intuitive command line tool
  • Be compatible with AWS, GCP, Azure, Alibaba Cloud and more CSP

Get started with KubeBlocks

Quick Start shows you the quickest way to get started with KubeBlocks.

Resources

API Reference

How to write a KubeBlocks Addon?

KubeBlocks: Cloud-Native Data Infrastructure for Kubernetes (A Video made by Viktor Farcic)

Dashboard Demo

KubeBlocks at KubeCon

KubeCon 2024 in HongKong from 21-23 August 2024: How to Manage Database Clusters Without a Dedicated Operator, By Shanshan Ying, ApeCloud & Shun Ding, China Mobile Cloud

KubeCon 2024 in HongKong from 21-23 August 2024: KuaiShou's 100% Resource Utilization Boost: 100K Redis Migration from Bare Metal to Kubernetes, By XueQiang Wu, ApeCloud & YuXing Liu, Kuaishou

Community

If you have any questions, you can reach out to us through:

You can also follow us on:

Contributing to KubeBlocks

Your contributions are welcomed and appreciated.

Report Vulnerability

We consider security as the top priority issue. If you find any security issues, please Report a security vulnerability issue.

License

KubeBlocks is under the GNU Affero General Public License v3.0. See the LICENSE file for details.

Directories

Path Synopsis
apps/v1
+k8s:deepcopy-gen=package,register +k8s:openapi-gen=true +groupName=apps.kubeblocks.io
+k8s:deepcopy-gen=package,register +k8s:openapi-gen=true +groupName=apps.kubeblocks.io
apps/v1alpha1
+k8s:deepcopy-gen=package,register +k8s:openapi-gen=true +groupName=apps.kubeblocks.io
+k8s:deepcopy-gen=package,register +k8s:openapi-gen=true +groupName=apps.kubeblocks.io
apps/v1beta1
+k8s:deepcopy-gen=package,register +k8s:openapi-gen=true +groupName=apps.kubeblocks.io
+k8s:deepcopy-gen=package,register +k8s:openapi-gen=true +groupName=apps.kubeblocks.io
dataprotection/v1alpha1
+k8s:deepcopy-gen=package,register +k8s:openapi-gen=true +groupName=dataprotection.kubeblocks.io
+k8s:deepcopy-gen=package,register +k8s:openapi-gen=true +groupName=dataprotection.kubeblocks.io
experimental
Package experimental is a group of APIs that are in experimental.
Package experimental is a group of APIs that are in experimental.
experimental/v1alpha1
Package v1alpha1 contains API Schema definitions for the experimental v1alpha1 API group +kubebuilder:object:generate=true +groupName=experimental.kubeblocks.io
Package v1alpha1 contains API Schema definitions for the experimental v1alpha1 API group +kubebuilder:object:generate=true +groupName=experimental.kubeblocks.io
extensions/v1alpha1
+k8s:deepcopy-gen=package,register +k8s:openapi-gen=true +groupName=extensions.kubeblocks.io
+k8s:deepcopy-gen=package,register +k8s:openapi-gen=true +groupName=extensions.kubeblocks.io
workloads/legacy
+k8s:deepcopy-gen=package,register +k8s:openapi-gen=true +groupName=workloads.kubeblocks.io
+k8s:deepcopy-gen=package,register +k8s:openapi-gen=true +groupName=workloads.kubeblocks.io
workloads/v1
+k8s:deepcopy-gen=package,register +k8s:openapi-gen=true +groupName=workloads.kubeblocks.io
+k8s:deepcopy-gen=package,register +k8s:openapi-gen=true +groupName=workloads.kubeblocks.io
workloads/v1alpha1
+k8s:deepcopy-gen=package,register +k8s:openapi-gen=true +groupName=workloads.kubeblocks.io
+k8s:deepcopy-gen=package,register +k8s:openapi-gen=true +groupName=workloads.kubeblocks.io
cmd
controllers
externalapis
preflight/v1beta2
Package v1beta2 contains API Schema definitions for the preflight v1beta2 API group +kubebuilder:object:generate=true +groupName=troubleshoot.sh
Package v1beta2 contains API Schema definitions for the preflight v1beta2 API group +kubebuilder:object:generate=true +groupName=troubleshoot.sh
hack
docgen/api/template
Package template Placeholder file to make Go vendor this directory properly.
Package template Placeholder file to make Go vendor this directory properly.
pkg
client/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
client/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
client/clientset/versioned/typed/apps/v1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
client/clientset/versioned/typed/apps/v1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
client/clientset/versioned/typed/apps/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
client/clientset/versioned/typed/apps/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
client/clientset/versioned/typed/apps/v1beta1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
client/clientset/versioned/typed/apps/v1beta1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
client/clientset/versioned/typed/dataprotection/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
client/clientset/versioned/typed/dataprotection/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
client/clientset/versioned/typed/extensions/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
client/clientset/versioned/typed/extensions/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
client/clientset/versioned/typed/workloads/v1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
client/clientset/versioned/typed/workloads/v1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
client/clientset/versioned/typed/workloads/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
client/clientset/versioned/typed/workloads/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
common
Package common provides types and utils shared by all KubeBlocks components: KubeBlocks Core, KBCLI etc.
Package common provides types and utils shared by all KubeBlocks components: KubeBlocks Core, KBCLI etc.
controller/graph
Package graph tries to model the controller reconciliation loop in a more structured way.
Package graph tries to model the controller reconciliation loop in a more structured way.
controller/handler
Package handler is a more flexible EventHandler builder in a chain fashion.
Package handler is a more flexible EventHandler builder in a chain fashion.
controller/instanceset
Package instanceset is a general-purpose workload API designed to manage role-based stateful workloads, such as databases.
Package instanceset is a general-purpose workload API designed to manage role-based stateful workloads, such as databases.
controller/kubebuilderx
Package kubebuilderx is a new framework builds upon the original DAG framework, which abstracts the reconciliation process into two stages.
Package kubebuilderx is a new framework builds upon the original DAG framework, which abstracts the reconciliation process into two stages.
kbagent/client
Package client is a generated GoMock package.
Package client is a generated GoMock package.
lru
viperx
Package viperx is a thread-safe extension for the Viper configuration library.
Package viperx is a thread-safe extension for the Viper configuration library.
test
e2e

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL