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

Improve debug output for K8s tests when the pod fails to start #5171

Closed
rdner opened this issue Jul 18, 2024 · 2 comments · Fixed by #5176
Closed

Improve debug output for K8s tests when the pod fails to start #5171

rdner opened this issue Jul 18, 2024 · 2 comments · Fixed by #5176
Assignees
Labels

Comments

@rdner
Copy link
Member

rdner commented Jul 18, 2024

Describe the enhancement:

When a pod fails to start we need to request the most recent logs the pod had before dying.

That would be an equivalent of:

kubectl logs --previous -f --namespace=kube-system $(kubectl get pods --all-namespaces --output=json | jq '.items[].metadata.name' -r | grep elastic-agent)

Describe a specific use case for the enhancement or feature:

Sometimes changes in a Dockerfile lead to a broken entry point for the container, in this case we need to catch the errors of the entry point.

What is the definition of done?

When the container/pod crashes or fails to start we should have an output of the most recent logs as a result of the failed K8s test.

@rdner rdner added Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team Team:Elastic-Agent Label for the Agent team Testing labels Jul 18, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent (Team:Elastic-Agent)

@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

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

Successfully merging a pull request may close this issue.

3 participants