Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add k8s 101 #8107

Merged
merged 2 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified docs/img/kubeblocks-architecture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/user_docs/overview/about-this-manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
title: About this manual
description: KubeBlocks, kbcli, how to
keywords: [kubeblocks, overview, introduction]
sidebar_position: 4
sidebar_position: 5
---
This manual introduces how to operate KubeBlocks with `kbcli`. For advanced users familiar with Kubernetes, this manual also includes guidance on how to operate KubeBlocks using `helm` and `kubectl`.
8 changes: 4 additions & 4 deletions docs/user_docs/overview/concept.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sidebar_position: 2

# Concepts

You've already seen the benefits of using unified APIs to represent various databases in the section ["How Unified APIs Reduces Your Learning Curve"](./introduction.md#how-unified-apis-reduces-your-learning-curve). If you take a closer look at those examples, you'll notice two key concepts in the sample YAML files: **Cluster** and **Component**. For instance, `test-mysql` is a Cluster that includes a Component called `mysql` (with a componentDef of `apecloud-mysql`). Similarly, `test-redis` is also a Cluster, and it includes two Components: one called `redis` (with a componentDef of `redis-7`), which has two replicas, and another called `redis-sentinel` (with a componentDef of `redis-sentinel`), which has three replicas.
You've already seen the benefits of using unified APIs to represent various databases in the section ["How Unified APIs Reduce Your Learning Curve"](./introduction.md#how-unified-apis-reduce-your-learning-curve). If you take a closer look at those examples, you'll notice two key concepts in the sample YAML files: **Cluster** and **Component**. For instance, `test-mysql` is a Cluster that includes a Component called `mysql` (with a componentDef of `apecloud-mysql`). Similarly, `test-redis` is also a Cluster, and it includes two Components: one called `redis` (with a componentDef of `redis-7`), which has two replicas, and another called `redis-sentinel` (with a componentDef of `redis-sentinel`), which has three replicas.

In this document, we will explain the reasons behind these two concepts and provide a brief introduction to the underlying API (i.e., CRD).

Expand Down Expand Up @@ -107,7 +107,7 @@ A Cluster object represents an entire database cluster managed by KubeBlocks. A
For distributed databases with a sharded-nothing architecture, like Redis Cluster, the Cluster supports managing multiple shards, with each shard managed by a separate Component. This architecture also supports dynamic resharding: if you need to scale out and add a new shard, you simply add a new Component; conversely, if you need to scale in and reduce the number of shards, you remove a Component.

#### Component
Component is a fundamental building block of a Cluster object. For example, a Redis Cluster can include Components like redis’, ‘sentinel, and potentially a proxy like twemproxy.
Component is a fundamental building block of a Cluster object. For example, a Redis Cluster can include Components like `redis`, `sentinel`, and potentially a proxy like `twemproxy`.

The Component object is responsible for managing the lifecycle of all replicas within a Component, It supports a wide range of operations including provisioning, stopping, restarting, termination, upgrading, configuration changes, vertical and horizontal scaling, failover, switchover, scheduling configuration, exposing Services, managing system accounts.

Expand All @@ -120,15 +120,15 @@ A database instance, or replica, consists of a Pod and several other auxiliary o

### KubeBlocks API for Addon

::: note
:::note

Only Addon developers need to understand the ClusterDefinition and ComponentDefinition APIs. As a result, KubeBlocks users can easily bypass these two APIs.
:::

#### ClusterDefinition
ClusterDefinition is an API used to define all available topologies of a database cluster, offering a variety of topological configurations to meet diverse deployment needs and scenarios.

Each topology includes a list of component, each linked to a ComponentDefinition, which enhances reusability and reduce redundancy. For example, widely used components such as etcd and Zookeeper can be defined once and reused across multiple ClusterDefinitions, simplifying the setup of new systems.
Each topology includes a list of components, each linked to a ComponentDefinition, which enhances reusability and reduce redundancy. For example, ComponentDefinition of widely used components such as etcd and Zookeeper can be defined once and reused across multiple ClusterDefinitions, simplifying the setup of new systems.

Additionally, ClusterDefinition also specifies the sequence of startup, upgrade, and shutdown for components, ensuring a controlled and predictable management of component lifecycles.

Expand Down
15 changes: 7 additions & 8 deletions docs/user_docs/overview/introduction.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: KubeBlocks overview
description: KubeBlocks, kbcli, multicloud
title: Introduction
description: introduction to KubeBlocks
keywords: [kubeblocks, overview, introduction]
sidebar_position: 1
---
Expand All @@ -9,7 +9,7 @@ sidebar_position: 1

## What is KubeBlocks

KubeBlocks is an open-source Kubernetes operator for databases, enabling users to run and manage multiple types of databases on Kubernetes. As far as we know, most database operators typically manage only one specific type of database. For example:
KubeBlocks is an open-source Kubernetes operator for databases (more specifically, for stateful applications, including databases and middleware like message queues), enabling users to run and manage multiple types of databases on Kubernetes. As far as we know, most database operators typically manage only one specific type of database. For example:
- CloudNativePG, Zalando, CrunchyData, StackGres operator can manage PostgreSQL
- Strimzi manages Kafka
- Oracle and Percona MySQL operator manage MySQL
Expand Down Expand Up @@ -40,7 +40,7 @@ For a detailed list of Addons and their features, please refer to [supported add

The unified API makes KubeBlocks an excellent choice if you need to run multiple types of databases on Kubernetes. It can significantly reduce the learning curve associated with mastering multiple operators.

## How unified APIs reduces your learning curve
## How unified APIs reduce your learning curve

Here is an example of how to use KubeBlocks' Cluster API to write a YAML file and create a MySQL Cluster with three replicas.

Expand Down Expand Up @@ -107,7 +107,6 @@ spec:
```

</TabItem>

<TabItem value="MongoDB" label="MongoDB">

```yaml
Expand Down Expand Up @@ -138,8 +137,8 @@ spec:
requests:
storage: 10Gi
```
</TabItem>

</TabItem>
<TabItem value="Redis" label="Redis">

```yaml
Expand Down Expand Up @@ -188,8 +187,8 @@ spec:
requests:
storage: 10Gi
```
</TabItem>

</TabItem>
</Tabs>

This means that managing multiple databases on Kubernetes becomes simple, efficient, and standardized, saving you a lot of time that would otherwise be spent searching through manuals and API references.
Expand All @@ -215,7 +214,7 @@ This means that managing multiple databases on Kubernetes becomes simple, effici
- Rolling upgrades
- Decommission a specific replica
- Minor version upgrades
- In addition to the declarative API, KubeBlocks also offers an Ops API for executing one-time operational tasks on database clusters. The Ops API supports additional features such as queuing, concurrency control, progress tracking, and operation rollback.
- In addition to the declarative API, KubeBlocks also offers an OpsRequest API for executing one-time operational tasks on database clusters. The OpsRequest API supports additional features such as queuing, concurrency control, progress tracking, and operation rollback.
- Observability: Supports integration with Prometheus and Grafana.
- Includes a powerful and intuitive command-line tool `kbcli`, which makes operating KubeBlocks CRs on Kubernetes more straightforward and reduces keystrokes. For those well-versed in Kubernetes, kbcli can be used alongside kubectl to provide a more streamlined way of performing operations.

Expand Down
Loading
Loading