Skip to content

Commit

Permalink
feat(docs): update docs for v0.9.3
Browse files Browse the repository at this point in the history
  • Loading branch information
JacieChao committed Jul 18, 2024
1 parent 95742d2 commit eba8551
Show file tree
Hide file tree
Showing 14 changed files with 376 additions and 10 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ Scenario 1 - Run with docker:
```bash
# The commands will start autok3s daemon with an interactionable UI.
# Standard Linux (Recommended)
$ docker run -itd --restart=unless-stopped --net=host -v /var/run/docker.sock:/var/run/docker.sock cnrancher/autok3s:v0.9.2
$ docker run -itd --restart=unless-stopped --net=host -v /var/run/docker.sock:/var/run/docker.sock cnrancher/autok3s:v0.9.3

# MacOS
$ docker run -itd --restart=unless-stopped -p 8080:8080 -v /var/run/docker.sock:/var/run/docker.sock -e DOCKER_HOST="" cnrancher/autok3s:v0.9.2
$ docker run -itd --restart=unless-stopped -p 8080:8080 -v /var/run/docker.sock:/var/run/docker.sock -e DOCKER_HOST="" cnrancher/autok3s:v0.9.3
```

Scenario 2 - Run with docker-compose
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
autok3s:
image: cnrancher/autok3s:v0.9.2
image: cnrancher/autok3s:v0.9.3
init: true
ports:
- 8080
Expand Down
Binary file modified docs/assets/alibaba/custom-create-cluster-k3s.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions docs/i18n/en_us/alibaba/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,41 @@ Run the command below and create an HA K3s cluster with an external database:
autok3s -d create -p alibaba --name myk3s --master 2 --datastore "mysql://<user>:<password>@tcp(<ip>:<port>)/<db>"
```

### Advanced Settings

The AutoK3s supports more advanced settings to customize your K3s cluster.

#### Installation Environments

If you want to add more installation environments, please set the args below:

```bash
--install-env INSTALL_K3S_SKIP_SELINUX_RPM=true --install-env INSTALL_K3S_FORCE_RESTART=true
```

> We recommend you to only use INSTALL_* parameters for this case because this is a global setting to your K3s cluster. If you want to set the K3S_* environments, please use the K3s configuration file args.
#### Server/Agent Configuration File

In addition to configuring K3s with environment variables and CLI arguments, K3s can also use a config file.

If you want to do more customize and complex configurations for your K3s cluster, such as etcd snapshot or datastore. This arg is what you need.

Here's an example of a K3s server configuration with etcd snapshot information and change the node port range.
```yaml
etcd-snapshot-schedule-cron: "* * * * *"
etcd-snapshot-retention: 15
service-node-port-range: "20000-30000"
```
Save this yaml file to your local path, such as `myk3s-server-config.yaml`. Then pass this file by the following arg:

```bash
--server-config-file /your/path/myk3s-server-config.yaml
```

If you want to set the configuration file to your agent node, use the arg `--agent-config-file /your/path/agent-config.yaml`

## Join K3s Nodes

Please use `autok3s join` command to add one or more nodes for an existing K3s cluster.
Expand Down
35 changes: 35 additions & 0 deletions docs/i18n/en_us/aws/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,41 @@ Run the command below and create an HA K3s cluster with an external database:
autok3s -d create -p aws --name myk3s --master 2 --datastore "mysql://<user>:<password>@tcp(<ip>:<port>)/<db>"
```

### Advanced Settings

The AutoK3s supports more advanced settings to customize your K3s cluster.

#### Installation Environments

If you want to add more installation environments, please set the args below:

```bash
--install-env INSTALL_K3S_SKIP_SELINUX_RPM=true --install-env INSTALL_K3S_FORCE_RESTART=true
```

> We recommend you to only use INSTALL_* parameters for this case because this is a global setting to your K3s cluster. If you want to set the K3S_* environments, please use the K3s configuration file args.
#### Server/Agent Configuration File

In addition to configuring K3s with environment variables and CLI arguments, K3s can also use a config file.

If you want to do more customize and complex configurations for your K3s cluster, such as etcd snapshot or datastore. This arg is what you need.

