Lets do the Labs
-
Check the Solution
Details
OK -
Check the Solution
Details
OK -
Check the Solution
Details
No -
Check the Solution
Details
apiVersion: v1 kind: Pod metadata: name: webapp spec: containers: - name: event-simulator image: kodekloud/event-simulator env: - name: LOG_HANDLERS value: file volumeMounts: - mountPath: /log name: log-volume volumes: - name: log-volume hostPath: # directory location on host path: /var/log/webapp # this field is optional type: Directory -
Check the Solution
Details
apiVersion: v1 kind: PersistentVolume metadata: name: pv-log spec: accessModes: - ReadWriteMany capacity: storage: 100Mi hostPath: path: /pv/log -
Check the Solution
Details
kind: PersistentVolumeClaim apiVersion: v1 metadata: name: claim-log-1 spec: accessModes: - ReadWriteOnce resources: requests: storage: 50Mi -
Check the Solution
Details
PENDING -
Check the Solution
Details
AVAILABLE -
Check the Solution
Details
Access Modes Mismatch -
Check the Solution
Details
kind: PersistentVolumeClaim apiVersion: v1 metadata: name: claim-log-1 spec: accessModes: - ReadWriteMany resources: requests: storage: 50Mi -
Check the Solution
Details
100Mi -
Check the Solution
Details
apiVersion: v1 kind: Pod metadata: name: webapp spec: containers: - name: event-simulator image: kodekloud/event-simulator env: - name: LOG_HANDLERS value: file volumeMounts: - mountPath: /log name: log-volume volumes: - name: log-volume persistentVolumeClaim: claimName: claim-log-1 -
Check the Solution
Details
Retain -
Check the Solution
Details
The PV is not delete but not available -
Check the Solution
Details
The PVC is stuck in `terminating` state -
Check the Solution
Details
The PVC is being used by a POD -
Check the Solution
Details
kubectl delete pod webapp -
Check the Solution
Details
Deleted -
Check the Solution
Details
Released