-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathk8s.yaml
89 lines (89 loc) · 2.33 KB
/
k8s.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: log-pilot
labels:
app: log-pilot
k8s.kuboard.cn/layer: cloud
spec:
revisionHistoryLimit: 3
selector:
matchLabels:
app: log-pilot
template:
metadata:
name: log-pilot
labels:
app: log-pilot
spec:
# 是否允许部署到Master节点上
tolerations:
- key: node-role.kubernetes.io/master
effect: NoSchedule
containers:
- name: log-pilot
image: farseernet/log-pilot:7.x
imagePullPolicy: IfNotPresent
resources:
limits:
memory: 200Mi
requests:
cpu: 200m
memory: 200Mi
securityContext:
capabilities:
add:
- SYS_ADMIN
envFrom: #以密文的方式,把配置项写到env
- secretRef:
name: log-pilot
env:
- name: "NODE_NAME"
valueFrom:
fieldRef:
fieldPath: spec.nodeName
volumeMounts:
- name: sock
mountPath: /var/run/docker.sock
- name: root
mountPath: /host
readOnly: true
- name: varlib
mountPath: /var/lib/filebeat
- name: varlog
mountPath: /var/log/filebeat
- name: localtime
mountPath: /etc/localtime
readOnly: true
volumes:
- name: sock
hostPath:
path: /var/run/docker.sock
- name: root
hostPath:
path: /
- name: varlib
hostPath:
path: /var/lib/filebeat
type: DirectoryOrCreate
- name: varlog
hostPath:
path: /var/log/filebeat
type: DirectoryOrCreate
- name: localtime
hostPath:
path: /etc/localtime
---
apiVersion: v1
data:
LOGGING_OUTPUT: ZWxhc3RpY3NlYXJjaA== #elasticsearch
ELASTICSEARCH_HOSTS: aHR0cDovL2VzOjgw #es (必填) http://es:80
ELASTICSEARCH_USER: "" #es (选填) username
ELASTICSEARCH_PASSWORD: "" #es (选填) pwd
ELASTICSEARCH_PATH: "" #es (选填) http path prefix
ELASTICSEARCH_SCHEME: "" #es (选填) scheme, default is http
kind: Secret
metadata:
name: log-pilot
namespace: default
type: Opaque