-1

I would like to know how I can deploy a basic Filebeat pod on Kubernetes? I need to configure a .yaml file but I don't know what I need to specify:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: Filebeat
  labels:
    app: Filebeat
spec:
  replicas: 1
  selector:
    matchLabels:
      app: filebeat
  template:
    metadata:
      labels:
        app: filebeat
    spec:
      containers:
        - name: ???
          image: ???
Wytrzymały Wiktor
  • 11,492
  • 5
  • 29
  • 37
AC-1994
  • 83
  • 9

2 Answers2

0

Try deploy the filebeat component with the helm official chart, is very easy deploy and maintain (upgrade, change configuration) the app.

Btw if you decide deploy with a custom yaml, the current version for filebeat docker image is the 8.0.0, so your yaml example see like this:

spec:
  containers:
    - name: "filebeat"
      image: "docker.elastic.co/beats/filebeat:8.0.0-SNAPSHOT"
Enrique Tejeda
  • 356
  • 1
  • 6
0

If you check filebeat-kubernetes.yaml from https://github.com/elastic/beats/blob/master/deploy/kubernetes/filebeat-kubernetes.yaml, you will see there already prepared values for you

apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: filebeat
  namespace: kube-system
  labels:
    k8s-app: filebeat
spec:
  selector:
    matchLabels:
      k8s-app: filebeat
  template:
    metadata:
      labels:
        k8s-app: filebeat
    spec:
      containers:
      - name: filebeat
        image: docker.elastic.co/beats/filebeat:8.0.0
Vit
  • 7,740
  • 15
  • 40