티스토리 뷰
apiVersion: apps/v1
kind: Deployment
metadata:
name: elasticsearch-master1
labels:
component: elasticsearch
role: master
spec:
selector:
matchLabels:
app: esmaster
replicas: 1
template:
metadata:
labels:
component: elasticsearch-master1
role: master
app: esmaster
spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- esmaster
topologyKey: "kubernetes.io/hostname"
hostAliases:
- ip: "10.250.238.44"
hostnames:
- "db.internal.secudiumiot.com"
initContainers:
- name: init-sysctl
image: docker.io/busybox:1.27.2
command: ["sysctl", "-w", "vm.max_map_count=262144"]
securityContext:
privileged: true
containers:
- name: elasticsearch-master1
securityContext:
privileged: true
image: registry.secuiot/infra/elasticsearch:6.8.5
envFrom:
- configMapRef:
name: es-master-config
ports:
- containerPort: 9300
name: transport
livenessProbe:
tcpSocket:
port: transport
initialDelaySeconds: 60
periodSeconds: 10