k8s持久卷、临时卷、PV/PVC管理
k8s存储卷、PV/PVC管理
·
持久卷
1. 卷概述
2. hostPath卷
-- 验证hostPath卷
3. NFS卷
购买NFS云服务器:
主机名 | IP | 配置 |
nfs | 192.168.1.10 | 1CPU,1G内存 |
-- 访问验证nfs卷:
[root@master ~]# kubectl apply -f web1.yaml
pod/web1 created
[root@master ~]# kubectl get pods -o wide
NAME READY STATUS RESTARTS AGE IP NODE
web1 1/1 Running 0 12m 10.244.1.19 node-0001
[root@master ~]# curl http://10.244.1.19
nfs server
PV/PVC管理
1. 概述
2. PV/PVC持久卷
3. 临时卷-configMap
-- 任务:修改系统时区
4. 临时卷-secret
可以查看log发现从私有仓库harbor中下载了指定的镜像
5. 临时卷-emptyDir
-- 所有文章都是为了学习,有些内容受到限制无法分享,欢迎讨论
更多推荐
已为社区贡献4条内容
所有评论(0)