k8s使用csi配置cinder作存储后端

搭建openstack

根据 https://blog.51cto.com/penguintux/2539670 搭建openstack

创建openstack配置

cloud-config需要放在运行csi pod的work节点上,建议每一个work节点都放一份

cat <<EOF>> /etc/kubernetes/cloud-config 
[Global]
username = admin
password = 123456
domain-name = Default
auth-url = http://192.168.254.100:35357/v3
# tenant-id = 6441367ec4ae4ce39e5f265dd
tenant-name = admin
region = RegionOne

[Metadata]
search-order = metadataService,configDrive
EOF

下载cinder 的 csi

git clone https://github.com/kubernetes/cloud-provider-openstack

使用helm安装csi

helm  -n cinder install cinder-csi  cloud-provider-openstack/charts/cinder-csi-plugin/

测试

kubectl create -f cloud-provider-openstack/examples/cinder-csi-plugin/nginx.yaml

参考链接

https://www.jianshu.com/p/87b02040991c
https://github.com/kubernetes/cloud-provider-openstack/blob/master/docs/cinder-csi-plugin/using-cinder-csi-plugin.md#using-the-helm-chart

上一篇:Unsupported major.minor version 52.0错误解决 Ubuntu JDK8 安装配置


下一篇:SMTX OS 分布式块存储 Kubernetes CSI 实现解析