当前位置:网站首页>Create NFS based storageclass on kubernetes
Create NFS based storageclass on kubernetes
2022-06-28 05:21:00 【engchina】
Video address :https://www.bilibili.com/video/BV1Aa41117Br/
0. preparation NFS The server
192.168.31.41:/nfs/data
1. install nfs-subdir-external-provisioner, Please put nfs.server and nfs.path Change to your own environmental information .
helm repo add nfs-subdir-external-provisioner https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner/
helm repo update
helm install nfs-subdir-external-provisioner nfs-subdir-external-provisioner/nfs-subdir-external-provisioner \
--set nfs.server=192.168.31.41 \
--set nfs.path=/nfs/data
confirm ,
kubectl get storageclass
2. take nfs-client Set to default storageclass( Optional )
If there are other defaults storageclass, First, change it to non default
kubectl patch storageclass local -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"false"}}}'
kubectl patch storageclass local -p '{"metadata": {"annotations":{"storageclass.beta.kubernetes.io/is-default-class":"false"}}}'
take nfs-client Set to default storageclass
kubectl patch storageclass nfs-client -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
3. establish pvc and pod To test
cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: oke-fsspvc
spec:
storageClassName: "nfs-client"
accessModes:
- ReadWriteMany
resources:
requests:
storage: 10Mi
---
apiVersion: v1
kind: Pod
metadata:
name: oke-fsspod
spec:
containers:
- name: web
image: nginx
volumeMounts:
- name: nfs
mountPath: "/usr/share/nginx/html/"
ports:
- containerPort: 80
name: http
volumes:
- name: nfs
persistentVolumeClaim:
claimName: oke-fsspvc
readOnly: false
EOF
confirm ,
边栏推荐
- 公司为什么选择云数据库?它的魅力到底是什么!
- What is the difference between AC and DC?
- Performance degradation during dpdk source code testing
- 二级造价工程师证书含金量到底有多高?看这些就知道了
- Steve Jobs' speech at Stanford University -- follow your heart
- mysql导出数据库字典成excel文件
- How to design an awesome high concurrency architecture from scratch (recommended Collection)
- Amino dye research: lumiprobe fam amine, 6-isomer
- 吴恩达深度学习测验题:deeplearning.ai-week1-quiz
- The heading angle of sliceplane is the same as that of math Corresponding transformation relation of atan2 (y, x)
猜你喜欢

mysql导出数据库字典成excel文件

Feign implements path escape through custom annotations

? How to write the position to output true

CpG solid support research: lumiprobe general CpG type II

Deeplearning ai-week1-quiz

分享|智慧环保-生态文明信息化解决方案(附PDF)

Docker安装Mysql5.7并开启binlog

Reactive dye research: lumiprobe af594 NHS ester, 5-isomer

活性染料研究:Lumiprobe AF594 NHS 酯,5-异构体

The short video local life section has become popular. How to grasp the new opportunities?
随机推荐
2022 Western pastry (Advanced) test question simulation test platform operation
摄像头基础知识
sqlmap工具使用手册
Steve Jobs' speech at Stanford University -- follow your heart
BioVendor sRAGE Elisa试剂盒化学性质和技术研究
【牛客网刷题系列 之 Verilog快速入门】~ 四选一多路器
SlicePlane的Heading角度与Math.atan2(y,x)的对应转换关系
Why don't big manufacturers use undefined
Question bank and answers of 2022 materialman general basic (materialman) operation certificate examination
How does the power outlet transmit electricity? Simple problems that have plagued my little friend for so many years
Keil C51的Data Overlaying机制导致的函数重入问题
Leetcode 88: merge two ordered arrays
交流电和直流电的区别是什么?
Operation of 2022 power cable judgment question simulation examination platform
? How to write the position to output true
metaRTC5.0编程之p2p网络穿透(stun)指南
PMP考试成绩多久出来?这些你务必知道!
Reactive dye research: lumiprobe af594 NHS ester, 5-isomer
刘海屏手机在部分页面通过[[UIApplication sharedApplication] delegate].window.safeAreaInsets.bottom得到底部安全区高度为0问题
It is the latest weapon to cross the blockade. It is one of the fastest ladders.