Kubernetes – CKAD practise exercises – problems that focus on CKAD curriculum
As i referred in my previous post Certified Kubernetes Application Developer – CKAD, its highly important to practise real world problems as much as possible to be successful in CKAD certification.
docker pull mysql
docker pull wordpress
The exercise involves setting up two deployments, WordPress and MySql and will follow the below topology.
Kubernetes Objects: Create the following k8s objects for the above WordPress Application deployment
- Secret – The Secret object will store the password for the MySql Database
- PersistentVolume – Storage resource volume that can be provisioned for an application. In the example, we provision 1Gi each for WordPress and MySql
- PersistentVolumeClaim – Claims that are used to consume the Storage Volumes – Both WordPress and MySql will have their PVCs created.
- Deployment – The Deployment definitions will define the application containers, Secrets and the Storage volumes that will be used for VolumeMount
- ClusterIP Service – This service will be used by the WordPress pod to communicate with MySql database
- NodePort Service – The NodePort service will expose the WordPress application on a port outside the Kubernetes cluster, through which WordPress application can be accessed.
The complete set of definition files can be found in the following git repository.
Play around them and possibly deploy them in any public cloud like EKS / GKE to explore the real world scenarios.