Here's an example of a K3s server configuration with etcd snapshot information and change the node port range.
```yaml
etcd-snapshot-schedule-cron: "* * * * *"
etcd-snapshot-retention: 15
service-node-port-range: "20000-30000"
```
Save this yaml file to your local path, such as `myk3s-server-config.yaml`. Then pass this file by the following arg:

```bash
--server-config-file /your/path/myk3s-server-config.yaml
```

If you want to set the configuration file to your agent node, use the arg `--agent-config-file /your/path/agent-config.yaml`

## Join K3s Nodes

Please use `autok3s join` command to add one or more nodes for an existing K3s cluster.
Expand Down
35 changes: 35 additions & 0 deletions docs/i18n/en_us/google/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,41 @@ Run the command below and create an HA K3s cluster with an external database:
autok3s -d create -p google --name myk3s --master 2 --datastore "mysql://<user>:<password>@tcp(<ip>:<port>)/<db>"
```

### Advanced Settings

The AutoK3s supports more advanced settings to customize your K3s cluster.

#### Installation Environments

If you want to add more installation environments, please set the args below:

```bash
--install-env INSTALL_K3S_SKIP_SELINUX_RPM=true --install-env INSTALL_K3S_FORCE_RESTART=true
```

> We recommend you to only use INSTALL_* parameters for this case because this is a global setting to your K3s cluster. If you want to set the K3S_* environments, please use the K3s configuration file args.
#### Server/Agent Configuration File

In addition to configuring K3s with environment variables and CLI arguments, K3s can also use a config file.

If you want to do more customize and complex configurations for your K3s cluster, such as etcd snapshot or datastore. This arg is what you need.

Here's an example of a K3s server configuration with etcd snapshot information and change the node port range.
```yaml
etcd-snapshot-schedule-cron: "* * * * *"
etcd-snapshot-retention: 15
service-node-port-range: "20000-30000"
```
Save this yaml file to your local path, such as `myk3s-server-config.yaml`. Then pass this file by the following arg:

```bash
--server-config-file /your/path/myk3s-server-config.yaml
```

If you want to set the configuration file to your agent node, use the arg `--agent-config-file /your/path/agent-config.yaml`

## Join K3s Nodes

Please use `autok3s join` command to add one or more nodes for an existing K3s cluster.
Expand Down
35 changes: 35 additions & 0 deletions docs/i18n/en_us/native/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,41 @@ autok3s -d create \
--datastore "mysql://<user>:<password>@tcp(<ip>:<port>)/<db>"
```

### Advanced Settings

The AutoK3s supports more advanced settings to customize your K3s cluster.

#### Installation Environments

If you want to add more installation environments, please set the args below:

```bash
--install-env INSTALL_K3S_SKIP_SELINUX_RPM=true --install-env INSTALL_K3S_FORCE_RESTART=true
```

> We recommend you to only use INSTALL_* parameters for this case because this is a global setting to your K3s cluster. If you want to set the K3S_* environments, please use the K3s configuration file args.
#### Server/Agent Configuration File

In addition to configuring K3s with environment variables and CLI arguments, K3s can also use a config file.

If you want to do more customize and complex configurations for your K3s cluster, such as etcd snapshot or datastore. This arg is what you need.

Here's an example of a K3s server configuration with etcd snapshot information and change the node port range.
```yaml
etcd-snapshot-schedule-cron: "* * * * *"
etcd-snapshot-retention: 15
service-node-port-range: "20000-30000"
```
Save this yaml file to your local path, such as `myk3s-server-config.yaml`. Then pass this file by the following arg:

```bash
--server-config-file /your/path/myk3s-server-config.yaml
```

If you want to set the configuration file to your agent node, use the arg `--agent-config-file /your/path/agent-config.yaml`

## Join K3s Nodes

