glusterfs在k8s集群中快速搭建的方法:
https://github.com/kubernetes-retired/external-storage/tree/master/gluster/glusterfs
前提:需要k8s集群,至少需要2个node节点
本示例使用的k8s版本为1.18
安装使用
1. 给每个node节点添加标记
$ kubectl label nodes <storage-node-name> storagenode=glusterfs
2.安装GlusterFS DaemonSet
1.18版本需要将apiVersion改为apps/v1
spec加上selector便签
参考示例:glusterfs-daemonset.yaml
kind: DaemonSet
apiVersion: apps/v1
metadata:
name: glusterfs
labels:
glusterfs: daemonset
annotations:
description: GlusterFS DaemonSet
tags: glusterfs
spec:
selector:
matchLabels:
glusterfs: pod
template:
metadata:
name: glusterfs
labels:
glusterfs-node: pod
spec:
nodeSelector:
storagenode: glusterfs
hostNetwork: t

本文介绍如何在Kubernetes集群上快速部署GlusterFS分布式文件系统,包括节点标记、DaemonSet安装、RBAC权限设置、StorageClass创建及PVC配置,实现存储资源的高效管理和利用。
最低0.47元/天 解锁文章
574

被折叠的 条评论
为什么被折叠?



