在阿里雲托管的k8s上使用nas做動態存儲


前言

關於aliyun托管k8s的存儲插件主要有兩種:

CSI

# kubectl get pod -n kube-system | grep csi-plugin
csi-plugin-8bbnw                                     9/9     Running     0          26h
csi-plugin-fszg9                                     9/9     Running     0          26h

flexvolume

#  kubectl get pod -n kube-system | grep flexvolume
flexvolume-5fw55                                   1/1     Running            4          288d
flexvolume-992jr                                   1/1     Running            3          288d
flexvolume-f8thl                                   1/1     Running            15         320d
flexvolume-jfzhc                                   1/1     Running            0          6d3h
flexvolume-zjm67                                   1/1     Running            3          152d

插件對比及介紹

詳細請看:https://help.aliyun.com/document_detail/157026.html?spm=a2c4g.11186623.6.787.18e320dbvg3zQT

兩種插件的使用

CSI

https://help.aliyun.com/document_detail/144398.html

注意:NAS的掛載點要和K8S集群在同一專有網絡下

flexvolume

https://www.yuque.com/docs/share/dcb99888-a491-4802-b321-184bf482f672?# 《在kubernetes集群動態使用nas持久卷》

這篇文章要詳細的使用案例

注意

在為阿里雲k8s做存儲前一定要看清楚使用的是那種存儲插件,不然會出現一下問題:

pod一直處於ContainerCreating describe查看是因為掛載失敗了,大致如下: Warning FailedMount 6m19s (x2 over 13m) kubelet, cn-shenzhen.172.16.0.123 Unable to attach or mount volumes: unmounted volumes=[alicloud-nas], unattached volumes=[default-token-tk4g4 alicloud-nas]: timed out waiting for the condition

image.png


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM