Retry pull image in a kubernetes pod

0 votes

I'm a noob when it comes to kubernetes. I was just experimenting with a few commands, i tried 

 kubectl get pods


NAME                   READY     STATUS             RESTARTS   AGE
mysql-apim-db-1viwg    1/1       Running            1          20h
mysql-govdb-qioee      1/1       Running            1          20h
mysql-userdb-l8q8c     1/1       Running            0          20h
wso2am-default-813fy   0/1       ImagePullBackOff   0          20h

But because of imagePullBackOff i need to retry it.

How do i do that?

Aug 29, 2018 in Kubernetes by lina
• 8,220 points

3 answers to this question.

0 votes

if you're manually trying to restart then use the following command, it deleted and recreates the pod.

kubectl replace --force -f <yml_file_describing_pod>
answered Aug 29, 2018 by Kalgi
• 52,370 points
0 votes

In case of not having the yaml file:

kubectl get pod PODNAME -n NAMESPACE -o yaml | kubectl replace --force -f -
answered Aug 29, 2018 by Nilesh
• 7,040 points
0 votes
If the Pod is part of a Deployment or Service, deleting it will restart the Pod and, potentially, place it onto another kubelet:

$ kubectl delete po $POD_NAME

replace it if it's an individual Pod:

$ kubectl get po -n $namespace $POD_NAME -o yaml | kubectl replace -f -
answered Aug 29, 2018 by Hannah
• 18,570 points

Related Questions In Kubernetes

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
0 votes
1 answer

Running A cronjob in a pod in Kubernetes

Unfortunately, you cannot run the CronJob inside a container ...READ MORE

answered Sep 17, 2018 in Kubernetes by Kalgi
• 52,370 points
+1 vote
1 answer

--image-pull-policy not working in kubernetes

Kubernetes does not automatically update the pods ...READ MORE

answered Dec 6, 2018 in Kubernetes by DareDev
• 6,890 points
+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
+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,370 points

reshown Apr 12, 2019 by Kalgi 3,632 views
0 votes
1 answer

Not able to access kubernetes api from a pod in azure

Follow these steps Add --bind-address= option to the line  Created ...READ MORE

answered Aug 30, 2018 in Kubernetes by Kalgi
• 52,370 points
0 votes
1 answer

image can't be pulled error when I try to pull a docker image - kubernetes

I think the image is being pulled ...READ MORE

answered Sep 4, 2018 in Kubernetes by Kalgi
• 52,370 points