Pod keeps crashing or unhealthy

0 votes
I've created a kube cluster and I'm trying to deploy a simple application on it but my pod keeps crashing or keep getting unhealthy. Is there a way to track the logs and find the reason behind its crashing?
Oct 26, 2018 in Kubernetes by Hannah
• 14,070 points
52 views

1 answer to this question.

0 votes

First, take a look at the logs of the current container:

$ kubectl logs ${POD_NAME} ${CONTAINER_NAME}

If your container has previously crashed, you can access the previous container’s crash log with:

$ kubectl logs --previous ${POD_NAME} ${CONTAINER_NAME}

Alternately, you can run commands inside that container with exec:

$ kubectl exec ${POD_NAME} -c ${CONTAINER_NAME} -- ${CMD} ${ARG1} ${ARG2} ... ${ARGN}
answered Oct 26, 2018 by Kalgi
• 40,460 points

Related Questions In Kubernetes

0 votes
1 answer

How do i tie a service to a pod or a set of pods?

By declaring pods with the label(s) and ...READ MORE

answered Jul 16 in Kubernetes by Sirajul
• 25,420 points
31 views
0 votes
1 answer
0 votes
2 answers
0 votes
1 answer

Pod not sharing directory - Kubernetes volume Hostpath

he issue was on the volume definition, ...READ MORE

answered Aug 28, 2018 in Kubernetes by Kalgi
• 40,460 points
253 views
0 votes
1 answer
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17 in Others by anonymous
2,138 views
+3 votes
1 answer
0 votes
1 answer

Kubernetes error syncing pod

The issue caused by the docker container ...READ MORE

answered Aug 27, 2018 in Kubernetes by Kalgi
• 40,460 points
746 views
0 votes
1 answer

Define pod yaml dynamically-jenkins pipeline Kubernetes

Try using jinja template engine and python ...READ MORE

answered Aug 28, 2018 in Kubernetes by Kalgi
• 40,460 points
158 views