运维开发网

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

运维开发网 https://www.qedev.com 2020-10-09 10:37 出处:51CTO 作者:757781091
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

扫码领视频副本.gif

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号