rook 安装ceph 集群
时间: 2024-03-29 14:28:01 浏览: 35
安装 Rook 需要以下步骤:
1. 安装 Rook CRDs 和 Operator
使用以下命令安装 Rook CRDs 和 Operator:
```
$ kubectl create -f https://github.com/rook/rook/raw/release-1.7/cluster/examples/kubernetes/ceph/common.yaml
$ kubectl create -f https://github.com/rook/rook/raw/release-1.7/cluster/examples/kubernetes/ceph/operator.yaml
```
检查 Operator 是否正常运行:
```
$ kubectl -n rook-ceph get pod
```
2. 创建 Ceph 集群
创建 Rook 集群需要以下步骤:
- 创建 Ceph 集群定义
- 创建 Ceph 存储定义
- 创建 Ceph 存储类
- 创建 Ceph 块存储和文件存储
在创建之前,需要先配置 Ceph 集群所需的参数,如 OSD 数量、Monitors 数量等。可以通过修改 `cluster.yaml` 文件来配置这些参数。
使用以下命令创建 Ceph 集群:
```
$ kubectl create -f https://github.com/rook/rook/raw/release-1.7/cluster/examples/kubernetes/ceph/cluster.yaml
```
检查 Ceph 集群是否成功创建:
```
$ kubectl -n rook-ceph get pod
```
3. 创建 Ceph 存储定义
使用以下命令创建 Ceph 存储定义:
```
$ kubectl create -f https://github.com/rook/rook/raw/release-1.7/cluster/examples/kubernetes/ceph/storageclass.yaml
```
4. 创建 Ceph 块存储和文件存储
使用以下命令创建 Ceph 块存储和文件存储:
```
$ kubectl create -f https://github.com/rook/rook/raw/release-1.7/cluster/examples/kubernetes/ceph/csi/rbd/storageclass.yaml
$ kubectl create -f https://github.com/rook/rook/raw/release-1.7/cluster/examples/kubernetes/ceph/csi/cephfs/storageclass.yaml
```
至此,Rook 集群已经成功安装并且 Ceph 存储已经创建完毕。可以使用 `kubectl get` 命令来查看集群状态和存储状态。
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![doc](https://img-home.csdnimg.cn/images/20210720083327.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)