上传文件至 ''
This commit is contained in:
parent
32c0d0aaea
commit
f9a56832bd
143
es.yaml
Normal file
143
es.yaml
Normal file
@ -0,0 +1,143 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
labels:
|
||||
k8s.kuboard.cn/name: es
|
||||
app: elastcisearch
|
||||
name: es
|
||||
namespace: logging
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: elasticsearch
|
||||
serviceName: elasticsearch
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: elasticsearch
|
||||
spec:
|
||||
containers:
|
||||
- env:
|
||||
- name: cluster.name
|
||||
value: k8s-logs
|
||||
- name: node.name
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: metadata.name
|
||||
- name: cluster.initial_master_nodes
|
||||
value: 'es-0,es-1'
|
||||
- name: discovery.zen.minimum_master_nodes
|
||||
value: '2'
|
||||
- name: discovery.seed_hosts
|
||||
value: elasticsearch
|
||||
- name: ESJAVAOPTS
|
||||
value: '-Xms512m -Xmx512m'
|
||||
- name: network.host
|
||||
value: 0.0.0.0
|
||||
- name: node.max_local_storage_nodes
|
||||
value: '3'
|
||||
- name: TZ
|
||||
value: Asia/Shanghai
|
||||
image: '10.9.12.201/xingdian/es:7.6.2'
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: elasticsearch
|
||||
ports:
|
||||
- containerPort: 9200
|
||||
name: rest
|
||||
protocol: TCP
|
||||
- containerPort: 9300
|
||||
name: inter
|
||||
protocol: TCP
|
||||
resources:
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 1000Mi
|
||||
requests:
|
||||
cpu: 500m
|
||||
memory: 1000Mi
|
||||
terminationMessagePath: /dev/termination-log
|
||||
terminationMessagePolicy: File
|
||||
volumeMounts:
|
||||
- mountPath: /usr/share/elasticsearch/data
|
||||
name: data
|
||||
initContainers:
|
||||
- command:
|
||||
- sysctl
|
||||
- '-w'
|
||||
- vm.max_map_count=262144
|
||||
image: 10.9.12.201/xingdian/busybox
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: increase-vm-max-map
|
||||
resources: {}
|
||||
securityContext:
|
||||
privileged: true
|
||||
terminationMessagePath: /dev/termination-log
|
||||
terminationMessagePolicy: File
|
||||
- command:
|
||||
- sh
|
||||
- '-c'
|
||||
- ulimit -n 65536
|
||||
image: 10.9.12.201/xingdian/busybox
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: increase-fd-ulimit
|
||||
terminationMessagePath: /dev/termination-log
|
||||
terminationMessagePolicy: File
|
||||
nodeSelector:
|
||||
es: log
|
||||
restartPolicy: Always
|
||||
schedulerName: default-scheduler
|
||||
securityContext: {}
|
||||
terminationGracePeriodSeconds: 30
|
||||
updateStrategy:
|
||||
rollingUpdate:
|
||||
partition: 0
|
||||
type: RollingUpdate
|
||||
volumeClaimTemplates:
|
||||
- apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
app: elasticsearch
|
||||
name: data
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
storageClassName: es
|
||||
volumeMode: Filesystem
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations: {}
|
||||
labels:
|
||||
app: elasticsearch
|
||||
name: elasticsearch
|
||||
namespace: logging
|
||||
spec:
|
||||
internalTrafficPolicy: Cluster
|
||||
ipFamilies:
|
||||
- IPv4
|
||||
ipFamilyPolicy: SingleStack
|
||||
ports:
|
||||
- name: rest
|
||||
port: 9200
|
||||
protocol: TCP
|
||||
targetPort: 9200
|
||||
- name: inter-node
|
||||
port: 9300
|
||||
protocol: TCP
|
||||
targetPort: 9300
|
||||
selector:
|
||||
app: elasticsearch
|
||||
sessionAffinity: None
|
||||
type: ClusterIP
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user