jetstack / kube-lego

DEPRECATED: Automatically request certificates for Kubernetes Ingress resources from Let's Encrypt
Apache License 2.0
2.16k stars 267 forks source link

Pod not starting #237

Closed jbwinters closed 7 years ago

jbwinters commented 7 years ago

Hi folks, I’m having issues getting kube-lego running. I followed the steps for a GCE deployment here (using the exact config files referenced): https://github.com/jetstack/kube-lego/blob/master/examples/gce/README.md

But the container fails to start:

Back-off restarting failed container
Error syncing pod, skipping: failed to "StartContainer" for "kube-lego" with CrashLoopBackOff: "Back-off 5m0s restarting failed container=kube-lego pod=kube-lego-3839924375-70s7c_kube-lego(20372da4-7949-11e7-9fc1-42010a8002e9)"

Container logs:

2017-08-04T21:32:18.716267204Z time="2017-08-04T21:32:18Z" level=info msg="kube-lego 0.1.5-a9592932 starting" context=kubelego 
2017-08-04T21:32:18.716485387Z time="2017-08-04T21:32:18Z" level=info msg="connecting to kubernetes api: https://10.11.240.1:80" context=kubelego 
2017-08-04T21:32:48.717378173Z time="2017-08-04T21:32:48Z" level=fatal msg="Get https://10.11.240.1:80/version: dial tcp 10.11.240.1:80: i/o timeout" context=kubelego 

Standard GKE setup, don’t think I’ve modified anything important... My Ingress works properly. Seems like a strange error and I haven’t found anything online about it…. Can anyone here point me in the right direction?

jbwinters commented 7 years ago

Solved by upgrading kubernetes from 1.6.4 to 1.7.2.

keslerm commented 7 years ago

I'm seeing this with a freshly deployed 1.7.3 cluster via kubeadm using flannel networking

time="2017-08-06T15:46:35Z" level=info msg="kube-lego 0.1.5-a9592932 starting" context=kubelego
time="2017-08-06T15:46:35Z" level=info msg="connecting to kubernetes api: https://10.96.0.1:443" context=kubelego
time="2017-08-06T15:47:05Z" level=fatal msg="Get https://10.96.0.1:443/version: dial tcp 10.96.0.1:443: i/o timeout" context=kubelego
keslerm commented 7 years ago

Solved from here here

This is not a kube-lego issue, but this this is how to fix it:

1.First,we should make sure the ip-forward enabled on the linux kernel of every node.Just execute command:
sysctl net.ipv4.conf.all.forwarding = 1

2.Secondly,if your docker's version >=1.13,the default FORWARD chain policy was DROP,you should set default policy of the FORWARD chain to ACCEPT:$ sudo iptables -P FORWARD ACCEPT.