1 helm安裝nfs
- 安裝nfs:
helm install nfs-storage stable/nfs-client-provisioner \
--set nfs.server=nfs_ip \
--set nfs.path=/share \
--set storageClass.defaultClass=true \
--set storageClass.name=nfs-provisioner \
--debug
#設置了storageClass.defaultClass=true,則後面再創建其他應用時如果不指定存儲則默認使用這個nfs
-
其他參數請參考:https://hub.helm.sh/charts/stable/nfs-client-provisioner
-
卸載nfs:
helm uninstall nfs-storage
- 其他參考鏈接:
https://jimmysong.io/kubernetes-handbook/practice/using-nfs-for-persistent-storage.html
2 helm安裝minio並以nfs作爲存儲
- 參考鏈接:https://hub.helm.sh/charts/stable/minio
helm install minio \
--set accessKey=myaccesskey,secretKey=mysecretkey \
--set persistence.storageClass=nfs-provisioner \
--namespace test \
stable/minio
#如果沒有test這個namespace,則需要先創建kubectl create namespace test
- 我創建的minio在namespace default下: