k8s 部署 NFS Provisioner
nfs存储卷按参考文档进行部署,发现镜像是拉不下来的,被墙了,所以需要自己构建一个用阿里云构建海外镜像helm 添加仓库helm repo add nfs-subdir-external-provisioner https://kubernetes-sigs.github.io/nfs-subdir-external-provisionerhelm repo update拉取 helm 模板hel
·
按参考文档进行部署,发现镜像是拉不下来的,被墙了,所以需要自己构建一个 用阿里云构建海外镜像
helm 添加仓库
helm repo add nfs-subdir-external-provisioner https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner/
helm repo update
拉取 helm 模板
helm pull nfs-subdir-external-provisioner/nfs-subdir-external-provisioner
解压文件
tar -zxvf nfs-subdir-external-provisioner-4.0.16.tgz
目录结构如下
修改 values.yaml 文件,更改镜像为阿里云镜像
replicaCount: 1
strategyType: Recreate
image:
repository: registry.cn-hangzhou.aliyuncs.com/lzf-k8s/k8s-nfs-storage
tag: 1.0.0
pullPolicy: IfNotPresent
imagePullSecrets: []
构建
- 官方例子
helm install nfs-subdir-external-provisioner nfs-subdir-external-provisioner/nfs-subdir-external-provisioner \
--set nfs.server=x.x.x.x \
--set nfs.path=/exported/path \
-f values.yaml
- 使用线上模板,需要指定 values.yaml
helm install nfs-subdir-external-provisioner nfs-subdir-external-provisioner/nfs-subdir-external-provisioner --set nfs.server=192.168.140.28 --set nfs.path=/home/nfs -f values.yaml
- 使用本地模板
helm install nfs-subdir-external-provisioner nfs-subdir-external-provisioner/ --set nfs.server=192.168.140.28 --set nfs.path=/home/nfs
构建成功,并使用了代理的镜像
默认的 storageClass 是 nfs-client
更多推荐
已为社区贡献2条内容
所有评论(0)