kubeadm init [panic:在nil映射中为条目分配]

时间:2018-12-14 16:33:02

标签: docker kubernetes containers kubeadm

当我尝试使用时,我想设置k8s群集:

kubeadm init --kubernetes-version=v1.11.4 --pod-network-cidr=10.244.0.0/16 --service-cidr=10.96.0.0/12 --apiserver-advertise-address=192.168.178.101 --ignore-preflight-errors=all

Issue screen

发生恐慌:


[etcd] Wrote Static Pod manifest for a local etcd instance to "/etc/kubernetes/manifests/etcd.yaml"
[init] waiting for the kubelet to boot up the control plane as Static Pods from directory "/etc/kubernetes/manifests" 
[init] this might take a minute or longer if the control plane images have to be pulled
[apiclient] All control plane components are healthy after 39.506743 seconds
[uploadconfig] storing the configuration used in ConfigMap "kubeadm-config" in the "kube-system" Namespace
[kubelet] Creating a ConfigMap "kubelet-config-1.11" in namespace kube-system with the configuration for the kubelets in the cluster
[markmaster] Marking the node kube-node as master by adding the label "node-role.kubernetes.io/master=''"
[markmaster] Marking the node kube-node as master by adding the taints [node-role.kubernetes.io/master:NoSchedule]
[patchnode] Uploading the CRI Socket information "/var/run/dockershim.sock" to the Node API object "kube-node" as an annotation
panic: assignment to entry in nil map
goroutine 1 [running]:
k8s.io/kubernetes/cmd/kubeadm/app/phases/patchnode.annotateNodeWithCRISocket(...)
        /workspace/anago-v1.11.3-beta.0.71+a4529464e4629c/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/cmd/kubeadm/app/phases/patchnode/patchnode.go:39
k8s.io/kubernetes/cmd/kubeadm/app/phases/patchnode.AnnotateCRISocket.func1(0xc4208a22c0)
        /workspace/anago-v1.11.3-beta.0.71+a4529464e4629c/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/cmd/kubeadm/app/phases/patchnode/patchnode.go:34 +0x69
k8s.io/kubernetes/cmd/kubeadm/app/util/apiclient.PatchNode.func1(0xc420638ea0, 0xc4209695af, 0xc42046a101)
        /workspace/anago-v1.11.3-beta.0.71+a4529464e4629c/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/cmd/kubeadm/app/util/apiclient/idempotency.go:218 +0x1b1
k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/wait.WaitFor(0xc420295780, 0xc420668ba0, 0xc420638e40, 0x9034ed, 0x167f000)

我尝试kubeadm重置或重新安装k8s组件,但没有效果。

环境:

  • Centos7
  • Docker 18.09
  • Kubernetes 1.11.4

这是怎么了?请帮忙。

0 个答案:

没有答案