Skip to content

Instantly share code, notes, and snippets.

@ceizner
Created January 26, 2018 09:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ceizner/f0b7c81a1cb869ef378a2b984d5c4b0e to your computer and use it in GitHub Desktop.
Save ceizner/f0b7c81a1cb869ef378a2b984d5c4b0e to your computer and use it in GitHub Desktop.
elasticsearch-deployment1.yaml
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: elasticsearch-1
spec:
storageClassName: aws-blazing-mutli-az
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: sysdigcloud-elasticsearch-1 # Elasticsearch node number
spec:
replicas: 1
template:
metadata:
labels:
instance: "1" # Elasticsearch node number
app: sysdigcloud
role: elasticsearch
spec:
containers:
- image: quay.io/sysdig/elasticsearch:5.1.1
name: elasticsearch
# https://www.elastic.co/blog/bootstrap_checks_annoying_instead_of_devastating
# Elasticsearch team decided to force everybody to run ES5 with the following sysctl option:
# sysctl -w vm.max_map_count=262144
# If you choose to run the container in privileged mode the container will automatically configured the system
# parameter and start elasticsearch as elasticsearch user.
# if you choose to run the container not in privileged mode make sure to configure the vm.max_map_count
# on all the servers of your cluster
securityContext:
privileged: true
env:
- name: ELASTICSEARCH_SERVICE
value: sysdigcloud-elasticsearch
- name: ELASTICSEARCH_GOSSIP_NODES_NUM
value: "2"
- name: ELASTICSEARCH_CLUSTER_NAME
value: sysdigcloud
- name: ES_JAVA_OPTS
valueFrom:
configMapKeyRef:
name: sysdigcloud-config
key: elasticsearch.jvm.options
volumeMounts:
- mountPath: /usr/share/elasticsearch/data
name: elasticsearch-1
imagePullSecrets:
- name: sysdigcloud-pull-secret
volumes:
- name: elasticsearch-1
persistentVolumeClaim:
claimName: elasticsearch-1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment