[root@k8s-1 ~]# cat Flent-bit-DaemonSet.yaml
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
generation: 1
labels:
app: fluent-bit
release: logging-fluentbit-operator
name: fluent-bit
namespace: kubesphere-logging-system
spec:
revisionHistoryLimit: 10
selector:
matchLabels:
app: fluent-bit
chart: fluentbit-operator-0.1.0
release: logging-fluentbit-operator
template:
metadata:
annotations:
prometheus.io/path: /api/v1/metrics/prometheus
prometheus.io/port: "2020"
prometheus.io/scrape: "true"
creationTimestamp: null
labels:
app: fluent-bit
chart: fluentbit-operator-0.1.0
release: logging-fluentbit-operator
spec:
containers:
- image: kubesphere/fluent-bit:v1.3.2-reload
imagePullPolicy: IfNotPresent
name: fluent-bit
ports:
- containerPort: 2020
name: monitor
protocol: TCP
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /var/lib/docker/containers
name: varlibcontainers
readOnly: true
- mountPath: /fluent-bit/etc/fluent-bit.conf
name: config
subPath: fluent-bit.conf
- mountPath: /fluent-bit/app-config/
name: app-config
- mountPath: /tail-db
name: positions
- mountPath: /var/log/
name: varlogs
- mountPath: /etc/hosts ####新增hosts文件
name: hosts
readOnly: true
- args:
- -volume-dir=/fluent-bit/app-config/
- -webhook-url=http://127.0.0.1:24444/api/config.reload
image: kubesphere/configmap-reload:v0.0.1
imagePullPolicy: IfNotPresent
name: config-reloader
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /fluent-bit/app-config/
name: app-config
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
serviceAccount: fluentbit
serviceAccountName: fluentbit
terminationGracePeriodSeconds: 30
tolerations:
- operator: Exists
volumes:
- hostPath:
path: /var/lib/docker/containers
type: ""
name: varlibcontainers
- configMap:
defaultMode: 420
name: fluent-bit-config
name: config
- configMap:
defaultMode: 420
name: fluent-bit-app-config
name: app-config
- hostPath:
path: /var/log
type: ""
name: varlogs
- hostPath:
path: /etc/hosts ####新增hosts文件
type: ""
name: hosts
- emptyDir: {}
name: positions
templateGeneration: 1
updateStrategy:
type: OnDelete
status:
currentNumberScheduled: 4
desiredNumberScheduled: 4
numberAvailable: 4
numberMisscheduled: 0
numberReady: 4
observedGeneration: 1
updatedNumberScheduled: 4