Skip to content
This repository has been archived by the owner on Jul 28, 2019. It is now read-only.

kubelet never comes up on GCE with latest Kubernetes #82

Closed
leblancd opened this issue Feb 16, 2018 · 3 comments
Closed

kubelet never comes up on GCE with latest Kubernetes #82

leblancd opened this issue Feb 16, 2018 · 3 comments

Comments

@leblancd
Copy link
Contributor

leblancd commented Feb 16, 2018

When I run the gce-setup.sh script on the latest Kubernetes master, I see this error:

W0215 20:40:49.242] [init] Waiting for the kubelet to boot up the control plane as Static Pods from directory "/etc/kubernetes/manifests".
W0215 20:40:49.243] [init] This might take a minute or longer if the control plane images have to be pulled.
W0215 20:41:29.243] [kubelet-check] It seems like the kubelet isn't running or healthy.
W0215 20:41:29.243] [kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10255/healthz' failed with error: Get http://localhost:10255/healthz: dial tcp [::1]:10255: getsockopt: connection refused.

When I look at the kubelet journalctl log, I see this error:

Feb 16 01:29:27 kube-master hyperkube[2517]: F0216 01:29:27.361449    2517 server.go:142] unknown flag: --require-kubeconfig

The cause of this error seems to be this commit in kubernetes/kubernetes, which eliminated the deprecated "--require-kubeconfig" flag from kubelet configuration:
kubernetes/kubernetes#58367

Seems to me that this setting in k-d-c/image/kubelet.service needs this change for latest Kubernetes (although this would need to be a kubernetes-version-dependent change):

-Environment="KUBELET_KUBECONFIG_ARGS=--kubeconfig=/etc/kubernetes/kubelet.conf --require-kubeconfig=true"
+Environment="KUBELET_KUBECONFIG_ARGS=--kubeconfig=/etc/kubernetes/kubelet.conf"

One quick workaround is to back up to the version of Kubernetes right before the commit of k8s PR #58367, e.g.:

cd $GOPATH/src/k8s.io/kubernetes
git checkout ee062f9
@leblancd
Copy link
Contributor Author

@ivan4th - Any thoughts on how hard this would be to fix? Is there a way to add version dependent kubelet config arguments?

@ivan4th
Copy link
Contributor

ivan4th commented Feb 20, 2018

Hi, there's a way to add k8s version-specific parts to wrapkubeadm script, I think I'll be able to implement that tomorrow. Sorry for the delay.

@fturib
Copy link
Contributor

fturib commented Mar 6, 2018

Looks like we also need to have this flag '--fail-swap-on=false' as the defaut value of this flag has changed on Jan 2nd. Formery, the default falue was 'false', it is now 'true'.

Environment="KUBELET_KUBECONFIG_ARGS=--kubeconfig=/etc/kubernetes/kubelet.conf --fail-swap-on=false"

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

No branches or pull requests

3 participants