Categories
Technology

Kubernetes – CKAD Practise Exercises

Let’s explore and setup a minimal Wordpress application, covering the basic and important Kubernetes objects, both for the real world and CKAD

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.

In this post, we will focus on CKAD practise exercises and let’s explore and setup a minimal WordPress application. Will be using the Docker official images of WordPress and MySql for the exercise.

docker pull mysql
docker pull wordpress

The exercise involves setting up two deployments, WordPress and MySql and will follow the below topology.

ckad wordpress exercise
WordPress Deployment
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.

https://github.com/muralidharan-rade/ckad-wordpress-practise

Play around them and possibly deploy them in any public cloud like EKS / GKE to explore the real world scenarios.

Happy Coding..!!

Leave a Reply

Your email address will not be published. Required fields are marked *