简介
本文章介绍如何使用openebs为k8s提供动态申请pv的功能。iscsi提供底层存储功能,openebs管理iscsi。目前只支持pv的ReadWriteOnce
访问模式
访问模式只是能力描述,并不是强制执行的,对于没有按pvc声明的方式使用pv,存储提供者应该负责访问时的运行错误。例如如果设置pvc的访问模式为ReadOnlyMany
,pod挂载后依然可写,如果需要真正的不可写,申请pvc是需要指定 readOnly: true
参数
安装
实验用的Vagrantfile
安装配置iscsi
安装openebs
测试
参考文档
- https://github.com/heketi/heketi/blob/master/docs/admin/install-kubernetes.md
- https://github.com/gluster/gluster-kubernetes/blob/master/docs/setup-guide.md
- https://github.com/gluster/gluster-kubernetes/blob/master/docs/examples/hello_world/README.md
- https://jimmysong.io/kubernetes-handbook/practice/using-heketi-gluster-for-persistent-storage.html
- https://kubernetes.io/docs/concepts/storage/persistent-volumes/
- https://docs.openshift.com/enterprise/3.1/architecture/additional_concepts/storage.html#pv-access-modes
作者:CountingStars_