update elastic
parent
8debb2d065
commit
44a55a4942
|
@ -102,7 +102,7 @@ spec:
|
|||
name: transport
|
||||
env:
|
||||
- name: cluster.name
|
||||
value: bfs-elastic-1
|
||||
value: bfs-elastic-dev-1
|
||||
- name: network.host
|
||||
value: 0.0.0.0
|
||||
- name: node.name
|
|
@ -0,0 +1,178 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: elastic-dev-0
|
||||
spec:
|
||||
storageClassName: local-elastic
|
||||
capacity:
|
||||
storage: 50Gi
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
local:
|
||||
path: /data/elastic-dev/es_data
|
||||
nodeAffinity:
|
||||
required:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: kubernetes.io/hostname
|
||||
operator: In
|
||||
values:
|
||||
- bfs-k8snode-10-2-0-12.hetzner.base.beaconfireinc.com
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: elastic-dev-1
|
||||
spec:
|
||||
storageClassName: local-elastic
|
||||
capacity:
|
||||
storage: 50Gi
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
local:
|
||||
path: /data/elastic-dev/es_data
|
||||
nodeAffinity:
|
||||
required:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: kubernetes.io/hostname
|
||||
operator: In
|
||||
values:
|
||||
- bfs-k8snode-10-2-0-13.hetzner.base.beaconfireinc.com
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: elastic-dev-2
|
||||
spec:
|
||||
storageClassName: local-elastic
|
||||
capacity:
|
||||
storage: 50Gi
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
local:
|
||||
path: /data/elastic-dev/es_data
|
||||
nodeAffinity:
|
||||
required:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: kubernetes.io/hostname
|
||||
operator: In
|
||||
values:
|
||||
- bfs-k8snode-10-2-0-14.hetzner.base.beaconfireinc.com
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: elastic
|
||||
spec:
|
||||
serviceName: elastic
|
||||
replicas: 3
|
||||
selector:
|
||||
matchLabels:
|
||||
app: elastic
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: elastic
|
||||
spec:
|
||||
securityContext:
|
||||
fsGroup: 100
|
||||
nodeSelector:
|
||||
kubernetes.io/arch: amd64
|
||||
initContainers:
|
||||
- name: init
|
||||
image: busybox
|
||||
imagePullPolicy: IfNotPresent
|
||||
command: ["/bin/sh", "-c", "sysctl -w vm.max_map_count=262144"]
|
||||
securityContext:
|
||||
privileged: true
|
||||
containers:
|
||||
- name: elasticsearch
|
||||
image: docker.elastic.co/elasticsearch/elasticsearch:8.8.0
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 9200
|
||||
name: restful
|
||||
- containerPort: 9300
|
||||
name: transport
|
||||
env:
|
||||
- name: cluster.name
|
||||
value: bfs-elastic-dev-1
|
||||
- name: network.host
|
||||
value: 0.0.0.0
|
||||
- name: node.name
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
- name: discovery.seed_hosts
|
||||
value: "elastic-0.elastic,elastic-1.elastic,elastic-2.elastic"
|
||||
- name: cluster.initial_master_nodes
|
||||
value: "elastic-0,elastic-1,elastic-2"
|
||||
- name: xpack.security.enabled
|
||||
value: "true"
|
||||
- name: xpack.security.transport.ssl.enabled
|
||||
value: "true"
|
||||
- name: xpack.monitoring.collection.enabled
|
||||
value: "true"
|
||||
- name: ES_JAVA_OPTS
|
||||
value: "-Xms256m -Xmx256m"
|
||||
- name: ELASTIC_PASSWORD
|
||||
value: "changeme"
|
||||
resources:
|
||||
limits:
|
||||
cpu: 2
|
||||
memory: 4Gi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
volumeMounts:
|
||||
- name: es-data
|
||||
mountPath: /usr/share/elasticsearch/data
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: es-data
|
||||
spec:
|
||||
accessModes: ['ReadWriteOnce']
|
||||
storageClassName: "local-elastic"
|
||||
resources:
|
||||
requests:
|
||||
storage: 30Gi
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: elastic-internel
|
||||
labels:
|
||||
app: elastic
|
||||
spec:
|
||||
ports:
|
||||
- name: restful
|
||||
port: 9200
|
||||
targetPort: 9200
|
||||
nodePort: 30020
|
||||
type: NodePort
|
||||
selector:
|
||||
app: elastic
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: elastic
|
||||
labels:
|
||||
app: elastic
|
||||
spec:
|
||||
ports:
|
||||
- name: restful
|
||||
port: 9200
|
||||
- name: transport
|
||||
port: 9300
|
||||
clusterIP: None
|
||||
selector:
|
||||
app: elastic
|
|
@ -1,69 +1,3 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: elastic-dev-0
|
||||
spec:
|
||||
storageClassName: local-elastic
|
||||
capacity:
|
||||
storage: 50Gi
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
local:
|
||||
path: /data/elastic-dev/es_data
|
||||
nodeAffinity:
|
||||
required:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: kubernetes.io/hostname
|
||||
operator: In
|
||||
values:
|
||||
- bfs-k8snode-10-2-0-12.hetzner.base.beaconfireinc.com
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: elastic-dev-1
|
||||
spec:
|
||||
storageClassName: local-elastic
|
||||
capacity:
|
||||
storage: 50Gi
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
local:
|
||||
path: /data/elastic-dev/es_data
|
||||
nodeAffinity:
|
||||
required:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: kubernetes.io/hostname
|
||||
operator: In
|
||||
values:
|
||||
- bfs-k8snode-10-2-0-13.hetzner.base.beaconfireinc.com
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: elastic-dev-2
|
||||
spec:
|
||||
storageClassName: local-elastic
|
||||
capacity:
|
||||
storage: 50Gi
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
local:
|
||||
path: /data/elastic-dev/es_data
|
||||
nodeAffinity:
|
||||
required:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: kubernetes.io/hostname
|
||||
operator: In
|
||||
values:
|
||||
- bfs-k8snode-10-2-0-14.hetzner.base.beaconfireinc.com
|
||||
|
||||
---
|
||||
apiVersion: storage.k8s.io/v1
|
||||
kind: StorageClass
|
||||
|
|
Loading…
Reference in New Issue