Useful Resources: Storage Classes , Persistent Volumes Claim , Pods
题干
For this question, please set this context (In exam, diff cluster name)
kubectl config use-context kubernetes-admin@kubernetes
- Create a Storage Class named fast-storage with a provisioner of kubernetes.io/no-provisioner and a volumeBindingMode of Immediate .
- Create a Persistent Volume (PV) named fast-pv-cka with a storage capacity of 50Mi using the fast-storage Storage Class with ReadWriteOnce permission and host path /tmp/fast-data .
- Create a Persistent Volume Claim (PVC) named fast-pvc-cka that requests 30Mi of storage from the fast-pv-cka PV(using the fast-storage Storage Class).
- Create a Pod named fast-pod-cka with nginx:latest image that uses the fast-pvc-cka PVC and mounts the volume at the path /app/data .
- 使用
kubernetes.io/no-provision
提供程序创建一个名为fast-storage
的存储类。volumeBindingMode
为Immediate
。- 创建一个名为
fast-pv-cka
的持久卷,存储容量为50Mi
,使用fast-storage
存储类,具有ReadWriteOnce
权限,主机路径为/tmp/fast-data
。- 创建一个名为
fast-pvc-cka
的持久卷声明(PVC),它从fast-pv-cka
PV请求30Mi
的存储空间(使用fast-storage存储类)。- 使用
nginx:latest