Kubernetes ELK

max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

1
2
3
4
5
6
7
8
9
10
11
12
13
14
initContainers:
- name: init-sysctl
image: busybox
imagePullPolicy: IfNotPresent
command: ["sysctl", "-w", "vm.max_map_count=262144"]
securityContext:
privileged: true
containers:
- name: es-master
securityContext:
capabilities:
add:
- IPC_LOCK
image: gcr.io/tokyo-skein-217911/elasticsearch:6.4.0.1

“xxx” is forbidden: attempt to grant extra privileges

  • solution on GKE

Due to some reason the first character of the username was set to uppercase in Google Cloud/IAM settings, however the above command returned all characters in lowercase.

1
2
3
gcloud config get-value core/account

kubectl create clusterrolebinding cluster-admin-binding --clusterrole=cluster-admin --user="<case-sensitive-username>@gmail.com"