Please use `autok3s join` command to add one or more nodes for an existing K3s cluster.
Expand Down
35 changes: 35 additions & 0 deletions docs/i18n/en_us/tencent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,41 @@ Run the command below and create an HA K3s cluster with an external database:
autok3s -d create -p tencent --name myk3s --master 2 --datastore "mysql://<user>:<password>@tcp(<ip>:<port>)/<db>"
```

### Advanced Settings

The AutoK3s supports more advanced settings to customize your K3s cluster.

#### Installation Environments

If you want to add more installation environments, please set the args below:

```bash
--install-env INSTALL_K3S_SKIP_SELINUX_RPM=true --install-env INSTALL_K3S_FORCE_RESTART=true
```

> We recommend you to only use INSTALL_* parameters for this case because this is a global setting to your K3s cluster. If you want to set the K3S_* environments, please use the K3s configuration file args.
#### Server/Agent Configuration File

In addition to configuring K3s with environment variables and CLI arguments, K3s can also use a config file.

If you want to do more customize and complex configurations for your K3s cluster, such as etcd snapshot or datastore. This arg is what you need.

Here's an example of a K3s server configuration with etcd snapshot information and change the node port range.
```yaml
etcd-snapshot-schedule-cron: "* * * * *"
etcd-snapshot-retention: 15
service-node-port-range: "20000-30000"
```
Save this yaml file to your local path, such as `myk3s-server-config.yaml`. Then pass this file by the following arg:

```bash
--server-config-file /your/path/myk3s-server-config.yaml
```

If you want to set the configuration file to your agent node, use the arg `--agent-config-file /your/path/agent-config.yaml`

## Join K3s Nodes

Please use `autok3s join` command to add one or more nodes for an existing K3s cluster.
Expand Down
14 changes: 8 additions & 6 deletions docs/i18n/zh_cn/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ AutoK3s 可以支持以下云厂商,我们会根据社区反馈添加更多支
您可以通过以下 Docker 命令,一键启动 AutoK3s 本地 UI,快速体验相关功能。

```bash
docker run -itd --restart=unless-stopped -p 8080:8080 cnrancher/autok3s:v0.9.2
docker run -itd --restart=unless-stopped -p 8080:8080 cnrancher/autok3s:v0.9.3
```

如果您想要在 docker 中使用 K3d provider,那么您需要使用宿主机网络启动 AutoK3s 镜像。

```bash
docker run -itd --restart=unless-stopped --net host -v /var/run/docker.sock:/var/run/docker.sock cnrancher/autok3s:v0.9.2
docker run -itd --restart=unless-stopped --net host -v /var/run/docker.sock:/var/run/docker.sock cnrancher/autok3s:v0.9.3
```

如果您是 MacOS 或者 Linux 系统,您也可以使用以下安装命令,一键安装 AutoK3s(Windows用户请前往 [Releases](https://github.com/cnrancher/autok3s/releases) 页面下载对应的程序)。
Expand Down Expand Up @@ -81,19 +81,19 @@ autok3s -d create -p aws --name myk3s --master 1 --worker 1

## 升级

如果您使用 Docker 命令一键启动 AutoK3s 本地 UI,从 `v0.4.0` 升级到 `v0.9.2` 需要进行如下操作以保证历史数据的迁移。
如果您使用 Docker 命令一键启动 AutoK3s 本地 UI,从 `v0.4.0` 升级到 `v0.9.3` 需要进行如下操作以保证历史数据的迁移。

```bash
docker cp <old-container>:/root/.autok3s .
docker rm -f <old-container>
docker run -itd --restart=unless-stopped -p 8080:8080 -v $PWD/.autok3s:/root/.autok3s cnrancher/autok3s:v0.9.2
docker run -itd --restart=unless-stopped -p 8080:8080 -v $PWD/.autok3s:/root/.autok3s cnrancher/autok3s:v0.9.3
```

`v0.4.1` 以后的版本,可以直接通过 `--volumes-from` 来保证历史数据的迁移。

```bash
docker stop <old-container>
docker run -itd --restart=unless-stopped -p 8080:8080 --volumes-from <old-container> cnrancher/autok3s:v0.9.2
docker run -itd --restart=unless-stopped -p 8080:8080 --volumes-from <old-container> cnrancher/autok3s:v0.9.3
```

## 开发者指南
Expand All @@ -114,9 +114,11 @@ AutoK3s是 100% 开源的软件,该项目相关的源码包括:
- https://github.com/cnrancher/autok3s-ui
- https://github.com/cnrancher/kube-explorer

由 SUSE(Rancher E&I) Team 贡献

# License

Copyright (c) 2023 [Rancher Labs, Inc.](http://rancher.com)
Copyright (c) 2024 [SUSE](https://www.suse.com/)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
38 changes: 38 additions & 0 deletions docs/i18n/zh_cn/alibaba/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,13 @@ K3s 参数配置项主要对 K3s 集群进行设置,例如是否部署 HA 模
| Datastore CA File | 数据源 CA 文件,如果数据源设置了 TLS 需要配置此项 |
| Datastore Cert File | 数据源 Cert 文件,如果数据源设置了 TLS 需要配置此项 |
| Datastore Key File | 数据源 Key 文件,如果数据源设置了 TLS 需要配置此项 |
| Install Env | K3s 集群安装时环境变量参数设置,例如在 centos 上安装 K3s 需要设置 `INSTALL_K3S_SKIP_SELINUX_RPM=true` 来禁用 selinux |
| Master | Master 节点数量 |
| Master Extra Args | Master 节点额外参数设置,例如 `--no-deploy traefik` |
| Server Config File | Server 节点额外参数设置,以 config.yaml 文件格式进行一些复杂选项的配置,例如 `etcd-snapshot-schedule-cron`|
| Worker | Worker 节点数量 |
| Worker Extra Args | Worker 节点额外参数设置,例如 `--node-taint key=value:NoExecute` |
| Agent Config File | Agent 节点额外参数设置,以 config.yaml 文件格式进行一些复杂选项的配置 |
| Token | 用于将server或agent加入集群的共享secret,如果不设置,会自动生成一个Token |
| Manifests | 自动部署应用清单目录,这里支持设置某个manifest文件或者包含多个manifest文件的目录路径(仅支持一层目录),具体功能可查看[这里](http://docs.rancher.cn/docs/k3s/advanced/_index/#%E8%87%AA%E5%8A%A8%E9%83%A8%E7%BD%B2%E6%B8%85%E5%8D%95) |
| TLS Sans | 在 TLS 证书中添加其他主机名或 IP 作为主题备用名称,具体功能可查看[这里](https://docs.rancher.cn/docs/k3s/installation/install-options/server-config/_index#%E7%9B%91%E5%90%AC) |
Expand Down Expand Up @@ -382,6 +385,41 @@ autok3s -d create -p alibaba --name myk3s --master 3 --cluster
autok3s -d create -p alibaba --name myk3s --master 2 --datastore "mysql://<user>:<password>@tcp(<ip>:<port>)/<db>"
```

