Hello, @Lyndon !
What logs or tools can I use to help troubleshoot a Kubernetes deployment using DevOps and AKS?
This may end up being more of a Kubernetes question than an AKS or DevOps question but there are some things that we can try. If the pods are failing only sometimes and in these cases startup is ultimately successful when deleted and recreated by Kubernetes, then there is likely an issue with whatever is controlling the pods.
The object controlling the pod(s) (maybe a replicaset, daemonset, deployment, etc.) may have some Events that can help determine the status of the object doing the controlling using the following (assuming it is a deployment). If there is nothing there, the pod could be described for any Events.
kubectl describe deployment DEPLOYMENTNAME -n NAMESPACE
Looking further inside the Kubernetes level, kubectl get events -o wide
may give some info on what is happening. Adding a -w
for a watch would allow you to see any new events as they stream in as well.
I hope this has been helpful! Your feedback is important so please take a moment to accept answers.
If you still have questions, please let us know what is needed in the comments so the question can be answered. Thank you for helping to improve Microsoft Q&A!