Skip to content

Instantly share code, notes, and snippets.

@puttpotsawee
Last active September 7, 2018 09:03
Show Gist options
  • Save puttpotsawee/fb80cab82c6867f2d5c01955098b028c to your computer and use it in GitHub Desktop.
Save puttpotsawee/fb80cab82c6867f2d5c01955098b028c to your computer and use it in GitHub Desktop.
Existing elastic2 cluster
---
apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
name: logging-elastic
spec:
replicas: 1
serviceName: logging-elastic
template:
metadata:
labels:
app: logging-elastic
spec:
terminationGracePeriodSeconds: 10
containers:
- name: logging-elastic
image: elasticsearch:2-alpine
ports:
- containerPort: 9200
volumeMounts:
- mountPath: /usr/share/elasticsearch/data
name: logging-elastic-data
volumes:
- name: logging-elastic-data
persistentVolumeClaim:
claimName: elastic-logger
---
apiVersion: v1
kind: Service
metadata:
name: logging-elastic-service
labels:
name: logging-elastic-service
spec:
clusterIP: None
ports:
- name: logging-elastic-port
port: 9200
targetPort: 9200
protocol: TCP
selector:
app: logging-elastic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment