# Test-case - You can test Redis by putting any data using the Redis CLI (command-line interface). Here are the steps on how to do this: - Exec into redis container using below command, $ kubectl exec -it -n redis pod/ -- /bin/bash - Connect to your Redis server. You can do this by running the following command: $ redis-cli -h -p #Replace with the hostname or IP address of your Redis server, and replace with the port number of your Redis server. The default port number is 6379. - Put data into Redis. You can put data into Redis using the SET command. For example, the following command will set the key mykey to the value myvalue: $ SET mykey myvalue - You can also put more complex data types into Redis, such as lists, sets, and hashes. For example, the following command will set the key mylist to a list of three values: $ RPUSH mylist one two three - Get data from Redis. You can get data from Redis using the GET command. For example, the following command will get the value of the key mykey: $ GET mykey - You can also get more complex data types from Redis, such as lists, sets, and hashes. For example, the following command will get the length of the list mylist: $ LLEN mylist - Exit from redis server and redis pod. $ exit $ exit - Now delete pod, and new pod will create, check whether added key and value persisted or not by following commands, $ kubectl get pods -n redis $ kubectl delete -n redis pod/ $ kubectl exec -it -n redis -- /bin/bash $ redis-cli -h -p $ GET mykey $ LLEN mylist $ exit $ exit - check host path, data should be persisted on host path. This will connect to the Redis server on localhost, set the key mykey to the value myvalue, get the value of the key mykey.