本站支持搜索的镜像仓库:Docker Hub、gcr.io、ghcr.io、quay.io、k8s.gcr.io、registry.gcr.io、elastic.co、mcr.microsoft.com
该仓库包含Gluster的CSI(容器存储接口)驱动。容器存储接口(CSI)是一种行业标准,旨在实现集群级卷插件的标准化,使存储供应商(SP)只需开发一次插件,即可在多个容器编排(CO)系统中使用。
本仓库包含源代码和Dockerfile用于构建GlusterFS CSI驱动,采用多阶段容器构建方式,需使用较新版本的Docker或Buildah。
克隆仓库并进入目录:
[root@localhost]# git clone [***] [root@localhost]# cd gluster-csi-driver
运行构建脚本:
[root@localhost]# ./build.sh
使用CSI驱动前需完成以下环境准备:
注意:可通过GCS工具一键部署上述环境,无需分别安装。详情参见GCS部署指南。
[root@localhost]# cd examples/kubernetes/gluster-virtblock/ [root@localhost]# kubectl create -f csi-deployment.yaml service/csi-attacher-glustervirtblockplugin created statefulset.apps/csi-attacher-glustervirtblockplugin created daemonset.apps/csi-nodeplugin-glustervirtblockplugin created service/csi-provisioner-glustervirtblockplugin created statefulset.apps/csi-provisioner-glustervirtblockplugin created serviceaccount/glustervirtblock-csi created clusterrole.rbac.authorization.k8s.io/glustervirtblock-csi created clusterrolebinding.rbac.authorization.k8s.io/glustervirtblock-csi-role created
# storage-class.yaml apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: glustervirtblock-csi annotations: storageclass.kubernetes.io/is-default-class: "false" provisioner: org.gluster.glustervirtblock
[root@localhost]# kubectl create -f storage-class.yaml storageclass.storage.k8s.io/glustervirtblock-csi created
验证存储类创建:
[root@localhost]# kubectl get storageclass NAME PROVISIONER AGE glustervirtblock-csi org.gluster.glustervirtblock 6s
# pvc.yaml kind: PersistentVolumeClaim apiVersion: v1 metadata: name: glusterblock-csi-pv spec: storageClassName: glustervirtblock-csi accessModes: - ReadWriteOnce resources: requests: storage: 100Mi
[root@localhost]# kubectl create -f pvc.yaml persistentvolumeclaim/glusterblock-csi-pv created
验证PVC状态:
[root@localhost]# kubectl get pvc NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE glusterblock-csi-pv Bound pvc-1048edfb-1f06-11e9-8b7a-525400491c42 100Mi RWO glustervirtblock-csi 8s
# app.yaml apiVersion: v1 kind: Pod metadata: name: gluster-0 labels: app: gluster spec: containers: - name: gluster image: redis imagePullPolicy: IfNotPresent volumeMounts: - mountPath: "/mnt/gluster" name: glusterblockcsivol volumes: - name: glusterblockcsivol persistentVolumeClaim: claimName: glusterblock-csi-pv
[root@localhost]# kubectl create -f app.yaml pod/gluster-0 created
验证Pod状态及挂载:
[root@localhost]# kubectl get pods NAME READY STATUS RESTARTS AGE gluster-0 1/1 Running 0 38s [root@localhost]# kubectl exec -it gluster-0 -- mount | grep gluster /mnt/blockhostvol/block_hosting_volume_ddd7ced7-7766-4797-9214-01fa9587472a/pvc-1048edfb-1f06-11e9-8b7a-525400491c42 on /mnt/gluster type xfs (rw,relatime,seclabel,attr2,inode64,noquota)
[root@localhost]# kubectl create -f csi-deployment.yaml service/csi-attacher-glusterfsplugin created statefulset.apps/csi-attacher-glusterfsplugin created daemonset.apps/csi-nodeplugin-glusterfsplugin created service/csi-provisioner-glusterfsplugin created statefulset.apps/csi-provisioner-glusterfsplugin created serviceaccount/glusterfs-csi created clusterrole.rbac.authorization.k8s.io/glusterfs-csi created clusterrolebinding.rbac.authorization.k8s.io/glusterfs-csi-role created
注意:Kubernetes v1.13.1需启用特性门控:
--feature-gates=VolumeSnapshotDataSource=true
# storage-class.yaml apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: glusterfs-csi annotations: storageclass.kubernetes.io/is-default-class: "true" provisioner: org.gluster.glusterfs
[root@localhost]# kubectl create -f storage-class.yaml storageclass.storage.k8s.io/glusterfs-csi created
步骤与RWO类似,PVC访问模式指定为ReadWriteMany,详细操作参见RWO卷声明部分。
# snapshot-class.yaml apiVersion: snapshot.storage.k8s.io/v1alpha1 kind: VolumeSnapshotClass metadata: name: glusterfs-csi-snap snapshotter: org.gluster.glusterfs
[root@localhost]# kubectl create -f snapshot-class.yaml volumesnapshotclass.snapshot.storage.k8s.io/glusterfs-csi-snap created
# volume-snapshot.yaml apiVersion: snapshot.storage.k8s.io/v1alpha1 kind: VolumeSnapshot metadata: name: glusterfs-csi-ss spec: snapshotClassName: glusterfs-csi-snap source: name: glusterfs-csi-pv kind: PersistentVolumeClaim
[root@localhost]# kubectl create -f volume-snapshot.yaml volumesnapshot.snapshot.storage.k8s.io/glusterfs-csi-ss created
# pvc-restore.yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: name: glusterfs-pv-restore spec: storageClassName: glusterfs-csi dataSource: name: glusterfs-csi-ss kind: VolumeSnapshot apiGroup: snapshot.storage.k8s.io accessModes: - ReadWriteMany resources: requests: storage: 5Gi
[root@localhost]# kubectl create -f pvc-restore.yaml persistentvolumeclaim/glusterfs-pv-restore created
创建支持Thin Arbiter的存储类:
# thin-arbiter-virtblock-storageclass.yaml apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: glustervirtblock-csi-thin-arbiter provisioner: org.gluster.glustervirtblock parameters: replicas: "2" arbiterType: "thin" arbiterPath: "192.168.122.121:/mnt/arbiter-path:24007"
使用loopback设备作为brick的存储类:
# glusterfs-lite-storage-class.yaml apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: glusterfs-lite-csi provisioner: org.gluster.glusterfs parameters: brickType: "loop"
免费版仅支持 Docker Hub 加速,不承诺可用性和速度;专业版支持更多镜像源,保证可用性和稳定速度,提供优先客服响应。
免费版仅支持 docker.io;专业版支持 docker.io、gcr.io、ghcr.io、registry.k8s.io、nvcr.io、quay.io、mcr.microsoft.com、docker.elastic.co 等。
当返回 402 Payment Required 错误时,表示流量已耗尽,需要充值流量包以恢复服务。
通常由 Docker 版本过低导致,需要升级到 20.x 或更高版本以支持 V2 协议。
先检查 Docker 版本,版本过低则升级;版本正常则验证镜像信息是否正确。
使用 docker tag 命令为镜像打上新标签,去掉域名前缀,使镜像名称更简洁。
探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录方式配置轩辕镜像加速服务,包含7个详细步骤
在 Linux 系统上配置轩辕镜像源,支持主流发行版
在 Docker Desktop 中配置轩辕镜像加速,适用于桌面系统
在 Docker Compose 中使用轩辕镜像加速,支持容器编排
在 k8s 中配置 containerd 使用轩辕镜像加速
在宝塔面板中配置轩辕镜像加速,提升服务器管理效率
在 Synology 群晖NAS系统中配置轩辕镜像加速
在飞牛fnOS系统中配置轩辕镜像加速
在极空间NAS中配置轩辕镜像加速
在爱快ikuai系统中配置轩辕镜像加速
在绿联NAS系统中配置轩辕镜像加速
在威联通NAS系统中配置轩辕镜像加速
在 Podman 中配置轩辕镜像加速,支持多系统
配置轩辕镜像加速9大主流镜像仓库,包含详细配置步骤
无需登录即可使用轩辕镜像加速服务,更加便捷高效
需要其他帮助?请查看我们的 常见问题 或 官方QQ群: 13763429