Configure Host Kernel settings

Improve this page by contributing to our documentation.

Redis may require some changes in the kernel of the host machine to work as expected, in particular increasing the somaxconn value and disabling transparent huge pages. To do so, you can set up a privileged initContainer with the sysctlImage config values, for example:

  enabled: true
  mountHostSys: true
    - /bin/sh
    - -c
    - |-
      install_packages procps
      sysctl -w net.core.somaxconn=10000
      echo never > /host-sys/kernel/mm/transparent_hugepage/enabled

Alternatively, for Kubernetes 1.12+ you can set podSecurityContext.sysctls which will configure sysctls for master and slave pods. Example:

  - name: net.core.somaxconn
    value: "10000"

Note that this will not disable transparent huge tables.