Why does the official helm chart for fluent-bit start 20 pods

8/27/2021

I followed the official helm chart for fluent-bit and ended up with 20 pods, in a namespace. How do I configure it to use 1 pod?

The replicaCount attribute in values.yaml is set to 1.

https://github.com/fluent/helm-charts/tree/main/charts/fluent-bit

helm upgrade -i fluent-bit helm/efk/fluent-bit --namespace some-ns

kubectl get pods -n some-ns


NAME                    READY   STATUS    RESTARTS   AGE
fluent-bit-22dx4        1/1     Running   0          15h
fluent-bit-2x6rn        1/1     Running   0          15h
fluent-bit-42rfd        1/1     Running   0          15h
fluent-bit-54drx        1/1     Running   0          15h
fluent-bit-8f8pl        1/1     Running   0          15h
fluent-bit-8rtp9        1/1     Running   0          15h
fluent-bit-8wfcc        1/1     Running   0          15h
fluent-bit-bffh8        1/1     Running   0          15h
fluent-bit-lgl9k        1/1     Running   0          15h
fluent-bit-lqdrs        1/1     Running   0          15h
fluent-bit-mdvlc        1/1     Running   0          15h
fluent-bit-qgvww        1/1     Running   0          15h
fluent-bit-qqwh6        1/1     Running   0          15h
fluent-bit-qxbjt        1/1     Running   0          15h
fluent-bit-rqr8g        1/1     Running   0          15h
fluent-bit-t8vbv        1/1     Running   0          15h
fluent-bit-vkcfl        1/1     Running   0          15h
fluent-bit-wnwtq        1/1     Running   0          15h
fluent-bit-xqwxk        1/1     Running   0          15h
fluent-bit-xxj8q        1/1     Running   0          15h
-- Simon Liu
fluent-bit
kubernetes
kubernetes-helm

1 Answer

8/27/2021

Note that there are two deployment kinds in your template, daemonset and deployment.

This is controlled by the kind field of the values file.

Now daemonset is written in the values, so it will be on each node without considering the affinity Start a replica.

If you want to start one, please set kind to Deployment, then set replicaCount to 1 and redeploy.

values.yaml

# Default values for fluent-bit.

# kind -- DaemonSet or Deployment
kind: Deployment

# replicaCount -- Only applicable if kind=Deployment
replicaCount: 1

https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ https://kubernetes.io/docs/concepts/workloads/controllers/deployment/

-- z.x
Source: StackOverflow