elk.yaml
kind: List
apiVersion: v1
items:
- apiVersion: apps/v1
kind: Deployment
metadata:
name: es-single
namespace: elkspace
labels:
app: es-single
spec:
replicas: 1
selector:
matchLabels:
app: es-single
template:
metadata:
name: es-single
labels:
app: es-single
spec:
containers:
- image: elasticsearch:7.9.1
name: es
resources:
limits:
cpu: 1
memory: 2Gi
requests:
cpu: 0.5
memory: 500Mi
env:
- name: "discovery.type"
value: "single-node"
- name: ES_JAVA_OPTS
value: "-Xms512m -Xmx2g"
ports:
- containerPort: 9200
name: db
protocol: TCP
- containerPort: 9300
name: db1
protocol: TCP
- apiVersion: v1
kind: Service
metadata:
name: es-single-service
namespace: elkspace
spec:
type: NodePort
ports:
- port: 9200
targetPort: db
protocol: TCP
nodePort: 32601
- port: 9300
targetPort: db1
protocol: TCP
nodePort: 32502
selector:
app: es-single
- apiVersion: apps/v1
kind: Deployment
metadata:
name: kb-single
namespace: elkspace
labels:
app: kb-single
spec:
replicas: 1
selector:
matchLabels:
app: kb-single
template:
metadata:
name: kb-single
labels:
app: kb-single
spec:
containers:
- name: kb
image: kibana:7.9.1
env:
- name: ELASTICSEARCH_URL
value: "http://es-single-service.elkspace:9200"
ports:
- name: ui
containerPort: 5601
protocol: TCP
resources:
limits:
cpu: 0.5
memory: 500Mi
requests:
cpu: 0.3
memory: 200Mi
- apiVersion: v1
kind: Service
metadata:
name: kb-single-service
namespace: elkspace
spec:
type: NodePort
ports:
- port: 5601
protocol: TCP
targetPort: ui
nodePort: 32403
selector:
app: kb-single
- apiVersion: apps/v1
kind: Deployment
metadata:
name: log-single
namespace: elkspace
labels:
app: log-single
spec:
replicas: 1
selector:
matchLabels:
app: log-single
template:
metadata:
name: log-single
labels:
app: log-single
spec:
containers:
- name: log
image: logstash:7.9.1
ports:
- containerPort: 8080
protocol: TCP
env:
- name: "XPACK_MONITORING_ELASTICSEARCH_URL"
value: "http://es-single-service.elkspace:9200"
securityContext:
privileged: true
- apiVersion: v1
kind: Service
metadata:
name: lg-single-service
namespace: elkspace
spec:
type: NodePort
ports:
- port: 8080
protocol: TCP
targetPort: 8080
nodePort: 32304
selector:
app: log-single