Reputation: 4792
I am trying to use kubelet to start kubernetes api server as a staic pod, but failed with following errors:
I0523 11:13:41.192680 9248 remote_runtime.go:41] Connecting to runtime service /var/run/dockershim.sock
I0523 11:13:41.196764 9248 kuberuntime_manager.go:171] Container runtime docker initialized, version: 1.12.3, apiVersion: 1.24.0
E0523 11:13:41.199242 9248 kubelet.go:1165] Image garbage collection failed: unable to find data for container /
E0523 11:13:41.199405 9248 event.go:208] Unable to write event: 'Post https://127.0.0.1:8443/api/v1/namespaces/default/events: dial tcp 127.0.0.1:8443: getsockopt: connection refused' (may retry after sleeping)
I0523 11:13:41.199529 9248 server.go:869] Started kubelet v1.6.4
I0523 11:13:41.199711 9248 server.go:127] Starting to listen on 0.0.0.0:10250
I0523 11:13:41.200017 9248 kubelet_node_status.go:230] Setting node annotation to enable volume controller attach/detach
I0523 11:13:41.203018 9248 server.go:294] Adding debug handlers to kubelet server.
E0523 11:13:41.207486 9248 kubelet.go:1661] Failed to check if disk space is available for the runtime: failed to get fs info for "runtime": unable to find data for container /
E0523 11:13:41.207554 9248 kubelet.go:1669] Failed to check if disk space is available on the root partition: failed to get fs info for "root": unable to find data for container /
E0523 11:13:41.214231 9248 kubelet.go:1246] Failed to start ContainerManager failed to initialise top level QOS containers: root container /kubepods doesn't exist
The full log is here: https://travis-ci.org/reachlin/k8s0/jobs/235187507
This is the api server deployment yml: https://github.com/reachlin/k8s0/blob/master/roles/k8s/templates/apiserver.yml.j2
Later, I found the error actually matters is:
Failed to start ContainerManager failed to initialise top level QOS containers: root container /kubepods doesn't exist
Upvotes: 4
Views: 8235
Reputation: 4792
after some research, i found the solution here: https://github.com/kubernetes/kubernetes/issues/43704
by adding these two parameters to kubelet:
--cgroups-per-qos=false
--enforce-node-allocatable=""
Upvotes: 6