As titled.
When I run kubectl logs my-go-app-deployment-1967699436-yxxn7
or kubectl logs my-go-app-deployment-1967699436-yxxn7 -p
, there are no error log print out at all.
What should I do? What makes a Golang pods crashes?
First you should inspect the pod to see the reason why it died and if it was restarted.
kubectl describe pod my-go-app-deployment-1967699436-yxxn7
Look for entries in Containers -> your container -> Last State.
If it was restarted you might want to check the previous logs as well:
kubectl logs --previous pod my-go-app-deployment-1967699436-yxxn7