{
  "id": "pod-stability",
  "title": "Manage pod stability",
  "url": "https://redis.io/docs/latest/operate/kubernetes/7.8.4/recommendations/pod-stability/",
  "summary": "This section provides information about how you can use quality of service, priority class, eviction thresholds and resource monitoring to maintain cluster node pod stability.",
  "content": "\nKubernetes clusters manage the allocation of system resources and can evict pods to release system resources.\nHere are some ways that you can configure the Redis Enterprise node pods to maintain pod stability:\n\n## Guaranteed quality of service\n\nA running pod has a quality of service measure assigned to it that is\none of three [quality of service classes](https://kubernetes.io/docs/tasks/configure-pod-container/quality-service-pod/):\nGuaranteed, Burstable, and Best Effort.\nYou can assure the Guaranteed class is assigned to the Redis Enterprise node pods\nby following the right guidelines.\n\nTo get a Guaranteed quality of service class assigned:\n\n * Every container in the pod must have a memory limit and a memory request, and they must be the same.\n * Every container in the pod must have a CPU limit and a CPU request, and they must be the same.\n\nIf resources limits and requests are not specified in the Redis Enterprise CRD,\nthese requirements are met in the default version created by the operator. of your Redis Enterprise cluster CRD,\nOtherwise, you must set the limits and requests to the same value for memory and CPU in the `redisEnterpriseNodeResources`\nsection of the CRD.\n\nSidecar containers also impact the quality of service class assignment for the pod.\n\nTo check the quality of service class of any running Redis Enterprise node pod, run:\n\n```sh\nkubectl get pod rec-0 --o jsonpath=\"{.status.qosClass}\"\n```\n\nwhere `rec-0` is the name of one of the pods associated with the Redis Enterprise cluster.\n\n## Using priority to protect from preemption\n\nWhen a Redis Enterprise node pod is scheduled, it can be assigned a\n[priority class](https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/)\nwith the `priorityClassName` property. This property value is the name of\na priority class that must already exist within the cluster.\n\nA sufficiently high priority will prevent other workloads with a lower\npriority from preempting the scheduling of Redis Enterprise Nodes. Similarly,\na high value may also prevent eviction when lower priority workloads\nare deployed on the same cluster.\n\nThe successful use of this strategy involves first creating a priority class with a very large priority value:\n\n```yaml\napiVersion: scheduling.k8s.io/v1\nkind: PriorityClass\nmetadata:\n  name: redis-enterprise-priority\nvalue: 1000000000\nglobalDefault: false\ndescription: \"This priority class should be used for Redis Enterprise pods only.\"\n```\n\nThen, you refer to the priority class by name in your Redis Enterprise cluster CRD:\n\n```yaml\napiVersion: app.redislabs.com/v1\nkind: RedisEnterpriseCluster\nmetadata:\n  name: example-redisenterprisecluster\nspec:\n  size: 3\n  priorityClassName: \"redis-enterprise-priority\"\n```\n\nAlternatively, you can also [disable preemption entirely](https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#how-to-disable-preemption).\n\n## Managing eviction thresholds\n\nEviction thresholds are typically managed by kubelet arguments.\nYou can set the thresholds:\n\n- On OpenShift - In the [config file](https://docs.openshift.com/container-platform/3.11/admin_guide/out_of_resource_handling.html#out-of-resource-create-config).\n- On GKE - In the [managed settings](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#node_allocatable).\n\nWe recommend that you:\n\n * Set the [soft eviction threshold](https://kubernetes.io/docs/tasks/administer-cluster/out-of-resource/#soft-eviction-thresholds)\n   to be higher than the [hard eviction threshold](https://kubernetes.io/docs/tasks/administer-cluster/out-of-resource/#hard-eviction-thresholds).\n   The high soft threshold makes the node condition change earlier, and alerts the administrator.\n * Set `eviction-max-pod-grace-period` high enough to allow the RS pods to migrate the Redis databases before the pods are force killed.\n * Set the `eviction-soft-grace-period` high enough that the administrator (or a k8s auto-scaling mechanism) scales k8s up or out.\n\n## Monitoring for memory and disk usage\n\nWe recommend that you monitor the node for MemoryPressure and DiskPressure.\nWhen both of these conditions are true, then an [eviction threshold](https://kubernetes.io/docs/tasks/administer-cluster/out-of-resource/#eviction-thresholds)\nis met and the pod is evicted.\n\nTo retrieve the flags, run the command:\n\n```sh\n$kubectl get nodes -o jsonpath='{range .items[*]}name:{.metadata.name}{\"\\t\"}MemoryPressure:{.status.conditions[?(@.type == \"MemoryPressure\")].status}{\"\\t\"}DiskPressure:{.status.conditions[?(@.type == \"DiskPressure\")].status}{\"\\n\"}{end}'\n\nname:gke-55d1ac88-213c\tMemoryPressure:False\tDiskPressure:False\nname:gke-55d1ac88-vrpp\tMemoryPressure:False\tDiskPressure:False\nname:gke-7253cc19-42g0\tMemoryPressure:False\tDiskPressure:False\n```\n",
  "tags": ["docs","operate","kubernetes"],
  "last_updated": "2026-04-08T12:21:52-07:00"
}

