You are viewing an older version of this section. View current production version.
Set System Requirements
Each Kubernetes worker node (host system) must meet the system requirements as specified in the SingleStore DB System Requirements documentation. The recommended method for configuring these settings is to do so directly on each Kubernetes node where SingleStore DB will be scheduled to run.
As manually configuring a multitude of worker nodes to conform to SingleStore DB’s system requirements can be time-consuming, a DaemonSet can be employed to make this configuration easier.
One key benefit to using a DaemonSet is that, as you scale your cluster with additional worker nodes, the DaemonSet will automatically configure each worker node with the required settings.
The following DaemonSet template must run with elevated privileges in order to perform the required system-level updates to a worker node.
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: memsql-sysreq
labels:
"app.kubernetes.io/name": "memsql-sysreq"
spec:
selector:
matchLabels:
"app.kubernetes.io/name": "memsql-sysreq"
updateStrategy:
type: RollingUpdate
template:
metadata:
labels:
"app.kubernetes.io/name": "memsql-sysreq"
spec:
hostPID: true
volumes:
- name: sys
hostPath:
path: /sys
initContainers:
- name: sysreq
image: busybox
securityContext:
privileged: true
volumeMounts:
- name: sys
mountPath: /rootfs/sys
command:
- "/bin/sh"
- "-c"
- |
set -euxo pipefail
sysctl -w vm.max_map_count=1000000000
sysctl -w vm.min_free_kbytes=658096
echo never > /rootfs/sys/kernel/mm/transparent_hugepage/enabled
echo never > /rootfs/sys/kernel/mm/transparent_hugepage/defrag
echo 0 > /rootfs/sys/kernel/mm/transparent_hugepage/khugepaged/defrag
containers:
- name: pause
image: gcr.io/google_containers/pause