Update all-in-one

Signed-off-by: Sherlock113 <sherlockxu@yunify.com>
This commit is contained in:
Sherlock113 2021-01-04 12:47:00 +08:00
parent aa6299ff58
commit d49e79a074
2 changed files with 41 additions and 49 deletions

View File

@ -2,7 +2,6 @@
title: "All-in-One Installation on Linux"
keywords: 'KubeSphere, Kubernetes, All-in-one, Installation'
description: 'All-in-One Installation on Linux'
linkTitle: "All-in-One Installation on Linux"
weight: 2100
---
@ -11,7 +10,7 @@ For those who are new to KubeSphere and looking for a quick way to discover the
## Step 1: Prepare a Linux Machine
See the requirements for hardware and operating system shown below. To get started with all-in-one installation, you only need to prepare one host according to the following requirements.
To get started with all-in-one installation, you only need to prepare one host according to the following requirements for hardware and operating system.
### Hardware recommendation
@ -29,7 +28,7 @@ The system requirements above and the instructions below are for the default min
{{</ notice >}}
### Node Requirements
### Node requirements
- The node can be accessed through `SSH`.
- `sudo`/`curl`/`openssl` should be used.
@ -66,7 +65,7 @@ Developed in Go language, KubeKey represents a brand-new installation tool as a
{{< notice tip >}}
- It is recommended that your OS be clean (without any other software installed). Otherwise, there may be conflicts.
- It is recommended that a container image mirror (accelerator) be prepared if you have trouble downloading images from `dockerhub.io`. For more information, see [Configure Booster for Installation](../../installing-on-linux/faq/configure-booster/).
- It is recommended that a container image mirror (a booster) be prepared if you have trouble downloading images from `dockerhub.io`. For more information, see [Configure a Booster for Installation](../../faq/installation/configure-booster/).
{{</ notice >}}
@ -145,7 +144,7 @@ To create a Kubernetes cluster with KubeSphere installed, refer to the following
{{</ notice >}}
After you execute the command, you will see a table as below for environment check. For details, read [Node Requirements](#node-requirements) and [Dependency Requirements](#dependency-requirements) above. Input `y` to continue.
After you execute the command, you will see a table as below for environment check. For details, read [Node requirements](#node-requirements) and [Dependency requirements](#dependency-requirements) above. Input `y` to continue.
![environment-check](/images/docs/quickstart/all-in-one-installation/environment-check.png)
@ -199,5 +198,5 @@ After logging in to the console, you can check the status of different component
The guide above is used only for the minimal installation by default. To enable other components in KubeSphere, see [Enable Pluggable Components](../../pluggable-components/) for more details.
## Demo
## Code Demonstration
<script src="https://asciinema.org/a/379741.js" id="asciicast-379741" async></script>

View File

@ -1,17 +1,12 @@
---
title: "在 Linux 上安装 All-in-one KubeSphere"
keywords: 'KubeSphere, Kubernetes, All-in-one, Installation'
description: 'All-in-one Installation on Linux'
linkTitle: "在 Linux 上安装 All-in-one KubeSphere"
title: "在 Linux 上以 All-in-One 模式安装 KubeSphere"
keywords: 'KubeSphere, Kubernetes, All-in-One, 安装'
description: '在 Linux 上以 All-in-One 模式安装 KubeSphere'
linkTitle: "在 Linux 上以 All-in-One 模式安装 KubeSphere"
weight: 2100
---
对于那些刚接触 KubeSphere 的并且想快速上手的用户all-in-one 安装模式是最佳的选择,它能够帮助您零配置快速部署 KubeSphere 和 Kubernetes。
## 前提条件
按照文档打开[需要开放的端口](../../installing-on-linux/introduction/port-firewall/)。
对于刚接触 KubeSphere 并想快速上手该容器平台的用户All-in-One 安装模式是最佳的选择,它能够帮助您零配置快速部署 KubeSphere 和 Kubernetes。
## 视频演示
@ -19,11 +14,11 @@ weight: 2100
<source type="video/mp4" src="https://kubesphere-docs.pek3b.qingstor.com/website/docs-v3.0/KS3.0%E5%AE%89%E8%A3%85%E4%B8%8E%E9%83%A8%E7%BD%B2_1_All-in-one%20Installation%20on%20Linux.mp4">
</video>
## 步骤 1: 准备 Linux 机器
## 步骤 1准备 Linux 机器
请参考下面对机器硬件和操作系统的要求准备一台主机。
若要以 All-in-One 模式进行安装,您仅需参考以下对机器硬件和操作系统的要求准备一台主机。
### 建议的机器硬件配置
### 硬件推荐配置
| 操作系统 | 最低要求 |
| ------------------------------------------------------ | ------------------------------------------- |
@ -35,25 +30,25 @@ weight: 2100
{{< notice note >}}
的系统要求和下的说明适用于没有启用任何可选组件的默认最小安装。如果您的计算机是 8C16G 及以上,则建议启用所有组件。更多信息可以参考 [开启插件](../../pluggable-components/)。
上的系统要求和下的说明适用于没有启用任何可选组件的默认最小化安装。如果您的机器至少有 8 Core CPU 和 16 G 内存,则建议启用所有组件。有关更多信息,请参见[启用可插拔组件](../../pluggable-components/)。
{{</ notice >}}
### 节点要求
### 节点要求
- 节点必须能够通过 `SSH` 连接。
- 节点上可以使用 `sudo`/`curl`/`openssl` 命令。
- 您可以预先自行安装 `docker` 或者通过下面步骤的 [KubeKey](https://github.com/kubesphere/kubekey) 安装。
- `docker` 可以由您自己安装或由 [KubeKey](https://github.com/kubesphere/kubekey) 安装。
{{< notice note >}}
如果您想离线安装 KubeSphere那么必须预先安装好 `docker`
如果您想离线安装 KubeSphere请务必提前安装好 `docker`
{{</ notice >}}
### 需要安装的依赖项
### 依赖项要求
KubeKey 可以将 Kubernetes 和 KubeSphere 一安装。针对不同的 Kubernetes 版本,需要安装的依赖项可能有所不同。您可以参考下面的列表,查看是否需要提前在节点上安装相关的依赖项。
KubeKey 可以将 Kubernetes 和 KubeSphere 一安装。针对不同的 Kubernetes 版本,需要安装的依赖项可能有所不同。您可以参考下列表,查看是否需要提前在节点上安装相关的依赖项。
| 依赖项 | Kubernetes 版本 ≥ 1.18 | Kubernetes 版本 < 1.18 |
| ----------- | ---------------- | ---------------------- |
@ -64,23 +59,23 @@ KubeKey 可以将 Kubernetes 和 KubeSphere 一起安装。针对不同的 Kuber
{{< notice info >}}
KubeKey 是用 Go 语言开发的一款全新的安装工具,可以代替以前基于 ansible 的安装程序。KubeKey 为用户提供了灵活的安装选择,可以分别安装 KubeSphere 和 Kubernetes 或二者同时安装,既方便又高效。
KubeKey 是用 Go 语言开发的一款全新的安装工具,代替以前基于 ansible 的安装程序。KubeKey 为用户提供了灵活的安装选择,可以分别安装 KubeSphere 和 Kubernetes 或二者同时安装,既方便又高效。
{{</ notice >}}
### 网络和 DNS 配置
### 网络和 DNS 要求
- 必须确保 `/etc/resolv.conf` 中的 DNS 配置是可用的,不然集群中的 DNS 可能会有问题。
- 如果您的网络配置使用了防火墙或安全组,则必须确保基础组件可以通过特定端口相互通信,可以根据文档[需要开放的端口](../../installing-on-linux/introduction/port-firewall/)的指导将防火墙关闭
- 必须确保 `/etc/resolv.conf` 中的 DNS 配置可用,否则集群中的 DNS 可能会有问题。
- 如果您的网络配置使用了防火墙或安全组,请确保基础设施组件可以通过特定端口相互通信。有关更多信息,请参见[端口要求](../../installing-on-linux/introduction/port-firewall/)关闭防火墙
{{< notice tip >}}
- 建议操作系统处于干净状态(不安装任何其他软件),否则可能会发生冲突。
- 如果您无法从 dockerhub.io 下载容器镜像,建议提前准备好容器镜像或者配置镜像加速器。参考[加速安装的配置](../../installing-on-linux/faq/configure-booster/)。
- 建议您的操作系统处于干净状态(不安装任何其他软件),否则可能会发生冲突。
- 如果您无法从 `dockerhub.io` 下载容器镜像,建议提前准备好容器镜像或者配置镜像加速器。有关更多信息,请参见[为安装配置加速器](../../faq/installation/configure-booster/)。
{{</ notice >}}
## Step 2: 下载 KubeKey
## 步骤 2下载 KubeKey
请按照以下步骤下载 KubeKey。
@ -132,15 +127,15 @@ curl -sfL https://get-kk.kubesphere.io | VERSION=v1.0.1 sh -
chmod +x kk
```
## Step 3: 开始安装
## 步骤 3开始安装
在本快速入门教程中,您只需执行一个命令即可进行安装,其模板如下所示:
在本快速入门教程中,您只需执行一个命令即可进行安装,其模板如下所示
```bash
./kk create cluster [--with-kubernetes version] [--with-kubesphere version]
```
下面示例创建安装了 KubeSphere 的 Kubernetes 集群供您参考
若要同时安装 Kubernetes 和 KubeSphere可参考以下示例命令
```bash
./kk create cluster --with-kubernetes v1.17.9 --with-kubesphere v3.0.0
@ -148,20 +143,18 @@ chmod +x kk
{{< notice note >}}
- 支持的 Kubernetes 版本: *v1.15.12*, *v1.16.13*, *v1.17.9* (默认), *v1.18.6*.
- 一般来说,对于 all-in-one 安装,您无需更改任何配置。
- 如果您在这一步的命令中不添加标志 `--with-kubesphere`,则不会部署 KubeSphereKubeKey 将只安装 Kubernetes。如果您添加标志 `--with-kubesphere` 时不指定 KubeSphere 版本,则会安装最新版本的 KubeSphere。
- KubeKey 会默认安装 [OpenEBS](https://openebs.io/) 为开发和测试环境提供 LocalPV,这对用户来说是非常方便的。对于其它的 storage classes参考 [持久化存储配置](../../installing-on-linux/introduction/storage-configuration/)。
- 支持的 Kubernetes 版本*v1.15.12*, *v1.16.13*, *v1.17.9* (默认), *v1.18.6*
- 一般来说,对于 All-in-One 安装,您无需更改任何配置。
- 如果您在这一步的命令中不添加标志 `--with-kubesphere`,则不会部署 KubeSphereKubeKey 将只安装 Kubernetes。如果您添加标志 `--with-kubesphere` 时不指定 KubeSphere 版本,则会安装最新版本的 KubeSphere。
- KubeKey 会默认安装 [OpenEBS](https://openebs.io/) 为开发和测试环境提供 LocalPV 以方便新用户。对于其他存储类型,请参见[持久化存储配置](../../installing-on-linux/introduction/storage-configuration/)。
{{</ notice >}}
执行该命令后,将看到下面的表格,用于环境检查。
执行该命令后,将看到下表格,用于环境检查。有关详细信息,请参见[节点要求](#节点要求)和[依赖项要求](#依赖项要求)。输入 `y` 继续安装流程。
![environment-check](https://ap3.qingstor.com/kubesphere-website/docs/environment-check.png)
确保安装了上面标有 `y` 的组件,并输入 `yes` 继续。更多细节可以参考上面的[节点的要求](#节点的要求)和[需要安装的依赖项](#需要安装的依赖项)。
## Step 4: 验证安装结果
## 步骤 4验证安装结果
当您看到以下输出时,表明安装已经完成。
@ -173,7 +166,7 @@ chmod +x kk
kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l app=ks-install -o jsonpath='{.items[0].metadata.name}') -f
```
输出会显示 Web 控制台的 IP 地址和端口号,默认的 NodePort 是 `30880`。现在可以使用默认的帐户和密码(`admin /P@88w0rd`通过 `EIP30880` 访问控制台。
输出信息会显示 Web 控制台的 IP 地址和端口号,默认的 NodePort 是 `30880`。现在,您可以使用默认的帐户和密码 (`admin /P@88w0rd`) 通过 `EIP30880` 访问控制台。
```bash
#####################################################
@ -199,18 +192,18 @@ https://kubesphere.io 20xx-xx-xx xx:xx:xx
{{< notice note >}}
您可能需要在环境中绑定 `EIP` 并配置端口转发,以供外部用户访问控制台。此外,确保在安全组中打开了 `30880` 端口
您可能需要配置端口转发规则并在安全组中开放端口,以便外部用户访问控制台
{{</ notice >}}
检查完上面的安装日志后,可以到 **Components** 中确认各个组件的安装状态。如果要使用相关服务,可能需要等待某些组件启动并运行。您也可以使用 `kubectl get pod --all-namespaces` 来检查 KubeSphere 相关组件的运行状况。
登录至控制台后,您可以在**服务组件**中查看各个组件的状态。如果要使用相关服务,您可能需要等待部分组件启动并运行。您也可以使用 `kubectl get pod --all-namespaces` 来检查 KubeSphere 相关组件的运行状况。
![components](/images/docs/quickstart/kubesphere-components.png)
## 开启插件 (可选)
## 启用可插拔组件(可选)
上面的指南默认情况下仅用于最简单的安装,需要在 KubeSphere 中开启插件,可参考 [开启插件](../../pluggable-components/)。
本指南仅适用于默认的最小化安装。若要在 KubeSphere 中启用其他组件,请参见[启用可插拔组件](../../pluggable-components/)。
## Demo
## 代码演示
<script src="https://asciinema.org/a/362292.js" id="asciicast-362292" async></script>