Skip to content

Commit 243c6ce

Browse files
committed
fix: more docs (#3096)
Signed-off-by: redscholar <blacktiledhouse@gmail.com>
1 parent 4a66aeb commit 243c6ce

86 files changed

Lines changed: 5918 additions & 862 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 41 additions & 142 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div align=center><img src="docs/images/kubekey-logo.svg?raw=true"></div>
22

3-
[![CI](https://github.com/kubesphere/kubekey/workflows/GolangCILint/badge.svg?branch=main&event=push)](https://github.com/kubesphere/kubekey/actions/workflows/golangci-lint.yaml?query=event%3Apush+branch%3Amain+workflow%3ACI)
3+
[![CI](https://github.com/kubesphere/kubekey/actions/workflows/golangci-lint.yaml/badge.svg?branch=main)](https://github.com/kubesphere/kubekey/actions/workflows/golangci-lint.yaml)
44

55
> English | [中文](README_zh-CN.md)
66
@@ -17,163 +17,62 @@ KubeKey is an open-source lightweight task flow execution tool. It provides a fl
1717
4. Supports cloud-native automated batch task management
1818
5. Advanced features: UI page (not yet open)
1919

20-
# Install kubekey
20+
# Get KubeKey
2121

22-
## Install in Kubernetes
23-
Install kubekey via helm.
24-
```shell
25-
helm upgrade --install --create-namespace -n kubekey-system kubekey config/kubekey
26-
```
27-
28-
## Binary
29-
Get the corresponding binary files from the [release](https://github.com/kubesphere/kubekey/releases) page.
22+
## Method 1: Release Page
3023

31-
## Download Binary with UI
24+
Get the corresponding binary files from the [Release](https://github.com/kubesphere/kubekey/releases) page.
3225

33-
**UI only support after v4.0.0**
34-
35-
**Prerequisite:** `hack/downloadKubekey.sh` downloads the web-installer bundle unless **`SKIP_WEB_INSTALLER` is set to `true`**.
26+
## Method 2: Run Script
3627

3728
```shell
38-
export SKIP_WEB_INSTALLER=false
3929
curl -sfL https://get-kk.kubesphere.io | sh -
40-
# run with UI
41-
kk web --schema-path schema --ui-path dist
42-
```
43-
44-
### Build an offline package with config.yaml
45-
46-
After `hack/downloadKubekey.sh` finishes, you may have `package.sh` in the current directory (depending on version and options). Put your `config.yaml` there and run `./package.sh config.yaml` to produce the offline bundle. To generate or fill in `config.yaml`—including image lists and related fields—use the online tool **[KubeSphere Images](https://get-images.kubesphere.io/)**.
47-
48-
# Deploy Kubernetes
49-
50-
- Supported deployment environments: Linux distributions
51-
- almaLinux: 9.0 (not fully tested)
52-
- centOS: 8
53-
- debian: 10, 11
54-
- kylin: V10SP3 (not fully tested)
55-
- ubuntu: 18.04, 20.04, 22.04, 24.04.
56-
57-
- Supported Kubernetes versions: v1.23.x ~ v1.34.x
58-
59-
## Requirements
60-
61-
- One or more computers running Linux operating systems compatible with deb/rpm; for example: Ubuntu or CentOS.
62-
- Each machine should have more than 2 GB of memory; applications will be limited if memory is insufficient.
63-
- Control plane nodes should have at least 2 CPUs.
64-
- Full network connectivity among all machines in the cluster. You can use public or private networks.
65-
66-
## Define node information
67-
68-
kubekey uses the `inventory` resource to define node connection information.
69-
You can use `kk create inventory` to get the default inventory.yaml resource. The default `inventory.yaml` configuration is as follows:
70-
```yaml
71-
apiVersion: kubekey.kubesphere.io/v1
72-
kind: Inventory
73-
metadata:
74-
name: default
75-
spec:
76-
hosts: # your can set all nodes here. or set nodes on special groups.
77-
# node1:
78-
# connector:
79-
# type: ssh
80-
# host: node1
81-
# port: 22
82-
# user: root
83-
# password: 123456
84-
groups:
85-
# all kubernetes nodes.
86-
k8s_cluster:
87-
groups:
88-
- kube_control_plane
89-
- kube_worker
90-
# control_plane nodes
91-
kube_control_plane:
92-
hosts:
93-
- localhost
94-
# worker nodes
95-
kube_worker:
96-
hosts:
97-
- localhost
98-
# etcd nodes when etcd_deployment_type is external
99-
etcd:
100-
hosts:
101-
- localhost
102-
# image_registry:
103-
# hosts:
104-
# - localhost
105-
# nfs nodes for registry storage. and kubernetes nfs storage
106-
# nfs:
107-
# hosts:
108-
# - localhost
109-
110-
```
111-
The inventory contains the following built-in groups:
112-
1. k8s_cluster: Kubernetes cluster. Contains two subgroups: kube_control_plane, kube_worker
113-
2. kube_control_plane: control_plane node group in the Kubernetes cluster
114-
3. kube_worker: worker node group in the Kubernetes cluster.
115-
4. etcd: node group for installing etcd cluster.
116-
5. image_registry: node group for installing image registry (including harbor, registry)
117-
6. nfs: node group for installing nfs.
118-
119-
## Define key configuration information
120-
121-
kubekey uses the `config` resource to define node connection information.
122-
You can use `kk create config --with-kubernetes v1.33.1` to get the default inventory.yaml resource. The default `config.yaml` configuration is as follows:
123-
124-
Default config configurations are provided as references for different Kubernetes versions:
125-
- [Config for installing Kubernetes v1.23.x](builtin/core/defaults/config/v1.23.yaml)
126-
- [Config for installing Kubernetes v1.24.x](builtin/core/defaults/config/v1.24.yaml)
127-
- [Config for installing Kubernetes v1.25.x](builtin/core/defaults/config/v1.25.yaml)
128-
- [Config for installing Kubernetes v1.26.x](builtin/core/defaults/config/v1.26.yaml)
129-
- [Config for installing Kubernetes v1.27.x](builtin/core/defaults/config/v1.27.yaml)
130-
- [Config for installing Kubernetes v1.28.x](builtin/core/defaults/config/v1.28.yaml)
131-
- [Config for installing Kubernetes v1.29.x](builtin/core/defaults/config/v1.29.yaml)
132-
- [Config for installing Kubernetes v1.30.x](builtin/core/defaults/config/v1.30.yaml)
133-
- [Config for installing Kubernetes v1.31.x](builtin/core/defaults/config/v1.31.yaml)
134-
- [Config for installing Kubernetes v1.32.x](builtin/core/defaults/config/v1.32.yaml)
135-
- [Config for installing Kubernetes v1.33.x](builtin/core/defaults/config/v1.33.yaml)
136-
- [Config for installing Kubernetes v1.34.x](builtin/core/defaults/config/v1.34.yaml)
137-
138-
## Install cluster
139-
140-
You can create a cluster in **two ways**: use the **Web UI**, or use the **command line**. The prerequisites and the meaning of `inventory` / `config` are described in the sections above.
141-
142-
### Method one: Web (UI)
143-
144-
Requires **KubeKey v4.0.0 or newer** with the web installer bundle. Install or download that build (see **Download Binary with UI** under *Install kubekey*), then start the UI:
145-
146-
```shell
147-
kk web --schema-path schema --ui-path dist
14830
```
14931

150-
In the browser, edit inventory and configuration, then follow the UI flow to run the cluster creation playbook (equivalent to `playbooks/create_cluster.yaml`).
32+
| Original File | Extracted File |
33+
|--------|--------|
34+
| kubekey-v4.x.x-linux-amd64.tar.gz | kk: KubeKey binary |
35+
| web-installer.tgz | dist: Web UI resources.<br>host-check.yaml, kubernetes, kubesphere: Task template files.<br>schema: Configuration files.<br>README.md: Installation documentation. |
36+
| package.sh | Offline package build script. |
15137

152-
### Method two: Command line
38+
# Quick Start
15339

154-
Prepare `inventory.yaml` and `config.yaml`, then run the built-in `kk create cluster` subcommand; it runs `playbooks/create_cluster.yaml` for you, so you do not pass the playbook path explicitly.
40+
## Method 1: Command Line
15541

15642
```shell
157-
kk create cluster -i inventory.yaml -c config.yaml
43+
kk create cluster
15844
```
15945

160-
If `-i inventory.yaml` is not provided, the default inventory.yaml is used. Kubernetes will only be installed on the executing machine.
161-
If `-c config.yaml` is not provided, the default config.yaml is used. Installs Kubernetes version v1.34.1.
162-
163-
Other useful flags:
46+
## Method 2: Web UI
16447

165-
- `--workdir`: KubeKey working directory (default: `<current-dir>/kubekey`).
166-
- `--with-kubernetes`: Kubernetes version (for example `v1.33.1`) when it is not set in `config.yaml`.
167-
- `-a` / `--artifact`: path to an offline KubeKey artifact package (`.tgz`); also turns off online fetching when set.
168-
- `--set`: override config fields, for example `--set download.fetch=false` or nested keys supported by KubeKey.
169-
- `-n` / `--namespace`: namespace for local runtime resources tied to the playbook.
170-
171-
Offline install example:
48+
**UI only supported after v4.0.0**
17249

17350
```shell
174-
kk create cluster -i inventory.yaml -c config.yaml --workdir ./kubekey --artifact /path/to/kubekey-artifact.tgz
51+
kk web --schema-path schema --ui-path dist
17552
```
17653

177-
# Documentation
178-
**[Custom Playbook](docs/en/custom/README.md)**
179-
**[Kubernetes Playbook](docs/en/core/README.md)**
54+
# Documentation Navigation
55+
56+
- **[Install Kubernetes](docs/en/installation/README.md)**
57+
- [Component Versions](docs/en/installation/components.md)
58+
- [Online Installation](docs/en/installation/online.md)
59+
- [Offline Installation](docs/en/installation/offline.md)
60+
- **[Configuration Reference](docs/en/reference/config.md)**
61+
- **Playbooks**
62+
- [Create Kubernetes Cluster](docs/en/reference/playbooks/create_cluster.md)
63+
- [Delete Kubernetes Cluster](docs/en/reference/playbooks/delete_cluster.md)
64+
- [Add Nodes](docs/en/reference/playbooks/add_nodes.md)
65+
- [Delete Nodes](docs/en/reference/playbooks/delete_nodes.md)
66+
- [Renew Certificates](docs/en/reference/playbooks/certs_renew.md)
67+
- [Export Offline Artifact](docs/en/reference/playbooks/artifact_export.md)
68+
- [Pre-installation Check](docs/en/reference/playbooks/precheck.md)
69+
- [Initialize OS](docs/en/reference/playbooks/init_os.md)
70+
- **[Image Registry Installation](docs/en/image-registry/README.md)**
71+
- **[Dependency Packages](docs/en/dependency-packages/README.md)**
72+
- **[Task Execution Framework](docs/en/framework/README.md)**
73+
- [Project](docs/en/framework/001-project.md)
74+
- [Playbook](docs/en/framework/002-playbook.md)
75+
- [Role](docs/en/framework/003-role.md)
76+
- [Task](docs/en/framework/004-task.md)
77+
- [Template Syntax](docs/en/framework/101-syntax.md)
78+
- [Variables](docs/en/framework/201-variable.md)

0 commit comments

Comments
 (0)