还在篮子里

Rook 搭建底层存储 · 语雀

Rook 搭建底层存储

预计会修很多版

Rook 作为 适配层,可以有非常多的 插件作为底层存储驱动

配置 kubectl

首先由于我们是使用 Mac 开发 ,需要配置 本机 的 kubectl 预计这个放一个新文档,然后使用 语雀的文档引用使用。

https://www.rancher.cn/docs/rancher/v2.x/cn/install-prepare/kubectl/

先决条件配置

对于 rook 的配置有一些先决条件,Rancher 2.3.0 集群只需要做到这个 的修改,内容摘出如下:

https://rook.github.io/docs/rook/v1.1/flexvolume.html

FlexVolume Configuration

Rancher provides an easy way to configure kubelet. The FlexVolume flag will be shown later on in the configuring the FlexVolume path. It can be provided to the kubelet configuration template at deployment time or by using the up to date feature if Kubernetes is already deployed.

Rancher deploys kubelet as a docker container, you need to mount the host’s flexvolume path into the kubelet image as a volume, this can be done in the extra_binds section of the kubelet cluster config.

Configure the Rancher deployed kubelet by updating the cluster.yml file kubelet section:

services:
  kubelet:
    extra_args:
      volume-plugin-dir: /usr/libexec/kubernetes/kubelet-plugins/volume/exec
    extra_binds:
      - /usr/libexec/kubernetes/kubelet-plugins/volume/exec:/usr/libexec/kubernetes/kubelet-plugins/volume/exec

If you’re using rke, run rke up, this will update and restart your kubernetes cluster system components, in this case the kubelet docker instance(s) will get restarted with the new volume bind and volume plugin dir flag.

The default FlexVolume path for Rancher is /usr/libexec/kubernetes/kubelet-plugins/volume/exec which is also the default FlexVolume path for the Rook operator.

If the default path as above is used no further configuration is required, otherwise if a different path is used the Rook operator will need to be reconfigured, to do this continue with configuring the FlexVolume path to configure Rook to use the FlexVolume path.

安装 rook-operator

然后是 配置 相应的存储系统的 rook-operator

ceph 可以直接使用 chart 安装

image.png

来源: Rook 搭建底层存储 · 语雀

发表评论

电子邮件地址不会被公开。 必填项已用*标注