fluent-bit收集不同业务日志
fluent-bit的部署
$ helm install --name my-release stable/fluent-bit部署应用
部署nginx
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: "1"
creationTimestamp: "2020-11-24T02:08:08Z"
generation: 1
labels:
k8s-app: nginx-log
qcloud-app: nginx-log
managedFields:
- apiVersion: apps/v1
manager: tke-apiserver
operation: Update
time: "2020-11-24T02:08:08Z"
- apiVersion: apps/v1
manager: kube-controller-manager
operation: Update
time: "2020-11-27T03:21:32Z"
name: nginx-log
namespace: test
resourceVersion: "2156061896"
selfLink: /apis/apps/v1/namespaces/test/deployments/nginx-log
uid: eb42b8f7-97f7-405b-a750-d46df6bcd8c6
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
k8s-app: nginx-log
qcloud-app: nginx-log
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
type: RollingUpdate
template:
metadata:
creationTimestamp: null
labels:
k8s-app: nginx-log
qcloud-app: nginx-log
spec:
containers:
- image: nginx
imagePullPolicy: Always
name: nginx-log
resources:
limits:
cpu: 500m
memory: 1Gi
requests:
cpu: 250m
memory: 256Mi
securityContext:
privileged: false
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /etc/nginx/nginx.conf
name: conf
subPath: nginx.conf
- mountPath: /var/log/nginx
name: log
dnsPolicy: ClusterFirst
imagePullSecrets:
- name: qcloudregistrykey
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
volumes:
- configMap:
defaultMode: 420
name: nginx-conf
name: conf
- hostPath:
path: /data/nginx
type: DirectoryOrCreate
name: log部署golang
修改fluent-bit的配置文件和yaml
修改fluent-bit.conf
fluent-bit.conf配置项介绍
fluent-bit-filter.conf
fluent-bit-input.conf
fluent-bit-output.conf
fluent-bit-service.conf
fluent-bit.conf
parsers.conf
修改fluent-bit的daemonset的yaml
在kibana上创建索引检索日志





最后更新于