I hope I choose the correct place for my question. First of all I should say that I'm newbie in redis, kubernetes etc :(
I have a few Azure Kubernetes Clusters which run our application. We are using Redis. As I found out recently redis:5.0.2-alpine image is in use and it is quite old....
About 1 month ago we updated kubernetes to 1.26.6 and I can see memory pressure issues. Now I'm trying to check all third party components one by one if they support cgropV2.
So the question is: does Redis uses cgroup (I suppose yes)? If yes, which one minimum version supports cgroupv2?
I already tried to monitor memory usage by pods via kubectl top and Azure Monitor. However no significant changes detected since update. All PODs use +- the same amount of memory since update. However memory usage by node increases.
Thank you in advance.
Kubernetes 1.26 supports cgroup v2, but its effective utilization also depends on the container runtime (like Docker or containerd). Ensure your runtime is compatible and configured for cgroup v2. Redis isn't directly affected by cgroup versions.
To check the compatibility of your container runtime with cgroup v2 in Kubernetes 1.26, you can start by identifying which container runtime is being used on your nodes.
Kubernetes 1.26 no longer supports the CRI
v1alpha2API, meaning that container runtimes like containerd version 1.5 and older are not supported. You would need to upgrade to containerd version 1.6.0 or later before upgrading to Kubernetes 1.26.Regarding Redis and its compatibility with cgroup v2, while Redis itself doesn't interact directly with cgroups, it is affected by the resource limitations set by Kubernetes using cgroups. Kubernetes 1.25 brought cgroup v2 to General Availability (GA), offering a unified control system with enhanced resource management capabilities. This upgrade to cgroup v2 in Kubernetes should be compatible with most containerized applications, including Redis, as long as the underlying container runtime and the host's Linux kernel support cgroup v2.
Therefore, for Redis to effectively run in an environment with cgroup v2, the main considerations would be around the container runtime and the host system's configuration. Kubernetes clusters need to be set up wi-th container runtimes that support cgroup v2, and the host system should be configured to utilize cgroup v2. If you're using a container runtime like Docker or containerd, it's essential to ensure they are updated to versions that support cgroup v2.
Reference Documents:
Find Out What Container Runtime is Used on a Node | Kubernetes
Kubernetes 1.25: cgroup v2 graduates to GA | Kubernetes
Kubernetes Removals, Deprecations, and Major Changes in 1.26 | Kubernetes