This lab provides practice scenarios to help prepare you for the Certified Kubernetes Administrator (CKA) Exam. You will be presented with tasks to complete as well as server(s) and/or an existing Kubernetes cluster to complete them in. You will need to use your knowledge of Kubernetes to successfully complete the provided tasks, much like you would on the real CKA exam. Good luck!
Learning Objectives
Successfully complete this lab by achieving the following learning objectives:
- Create a PersistentVolume
- Create a PersistentVolume called
host-storage-pv
with a storage capacity of1Gi
in theacgk8s
context. Configure this PersistentVolume so that volumes that use it can be expanded in the future.Note: This may require you to create additional objects.
- Configure the PersistentVolume to use a hostPath for storage located at
/etc/data
. - Configure the PersistentVolume so that it can be automatically reused if all claims are deleted.
- Create a PersistentVolume called
- Create a Pod That Uses the PersistentVolume for Storage
- Create a Pod called
pv-pod
in theauth
Namespace. Configure this Pod so that it uses thehost-storage-pv
PersistentVolume for storage.Note: This will require the creation of a PersistentVolumeClaim in the same namespace as the Pod.
- Name the PersistentVolumeClaim
host-storage-pvc
. Give your PersistentVolumeClaim a size of100Mi
. - Use the
busybox
image for this Pod, and configure it to run the commandsh -c while true; do echo success > /output/output.log; sleep 5; done
. - Mount the volume that uses the PersistentVolume for storage, such that the
/output
directory ultimately writes to the PersistentVolume.
- Create a Pod called
- Expand the PersistentVolumeClaim
Expand the PersistentVolumeClaim so that the requested storage size is
200Mi
.