TLS and Security
Securing redis setup with password
If we want to use password based authentication inside Redis, we need to create a secret for it. By default, operator doesn’t apply password on standalone or cluster. We need to enable the password login via helm
command or YAML
manifests.
For users that are managing Redis setup using YAML
manifest, they need to define redisSecret
inside the object of Redis and RedisCluster. For further details, please check here.
With helm
, the password configuration can be defined inside the values file and also can be passed using helm --set
command.
Password configuration for Redis standalone:
Password configuration for Redis cluster:
Once the password configuration is applied to the redis setup, we can perform the validation using the combination of kubectl
and redis-cli
.
Try passing the password to the redis setup:
TLS configuration for redis setup
TLS is a security protocol that makes packet and network transfer encrypted between server and client architecture. In the redis setup, we can add TLS as a part of an additional security layer, and along with username and password, the TLS parameters also need to be passed to the client for server authentication.
The architecture with TLS setup looks like this:

Certificate creation
TLS certificates can be purchased or self-signed, but both can be integrated with the redis setup. In Kubernetes, we can install cert-manager, and it can be used for generating the certificates inside Kubernetes for redis and different other applications.
First, we need to create an issuer inside the Kubernetes to issue the certificates for redis TLS integration.
Verify the issuer by using kubectl
command:
Once the issuer configuration is done, we need to create a Certificate
object to create certificate for Redis.
Create the defined YAML
object inside the Kubernetes cluster using kubectl
command:
Once the certificates are in ready, we can verify if the TLS secret is created or not by cert-manager.
Redis TLS configuration
Redis TLS configuration can be done via YAML
manifests and helm
values file. We need to add details about the certificate to the Redis and RedisCluster objects.
For YAML
manifest configuration, we need to define the TLS block like this:
For helm upgrade
method we need to update the values file of Redis
and RedisCluster
.