Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add flannel error #57

Closed
wyfligamo opened this issue Feb 1, 2018 · 7 comments
Closed

Add flannel error #57

wyfligamo opened this issue Feb 1, 2018 · 7 comments

Comments

@wyfligamo
Copy link

quickstart version: beta-kubernetes:0.4.0-1.9.0-beta
dcos version: 1.10.4

I installed kubernetes with web ui,it seems every service in dcos thing is going on and I can get three Ready nodes

[root@localhost ~]# kubectl get nodes
NAME                                   STATUS    ROLES     AGE       VERSION
kube-node-0-kubelet.kubernetes.mesos   Ready         23h       v1.9.0
kube-node-1-kubelet.kubernetes.mesos   Ready         23h       v1.9.0
kube-node-2-kubelet.kubernetes.mesos   Ready         23h       v1.9.0

Then I try to add flannel to cluster, but get an error

[root@localhost ~]# kubectl get pods --namespace=kube-system
NAME                        READY     STATUS             RESTARTS   AGE
heapster-7d7b7f4f87-j4j4j   1/1       Running            0          23h
kube-dns-6dc79b7c4-kgmc2    2/3       CrashLoopBackOff   555        23h
kube-flannel-ds-9mkw4       0/1       CrashLoopBackOff   4          2m
kube-flannel-ds-s7w6h       0/1       CrashLoopBackOff   4          2m
kube-flannel-ds-xncpc       0/1       CrashLoopBackOff   4          2m

Logs look like this

[root@localhost ~]# kubectl logs --namespace=kube-system kube-flannel-ds-9mkw4 
I0201 02:24:56.214697       1 main.go:474] Determining IP address of default interface
I0201 02:24:56.218057       1 main.go:487] Using interface with name eth0 and address 10.100.100.15
I0201 02:24:56.218141       1 main.go:504] Defaulting external address to interface address (10.100.100.15)
I0201 02:24:56.277590       1 kube.go:130] Waiting 10m0s for node controller to sync
I0201 02:24:56.277757       1 kube.go:283] Starting kube subnet manager
I0201 02:24:57.277999       1 kube.go:137] Node controller sync successful
I0201 02:24:57.278089       1 main.go:234] Created subnet manager: Kubernetes Subnet Manager - kube-node-1-kubelet.kubernetes.mesos
I0201 02:24:57.278107       1 main.go:237] Installing signal handlers
I0201 02:24:57.278338       1 main.go:352] Found network config - Backend type: vxlan
I0201 02:24:57.278490       1 vxlan.go:119] VXLAN config: VNI=1 Port=0 GBP=false DirectRouting=false
E0201 02:24:57.279419       1 main.go:279] Error registering network: failed to acquire lease: node "kube-node-1-kubelet.kubernetes.mesos" pod cidr not assigned
I0201 02:24:57.279476       1 main.go:332] Stopping shutdownHandler...

How can I fix this?

@hectorj2f
Copy link

@wyflimago Why do you need to install flannel ?

@pires
Copy link
Contributor

pires commented Feb 1, 2018

Hi @wyfligamo! Currently, we support only the DC/OS overlay. We have been trying some other overlay networks, like Calico, but it will need more work, and so we'll leave it to post-GA.

Adding some more details, in this particular case, the error is:

E0201 02:24:57.279419 1 main.go:279] Error registering network: failed to acquire lease: node "kube-node-1-kubelet.kubernetes.mesos" pod cidr not assigned
This happens because we do not enable the --allocate-node-cidrs flag for the kube-controller-manager.

@pires
Copy link
Contributor

pires commented Feb 1, 2018

@wyfligamo feel free to comment but I'm going to close this as it's no bug. Thank you for reporting.

@pires pires closed this as completed Feb 1, 2018
@wyfligamo
Copy link
Author

@hectorj2f my kube-dns pod status is CrashLoopBackOff and kubedns container log says

E0202 01:21:34.174837       1 reflector.go:201] k8s.io/dns/pkg/dns/dns.go:147: Failed to list *v1.Endpoints: Get https://10.100.0.1:443/api/v1/endpoints?resourceVersion=0: dial tcp 10.100.0.1:443: i/o timeout
E0202 01:21:34.175333       1 reflector.go:201] k8s.io/dns/pkg/dns/dns.go:150: Failed to list *v1.Service: Get https://10.100.0.1:443/api/v1/services?resourceVersion=0: dial tcp 10.100.0.1:443: i/o timeout

I can't find any other pods except heapster

[root@localhost ~]# kubectl get pods --all-namespaces 
NAMESPACE     NAME                        READY     STATUS             RESTARTS   AGE
kube-system   heapster-7d7b7f4f87-brp2l   1/1       Running            0          21h
kube-system   kube-dns-6dc79b7c4-dbw5g    1/3       CrashLoopBackOff   506        21h

so I wonder if I should add a network plugin like flannel

@wyfligamo
Copy link
Author

@pires I don't understand about DC/OS overlay, is that working as a kubernetes pods or a dcos/k8s service?
My k8s only start kube-dns and heapster pods, is that right? they can't communicate with api service, but I can get api response with browser outside the cluster

[root@localhost ~]# kubectl logs --namespace=kube-system heapster-7d7b7f4f87-brp2l
E0202 05:26:09.524966       1 reflector.go:190] k8s.io/heapster/metrics/heapster.go:322: Failed to list *v1.Pod: Get https://kubernetes.default/api/v1/pods?resourceVersion=0: dial tcp: i/o timeout
[root@localhost ~]# kubectl logs --namespace=kube-system kube-dns-6dc79b7c4-dbw5g kubedns
E0202 05:23:47.244936       1 reflector.go:201] k8s.io/dns/pkg/dns/dns.go:150: Failed to list *v1.Service: Get https://10.100.0.1:443/api/v1/services?resourceVersion=0: dial tcp 10.100.0.1:443: i/o timeout
E0202 05:23:47.244981       1 reflector.go:201] k8s.io/dns/pkg/dns/dns.go:147: Failed to list *v1.Endpoints: Get https://10.100.0.1:443/api/v1/endpoints?resourceVersion=0: dial tcp 10.100.0.1:443: i/o timeout
I0202 05:23:47.742922       1 dns.go:173] Waiting for services and endpoints to be initialized from apiserver...
I0202 05:23:48.242824       1 dns.go:173] Waiting for services and endpoints to be initialized from apiserver...
I0202 05:23:48.742850       1 dns.go:173] Waiting for services and endpoints to be initialized from apiserver...
I0202 05:23:49.242879       1 dns.go:173] Waiting for services and endpoints to be initialized from apiserver...

@pires
Copy link
Contributor

pires commented Feb 2, 2018

@pires
Copy link
Contributor

pires commented Feb 2, 2018

Since this issue was initially about running flannel and that has been clarified to the user, I am moving the real issue to a new issue #58. Let's continue there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants