Membuat file deployment
apiVersion: apps/v1 kind: Deployment metadata: name: filebeat-forti labels: k8s-app: filebeat namespace: elasticstack spec: selector: matchLabels: k8s-app: filebeat template: metadata: labels: common.k8s.elastic.co/type: filebeat-forti k8s-app: filebeat namespace: elasticstack spec: containers: - args: - '-c' - /etc/filebeat/filebeat.yml - '-e' env: - name: ELASTICSEARCH_USERNAME valueFrom: secretKeyRef: key: username name: user-pass-elastic optional: false - name: ELASTICSEARCH_PASSWORD valueFrom: secretKeyRef: key: password name: user-pass-elastic optional: false image: docker.elastic.co/beats/filebeat:7.17.2 imagePullPolicy: IfNotPresent name: filebeat ports: - containerPort: 514 name: 514udp protocol: UDP terminationMessagePath: /dev/termination-log terminationMessagePolicy: File volumeMounts: - mountPath: /etc/filebeat name: filebeat-config - mountPath: /usr/share/filebeat/modules.d name: filebeat-module - mountPath: /etc/filebeat/certs name: es-ca-crt