-
Notifications
You must be signed in to change notification settings - Fork 891
Stream Kubernetes event logs to Coder build/startup logs #7576
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
Comments
@dcarrion87 this might be interesting to you! I'm working on a small Kubernetes chart that automatically sends Kubernetes Pod events as startup logs. It should be a simple deployment with no configuration needed. |
@bpmct wanna keep this open until we have some integrated docs? |
Actually, we probably should. For those following, you can now use: https://github.com/coder/coder-logstream-kube |
Yeah, we'll still need to do the following
Maybe:
|
As per my experience, https://github.com/coder/coder-logstream-kube works with pod also. Haven't tried with deployment. |
Will it show logs if an invalid image is referenced? I think we recommend using deployment because it does not wait for the image to pull to show the logs, covering a wider variety of error cases. In the pod case, I believe it will keep "building" for 5 minutes until it times out and show no extra logs. |
This is almost complete, thanks to the coder-logstream-kube! We'll just need to document this and change our example templates. |
Thanks team. I've added this in to try in an upcoming sprint. Should reduce some noise as to "why" things happen. |
This has been done with logstream kube. |
Uh oh!
There was an error while loading. Please reload this page.
Sometimes, a Kubernetes pod scheduling event may take quite an unexpected time or even fail. Here are some cases when it would happen:
I have been on several support calls for each of these cases.
However, these errors are not visible to the user or admin from the Coder dashboard/UI. The best way to see this is if a Kubernetes admin runs "kubectl describe pod ". The error will always be in the event logs there.
Ideally, these logs are streamed to the Coder workspace build. Since Coder aims to be platform agnostic, this will likely not be a core feature, but some extra sidecar or DaemonSet on the cluster that streams the logs to the appropriate workspace using our generic logs endpoint. The user could optionally deploy this, or perhaps it is enabled/disabled via the helm chart.
The tricky part is that many of these errors occur during the "provisioning" phase, not the "startup" phase when we typically show startup logs.
The text was updated successfully, but these errors were encountered: