How to set sysctl parameter for a privileged container?

Problem

  • How to set sysctl parameter for a privileged container?

Environment

  • Platform9 Managed Kubernetes - All versions

Resolution

  • This can be achieved using a daemonSet with privileged containers.

  • An example is as given below:

- name: opensearch-test
image: xyz
command:
- sysctl
- -w
- vm.max_map_count=262144
securityContext:
privileged: true