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
• 18,570 points
918 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
• 52,360 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, 2019 in Kubernetes by Sirajul
• 59,230 points
1,341 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 Jul 19, 2019 in Kubernetes by Sirajul
• 59,230 points
1,689 views
0 votes
2 answers

Using a local image to create a pod in K8s

I'm not sure but you can try ...READ MORE

answered Apr 29, 2019 in Kubernetes by Vishaka
19,277 views
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
• 52,360 points
2,025 views
+1 vote
1 answer
0 votes
3 answers

Error while joining cluster with node

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

answered Jan 17, 2019 in Others by anonymous
14,525 views
+4 votes
1 answer

Installing Web UI (Dashboard):kubernetes-dashboard on main Ubuntu 16.04.6 LTS (Xenial Xerus) server

Follow these steps: $ kubeadm reset $ kubeadm init ...READ MORE

answered Apr 12, 2019 in Kubernetes by Kalgi
• 52,360 points

reshown Apr 12, 2019 by Kalgi 5,978 views
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
• 52,360 points
3,479 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
• 52,360 points
1,156 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP