Kubernetes error syncing pod

0 votes

I installed Kubernetes, but in the creation of pod reported an error.

I use centos7, use yum to install Kubernetes.

[root@k8s-master ~]# rpm -qa |grep -i kube
kubernetes-master-1.2.0-0.11.git738b760.el7.x86_64
kubernetes-client-1.2.0-0.11.git738b760.el7.x86_64
[root@k8s-master ~]# kubectl run   my-nginx01 --image=192.168.10.58:5002/test111/nginx  --port=80
deployment "my-nginx01" created
[root@k8s-master ~]# kubectl get pods
NAME                          READY     STATUS              RESTARTS   AGE
my-nginx01-3752101197-v34jm   0/1       ContainerCreating   0          3s
[root@k8s-master ~]# kubectl describe pod my-nginx01-3752101197-v34jm
Events:
  FirstSeen LastSeen    Count   From            SubobjectPath           Type        Reason          Message
  --------- --------    -----   ----            -------------           --------    ------          -------
  22s       22s     1   {default-scheduler }                    Normal      Scheduled       Successfully assigned my-nginx01-3752101197-v34jm to 192.168.6.133
  20s       20s     1   {kubelet 192.168.6.133} spec.containers{my-nginx01} Normal      Started         Started container with docker id 3e18486078c2
  20s       20s     1   {kubelet 192.168.6.133} spec.containers{my-nginx01} Normal      Created         Created container with docker id 3e18486078c2
  21s       17s     2   {kubelet 192.168.6.133} spec.containers{my-nginx01} Normal      Pulling         pulling image "192.168.10.58:5002/test111/nginx"
  20s       16s     2   {kubelet 192.168.6.133} spec.containers{my-nginx01} Normal      Pulled          Successfully pulled image "192.168.10.58:5002/test111/nginx"
  22s       16s     3   {kubelet 192.168.6.133}                 Warning     MissingClusterDNS   kubelet does not have ClusterDNS IP configured and cannot create Pod using "ClusterFirst" policy. Falling back to DNSDefault policy.
  16s       16s     1   {kubelet 192.168.6.133} spec.containers{my-nginx01} Normal      Created         Created container with docker id 0c5c9fdd19ca
  15s       15s     1   {kubelet 192.168.6.133} spec.containers{my-nginx01} Normal      Started         Started container with docker id 0c5c9fdd19ca
  11s       11s     1   {kubelet 192.168.6.133}                 Warning     FailedSync      **Error syncing pod, skipping: failed to "StartContainer" for "my-nginx01" with CrashLoopBackOff: "Back-off 10s restarting failed container=my-nginx01 pod=my-nginx01-3752101197-v34jm_default(b4f373b3-20c3-11e6-81d6-000c294bd99a)"**
  11s   11s 1   {kubelet 192.168.6.133} spec.containers{my-nginx01} Warning BackOff Back-off restarting failed docker container
Aug 27, 2018 in Kubernetes by lina
• 8,100 points
500 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

The issue caused by the docker container which exits as soon as the "start" process finishes. Add a command that runs forever and probably it'll work. For example, recreating docker image:

#Dockerfile
[...]
CMD exec /bin/bash -c "trap : TERM INT; sleep infinity & wait"
answered Aug 27, 2018 by Kalgi
• 36,340 points

Related Questions In Kubernetes

0 votes
1 answer

Error in syncing pod - Kubernetes

You are getting this error because all you're ...READ MORE

answered Jan 4 in Kubernetes by Layla
35 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
• 36,340 points
161 views
0 votes
2 answers

Access Kubernetes api from within a pod container

wget version: KUBE_TOKEN=$(</var/run/secrets/kubernetes.io/serviceaccount/token) wget -vO- ...READ MORE

answered Aug 29, 2018 in Kubernetes by Nilesh
• 6,900 points
166 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
730 views
+3 votes
1 answer
0 votes
1 answer

Error while creating kubernetes dashboard

The installation fails because there is no ...READ MORE

answered Aug 27, 2018 in Kubernetes by Kalgi
• 36,340 points
262 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
• 36,340 points
114 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.