Glusterfs和Heketi在Kubernetes集群中的部署过程

基础设施要求

环境准备

主机名 系统 ip地址 角色
Node-1 Centos7 192.168.0.121 k8s-node,master
Node-2 Centos7 192.168.0.122 k8s-node,glusterfs
Node-3 Centos7 192.168.0.123 k8s-node,glusterfs
Node-4 Centos7 192.168.0.124 k8s-node,glusterfs

下载相关文件

部署glusterfs

部署heketi server端


{
  "clusters": [
    {
      "nodes": [
        {
          "node": {
            "hostnames": {
              "manage": [
                "node-2"
              ],
              "storage": [
                "192.168.0.122"
              ]
            },
            "zone": 1
          },
          "devices": [
            {
              "name": "/dev/vdc"
            }
          ]
        },
        {
          "node": {
            "hostnames": {
              "manage": [
                "node-3"
              ],
              "storage": [
                "192.168.0.123"
              ]
            },
            "zone": 1
          },
          "devices": [
            {
              "name": "/dev/vdc"
            }
          ]
        },
        {
          "node": {
            "hostnames": {
              "manage": [
                "node-4"
              ],
              "storage": [
                "192.168.0.124"
              ]
            },
            "zone": 1
          },
          "devices": [
            {
              "name": "/dev/vdb"
            }
          ]
        }
      ]
    }
  ]
}


heketi-cli  topology load --json topology-sample.json

创建heketi存储卷

heketi-cli setup-openshift-heketi-storage
Saving heketi-storage.json

启用认证