### 高级选项

AutoK3s 支持更多的高级选项来自定义你的 K3s 集群

#### 安装环境变量设置

如果你想要在安装集群时设置环境变量,可以使用一下的参数:

```bash
--install-env INSTALL_K3S_SKIP_SELINUX_RPM=true --install-env INSTALL_K3S_FORCE_RESTART=true
```

> 由于这是一个全局的设置选项,我们建议你****使用 INSTALL_* 类型的环境变量。如果你想要使用 K3S_* 的环境变量对集群进行自定义配置,请使用下面描述的 configuration file 参数的设置方式。
#### Server/Agent Configuration File

K3s 集群可以使用环境变量或者 CLI 参数进行设置,也可以通过配置文件进行设置。

如果你想要对集群进行更多更复杂的自定义配置,例如 etcd snapshot 或 datastore,你可以使用以下参数。

这里时一个 K3s server 配置了 etcd snapshot 和 node port 范围的配置文件示例。
```yaml
etcd-snapshot-schedule-cron: "* * * * *"
etcd-snapshot-retention: 15
service-node-port-range: "20000-30000"
```
将以上文件保存到本地,例如保存到名称为 `myk3s-server-config.yaml` 的文件中,然后通过以下参数将此文件传给 AutoK3s:

```bash
--server-config-file /your/path/myk3s-server-config.yaml
```

如果你想要对 agent 节点进行设置,可以通过 `--agent-config-file /your/path/agent-config.yaml` 参数来进行传值。

### 添加 K3s 节点

请使用`autok3s join`命令为已有集群添加 K3s 节点。
Expand Down
Loading

0 comments on commit eba8551

Please sign in to comment.