Created
October 10, 2018 21:24
-
-
Save kotarusv/2f521544c83af0305f57183ac6d096fe to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| apiVersion: apps/v1 | |
| kind: StatefulSet | |
| metadata: | |
| name: es-k8s-logging | |
| namespace: kube-instrumentation | |
| spec: | |
| serviceName: "es" | |
| replicas: 1 | |
| selector: | |
| matchLabels: | |
| app: elasticsearch | |
| function: logging | |
| template: | |
| metadata: | |
| labels: | |
| app: elasticsearch | |
| function: logging | |
| spec: | |
| initContainers: | |
| - name: volume-mount-hack | |
| image: busybox | |
| command: ["sh", "-c", "chown -R 1000:100 /usr/share/elasticsearch/data"] | |
| volumeMounts: | |
| - name: data | |
| mountPath: /usr/share/elasticsearch/data | |
| containers: | |
| - name: elasticsearch | |
| image: docker.elastic.co/elasticsearch/elasticsearch:5.5.1 | |
| command: ["bin/elasticsearch"] | |
| args: ["-Ehttp.host=0.0.0.0", "-Etransport.host=127.0.0.1", "-Ecluster.name=kubernetes", "-Ebootstrap.memory_lock=true"] | |
| env: | |
| - name: ES_JAVA_OPTS | |
| value: "-Xms512m -Xmx512m" | |
| ports: | |
| - containerPort: 9200 | |
| volumeClaimTemplates: | |
| - metadata: | |
| name: data | |
| spec: | |
| accessModes: [ "ReadWriteOnce" ] | |
| resources: | |
| requests: | |
| storage: 5Gi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment