first commit

This commit is contained in:
huanqing.shao
2019-07-25 00:47:21 +08:00
commit 97d19726a4
198 changed files with 13768 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

View File

@ -0,0 +1,48 @@
# 计算资源管理
## 前提
必须具备如下条件:
* Kubernetes 集群
* 已在集群中安装 Kuboard
## 添加节点
集群完成安装后,可以随时向集群中添加计算节点,请参考 [初始化 worker 节点](/install/install-k8s.html#初始化-worker节点)
## 查看节点
登录 Kuboard 之后,即可看到集群中的计算资源列表,在左下角,如下图所示:
![image-20190720224950653](./computing.assets/image-20190720224950653.png)
* 点击 ***demo-worker002*** 可查看该节点的详细信息,如下图所示:
![image-20190720225123111](./computing.assets/image-20190720225123111.png)
## 移除节点
* 点击 ***节点*** 详情页上方的 ***删除***
并确认要删除的节点的名称后,即可删除该节点
![image-20190720225222622](./computing.assets/image-20190720225222622.png)
> * 此时只是从 kubenetes 集群的配置中删除了该节点,该节点上的工作负载将被自动迁移到其他可用节点上。如果重启该节点对应的 linux 操作系统,该节点会重新注册到集群中来。
>
> * 要想彻底删除该节点,您还需要登录该节点所在机器的 linux 终端,并以 root 身份执行如下命令
>
> ```bash
> kubadm reset
> ```
>
>

Binary file not shown.

After

Width:  |  Height:  |  Size: 241 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 KiB

View File

@ -0,0 +1,51 @@
# 名称空间管理
## 创建名称空间
### 前提
必须具备如下条件:
* Kubernetes 集群
* 已在集群中安装 Kuboard
* 已进入 Kuboard 操作界面 [安装并进入 Kuboard](/install/install-dashboard)
假设您已经进入了 Kuboard 界面,如下图所示:
![image-20190723105606081](./namespace-create.assets/image-20190723105606081.png)
### 准备
* 点击 ***创建*** 按钮,创建名称空间
并填写:
| 字段名称 | 填写内容 | 说明 |
| -------- | -------- | ---------------------------- |
| 名称 | example | Kubernetes 的 namespace 名称 |
![image-20190723105644937](./namespace-create.assets/image-20190723105644937.png)
* 点击 ***保存***
![image-20190723105722999](./namespace-create.assets/image-20190723105722999.png)
* 点击 ***应用***
![image-20190723105748435](./namespace-create.assets/image-20190723105748435.png)
* 点击 ***完成***
此时可在名称空间列表中查看到刚刚创建好的名称空间 *example*
![image-20190723105809872](./namespace-create.assets/image-20190723105809872.png)
* 点击 *example* 名称空间
点击 *example* 名称空间后,可进入该名称空间的页面。刚刚初始化的名称空间的界面布局如下图所示:
![image-20190723105830318](./namespace-create.assets/image-20190723105830318.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

View File

@ -0,0 +1,137 @@
# 存储空间管理
## 创建存储类
前提
必须具备如下条件:
* Kubernetes 集群 (安装在阿里云,本文将使用阿里云的 NFS 服务作为存储资源Kuboard 也可以运行在其他云环境或者私有环境中。)
* 已在集群中安装 Kuboard
### 在阿里云创建 NAS 服务
如果您在其他 IaaS 供应商搭建了 Kubernetes 集群,请参考该 IaaS 供应商的文档,创建 NFS 服务。您也可以自行搭建 NFS 服务器,用来为 Kubernetes 集群提供存储资源。
* 进入阿里云 ***文件存储 NAS 服务*** 控制台
登录 www.aliyun.com 后,在控制台界面的产品与服务中选择 ***文件存储 NAS***
如下图所示
![image-20190717113807552](./storage-create.assets/image-20190717113807552.png)
****文件存储 NAS*** 控制台中点击 ***创建文件系统***
![image-20190717114304953](./storage-create.assets/image-20190717114304953.png)
* 填写表单
| 字段名称 | 填写内容 | 说明 |
| -------- | -------------------------------------- | ---------------------------------- |
| 地域 | 请选择您的 Kubernetes 集群所在的地域 | 文件系统所在地域 |
| 存储类型 | 容量型 / 或 SSD型 | 测试目的,使用价格便宜的容量型即可 |
| 协议类型 | NFS | 请选择NFS |
| 可用区 | 请选择您的 Kubernetes 集群所在的可用区 | 文件系统所在可用区 |
| 存储包 | 如果当下没有存储包,可以后续绑定 | 不绑定存储包,将无法使用该文件系统 |
![image-20190717114354610](./storage-create.assets/image-20190717114354610.png)
* 点击 ***确定***
点击确定后,可查看到该文件系统已创建成功
![image-20190717115020848](./storage-create.assets/image-20190717115020848.png)
* 绑定存储包
请自行在阿里云中为该文件系统绑定存储包,如果不绑定存储包,将无法使用该文件系统。
* 点击刚创建文件系统的 ***管理*** 按钮
![image-20190717115403374](./storage-create.assets/image-20190717115403374.png)
* 点击 ***添加挂载点***
并填写表单
| 字段名称 | 填写内容 | 说明 |
| ---------- | -------------------------------------- | -------------- |
| 挂载点类型 | 专有网络 | |
| VPC网络 | 请选择您的 Kubernetes 集群所在的VPC | |
| 交换机 | 请选择您的 Kubernetes 集群所在的交换机 | |
| 权限组 | VPC默认权限组全部允许 | 请选择全部允许 |
![image-20190717115457614](./storage-create.assets/image-20190717115457614.png)
* 点击 ***确定***
点击确定后,将完成挂载点创建,如下图所示:
![image-20190717115829821](./storage-create.assets/image-20190717115829821.png)
* 获取 NFS 连接参数:
在上图界面中,将 ***V4 Mount*** 的指令复制下来后,如下所示:
<div style="font-family: Monaco,Menlo,Consolas,Bitstream Vera Sans Mono,monospace; padding: 20px; background-color: rgb(244, 244, 245);border-radius: 4px;">
sudo mount -t nfs -o vers=4,minorversion=0,noresvport <span style="color: red; background-color: rgb(254, 240, 240);">189344a39c-lex38.cn-beijing.nas.aliyuncs.com</span>:<span style="color: blue; background-color: rgb(217, 236, 255);">/</span> /mnt
</div>
其中红色字体的文字为 NFS Server 的地址,蓝色字体的文字为 NFS Path。如下表所示
| 字段名称 | 字段取值 | 说明 |
| ---------- | -------------------------------------------- | ------------------------------ |
| NFS Server | 189344a39c-lex38.cn-beijing.nas.aliyuncs.com | |
| NFS Path | / | NFS Server和NFS Path以冒号分隔 |
### 在 Kuboard 创建存储类
* 进入 Kuboard ***集群概览页***
参考 [访问 Kuboard](install/install-dashboard?id=访问)
如下图所示:
![image-20190723112105018](./storage-create.assets/image-20190723112105018.png)
* 点击 ***创建存储类***
填写表单
| 字段名称 | 填写内容 | 说明 |
| -------------- | --------------- | ------------------------------------------------------------ |
| 名称 | cluster-storage | 填写你喜欢的名称 |
| 限定名称空间 | 不填写 | 如果限定名称空间,<br />则在 Kuboard 中,您只能在指定的名称空间中使用该存储类<br />在 kubectl 中,不受影响 |
| 存储类型 | NFS | 目前 Kuboard 只支持 NFS将要增加其他类型的存储如 CephFS、Cinder 等 |
| 回收策略 | 回收后删除 | 当该存储类创建的 存储卷Persistent Volume被删除后之前该存储卷中的文件可以被回收后删除 / 回收后保留 |
| 存储卷绑定模式 | 首次使用时绑定 | 即刻绑定:当 存储卷被创建时,就在 NFS 中为其分配空间,并绑定;<br />首次使用时绑定: 在存储卷被第一次使用到时,才绑定 |
![image-20190723112143032](./storage-create.assets/image-20190723112143032.png)
* 点击 ***保存***
![image-20190723112204681](./storage-create.assets/image-20190723112204681.png)
* 点击 ***应用***
![image-20190723113250521](./storage-create.assets/image-20190723113250521.png)
* 点击 ***完成***
此时可在存储资源列表中查看到刚创建的存储类
![image-20190723113312360](./storage-create.assets/image-20190723113312360.png)