100-Days-Of-DevOps-Challenge-KodeKloud

Deploy Redis Deployment on Kubernetes

The Nautilus application development team observed some performance issues with one of the application that is deployed in Kubernetes cluster. After looking into number of factors, the team has suggested to use some in-memory caching utility for DB service. After number of discussions, they have decided to use Redis. Initially they would like to deploy Redis on kubernetes cluster for testing and later they will move it to production. Please find below more details about the task:

Mount 2 volumes:

a. An Empty directory volume called data at path /redis-master-data.

b. A configmap volume called redis-config at path /redis-master.

c. The container should expose the port 6379.

Finally, redis-deployment should be in an up and running state. Note: The kubectl utility on jump_host has been configured to work with the kubernetes cluster.

Steps

  1. create a k3s-deployment.yaml file and copy-paste the contents from this YAML file

  2. Run the deployment

     kubectl apply -f k3s-deployment.yaml
    
  3. verify result

     kubectl get pods
    

Good to Know?

Redis on Kubernetes

ConfigMap Configuration

Resource Management

Production Considerations