Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2 issues in demo "beats-k8s-send-anywhere" #265

Open
brightzheng100 opened this issue Oct 11, 2019 · 1 comment
Open

2 issues in demo "beats-k8s-send-anywhere" #265

brightzheng100 opened this issue Oct 11, 2019 · 1 comment

Comments

@brightzheng100
Copy link

The first issue is because of racing condition. As the ServiceAccount was created later than DaemonSet, it would cause this:

Events:
  Type     Reason            Age                From                  Message
  ----     ------            ----               ----                  -------
  Warning  FailedCreate      19s (x2 over 19s)  daemonset-controller  Error creating: pods "filebeat-dynamic-" is forbidden: error looking up service account kube-system/filebeat-dynamic: serviceaccount "filebeat-dynamic" not found
  Normal   SuccessfulCreate  18s                daemonset-controller  Created pod: filebeat-dynamic-7l58b
  Normal   SuccessfulCreate  18s                daemonset-controller  Created pod: filebeat-dynamic-wkp6s
  Normal   SuccessfulCreate  18s                daemonset-controller  Created pod: filebeat-dynamic-sms98

So shifting the SA and RB to top helps.

The second issue is that the demo has an implicit assumption: the CRI MUST be Docker. While using CRI-O, it would cause errors and come into CrashLoopBackOff.

2019-10-11T02:14:42.177Z        INFO    instance/beat.go:359    filebeat stopped.
2019-10-11T02:14:42.177Z        ERROR   instance/beat.go:906    Exiting: error initializing publisher: error initializing processors: Cannot connect
 to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Exiting: error initializing publisher: error initializing processors: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the doc
ker daemon running?
@DanRoscigno
Copy link
Contributor

Thanks @brightzheng100 I will have a look. I have not seen the race condition, and I have only used Docker based deployments. Do you have a fix for CRI-O based systems? I would expect the k8s layer to abstract away the underlying container provider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants