本文介绍使用helm安装NFS-Client Provisioner实现动态存储,主要包括使用helm安装NFS-Client Provisioner实现动态存储使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。
准备
1.1 搭建好NFS服务
1.2 安装好helm
helm安装地址
安装
1 2 3 4 5 6 7 8 9 10 11
| helm repo add nfs-subdir-external-provisioner https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner
helm install nfs-subdir-external-provisioner nfs-subdir-external-provisioner/nfs-subdir-external-provisioner \ --set nfs.server=10.1.129.86 \ --set nfs.path=/data/nfs-ops \ -n kube-ops (可以选择安装的namespace)
kubectl get sc -n kube-ops
|
如果想改的参数更多些,可以下载chart改values.yaml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
| helm pull nfs-subdir-external-provisioner/nfs-subdir-external-provisioner
cat values.yaml | egrep -v '#|^$'
replicaCount: 1 strategyType: Recreate image: repository: k8s.gcr.io/sig-storage/nfs-subdir-external-provisioner tag: v4.0.2 pullPolicy: IfNotPresent imagePullSecrets: [] nfs: server: 10.1.129.86 path: /data/nfs-ops mountOptions: volumeName: nfs-subdir-external-provisioner-root reclaimPolicy: Retain storageClass: create: true defaultClass: false name: sc-nfs-ops allowVolumeExpansion: true reclaimPolicy: Delete archiveOnDelete: true onDelete: pathPattern: accessModes: ReadWriteOnce annotations: {} leaderElection: enabled: true rbac: create: true podSecurityPolicy: enabled: false podAnnotations: {} podSecurityContext: {} securityContext: {} serviceAccount: create: true annotations: {} name: resources: {} nodeSelector: {} tolerations: [] affinity: {} labels: {}
helm install sc-nfs-ops nfs-subdir-external-provisioner/nfs-subdir-external-provisioner -f values.yaml -n kube-ops
|