题目:按要求创建PV
设置配置环境kubectl config use-context k8s
创建名为app-data的persistent volume,容量为1Gi,访问模式为ReadWriteMany。volume
类型为hostPath,位于/srv/app-data。
官方参考地址:配置 Pod 以使用 PersistentVolume 作为存储 | Kubernetes
解答:
1、切换答题环境(考试环境有多个,每道题要在对应的环境中作答)
kubectl config use-context k8s
2、创建yaml文件
vi app-data.yaml
apiVersion: v1
kind: PersistentVolume
metadata:
name: app-data
spec:
capacity:
storage: 1Gi
accessModes:
- ReadWriteMany
hostPath:
path: "/srv/app-data"
3、执行yaml文件
kubectl apply -f app-data.yaml
最后应广大同学需求特制作、上架CKA模拟系统供有需要的同学练习使用,其包含最新1.30版本题库解析、模拟练习系统、仿真考试环境等。
CKA模拟系统https://item.taobao.com/item.htm?ft=t&id=840210293893