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,080 points
46 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
• 37,320 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 3 days ago in Kubernetes by Sirajul
• 5,960 points
12 views
0 votes
1 answer

What is Ingress ? Is it something that runs as a pod or on a pod?

An ingress is an object that holds ...READ MORE

answered 21 hours ago in Kubernetes by Sirajul
• 5,960 points
4 views
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
• 37,320 points
193 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
1,135 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
• 37,320 points
573 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
• 37,320 points
127 views