# Ref:- /kra-data/setup/downloads/services # cd /kra-data/ndml-kra.devops/setup/services/dev/redis # container image download url - redis:7.2.1 - https://hub.docker.com/layers/library/redis/7.2.1/images/sha256-28aa338c21f38494f6ce55dd3dba3b96f00f7da4a84f273c801a685dbfd66d94?context=explore # push container image to private registry - docker tag redis:7.2.1 private-repo:5000/redis:7.2.1 - docker push private-repo:5000/redis:7.2.1 # confirmed required docker images pushed on private registries. private-repo:5000/redis:7.2.1 # check namespaces kubectl get ns # create namespace redis kubectl create ns redis # open the redis-deployment.yaml file and update mount path inside container, container port, replicas, nodeSelector, container image and service ports. # open the redis-pv.yaml and redis-pvc.yaml and update storage and host path. # deploy the file by below command kubectl apply -f '*.yaml' -n redis # output deployment.apps/redis-deployment configured service/redis-service configured persistentvolume/redis-pv-volume configured persistentvolumeclaim/redis-pv-claim configured # confirmed deployment by running below command kubectl get all -n redis --------------------- (will give pods, deployment and service data) # check whether pods are in running state or not NAME READY STATUS RESTARTS AGE pod/redis-deployment-7bf64ccb5d-jbmph 1/1 Running 0 22m NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/redis-service ClusterIP 10.109.91.98 6379/TCP 9d NAME READY UP-TO-DATE AVAILABLE AGE deployment.apps/redis-deployment 1/1 1 1 9d NAME DESIRED CURRENT READY AGE replicaset.apps/redis-deployment-7bf64ccb5d 1 1 1 9d # check logs using below command kubectl logs -n redis # check description of pod using below command kubectl describe pod -n redis e.g. kubectl describe pod -n redis pod/redis-deployment-7bf64ccb5d-jbmph # exec into pod kubectl exec -it -n redis -- /bin/bash