install k8s apiserver: Unable to create storage backend: config context deadline exceeded


配置启动apiserver时,提示以下异常:
Nov 21 07:03:44 kube-node1 systemd[1]: Starting Kubernetes API Service...
Nov 21 07:03:44 kube-node1 kube-apiserver[10482]: I1121 07:03:44.565110   10482 server.go:681] external host was not specified, using 172.16.10.70
Nov 21 07:03:44 kube-node1 kube-apiserver[10482]: W1121 07:03:44.565148   10482 authentication.go:383] AnonymousAuth is not allowed with the AlwaysAllow authorizer. Resetting AnonymousAuth to false. You should use a different authorizer
Nov 21 07:03:44 kube-node1 kube-apiserver[10482]: I1121 07:03:44.565377   10482 server.go:152] Version: v1.12.2
Nov 21 07:03:45 kube-node1 kube-apiserver[10482]: I1121 07:03:45.131611   10482 plugins.go:158] Loaded 7 mutating admission controller(s) successfully in the following order: NamespaceLifecycle,LimitRanger,ServiceAccount,Priority,DefaultTolerationSeconds,DefaultStorageClass,MutatingAdmissionWebhook.
Nov 21 07:03:45 kube-node1 kube-apiserver[10482]: I1121 07:03:45.131628   10482 plugins.go:161] Loaded 6 validating admission controller(s) successfully in the following order: LimitRanger,ServiceAccount,Priority,PersistentVolumeClaimResize,ValidatingAdmissionWebhook,ResourceQuota.
Nov 21 07:03:45 kube-node1 kube-apiserver[10482]: I1121 07:03:45.132031   10482 plugins.go:158] Loaded 7 mutating admission controller(s) successfully in the following order: NamespaceLifecycle,LimitRanger,ServiceAccount,Priority,DefaultTolerationSeconds,DefaultStorageClass,MutatingAdmissionWebhook.
Nov 21 07:03:45 kube-node1 kube-apiserver[10482]: I1121 07:03:45.132039   10482 plugins.go:161] Loaded 6 validating admission controller(s) successfully in the following order: LimitRanger,ServiceAccount,Priority,PersistentVolumeClaimResize,ValidatingAdmissionWebhook,ResourceQuota.
Nov 21 07:03:48 kube-node1 polkitd[651]: Registered Authentication Agent for unix-process:10491:2336228 (system bus name :1.209 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8)
Nov 21 07:04:05 kube-node1 kube-apiserver[10482]: F1121 07:04:05.134489   10482 storage_decorator.go:57] Unable to create storage backend: config (&{ /registry [https://172.16.10.70:2379 https://172.16.10.197:2379 https://172.16.10.198:2379]    true true 1000 0xc42004a090 <nil> 5m0s 1m0s}), err (context deadline exceeded)
Nov 21 07:04:05 kube-node1 systemd[1]: kube-apiserver.service: main process exited, code=exited, status=255/n/a
Nov 21 07:04:05 kube-node1 systemd[1]: Stopped Kubernetes API Service.
Nov 21 07:04:05 kube-node1 systemd[1]: Unit kube-apiserver.service entered failed state.
Nov 21 07:04:05 kube-node1 systemd[1]: kube-apiserver.service failed.


下面就是我的配置信息了:

[root@kube-node1 ~]# etcdctl \
--ca-file=/etc/kubernetes/ssl/etcd-ca.pem \
--cert-file=/etc/kubernetes/ssl/etcd.pem \
--key-file=/etc/kubernetes/ssl/etcd-key.pem --version
etcdctl version: 3.2.24
API version: 2

[root@kube-node1 ~]# cat /etc/kubernetes/config
KUBE_LOGTOSTDERR="--logtostderr=true"
KUBE_LOG_LEVEL="--v=0"
KUBE_ALLOW_PRIV="--allow-privileged=true"
KUBE_MASTER="--master=http://172.16.10.70:8080"

[root@kube-node1 ~]# cat /etc/kubernetes/apiserver
KUBE_API_ADDRESS="--advertise-address=172.16.10.70 --bind-address=172.16.10.70"
KUBE_ETCD_SERVERS="--etcd-servers=https://172.16.10.70:2379,https://172.16.10.197:2379,https://172.16.10.198:2379"
KUBE_SERVICE_ADDRESSES="--service-cluster-ip-range=10.254.0.0/16"
KUBE_ADMISSION_CONTROL="--enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota"
KUBE_APISERVER_ARGS="--allow-privileged=true --authorization-mode=Node,RBAC --anonymous-auth=false --kubelet-https=true --storage-backend=etcd3 --enable-bootstrap-token-auth=true --token-auth-file=/etc/kubernetes/token.csv --service-node-port-range=30000-32767 --tls-cert-file=/etc/kubernetes/ssl/kubernetes.pem --tls-private-key-file=/etc/kubernetes/ssl/kubernetes-key.pem --client-ca-file=/etc/kubernetes/ssl/ca.pem --service-account-key-file=/etc/kubernetes/ssl/ca-key.pem --etcd-cafile=/etc/kubernetes/ssl/etcd-ca.pem --etcd-certfile=/etc/kubernetes/ssl/etcd.pem --etcd-keyfile=/etc/kubernetes/ssl/etcd-key.pem --enable-swagger-ui=true --secure-port=6443 --kubelet-client-certificate=/etc/kubernetes/ssl/admin.pem --kubelet-client-key=/etc/kubernetes/ssl/admin-key.pem"

我部署的是 1.12.2 版本。
请各路大神不吝赐教。
已邀请:

要回复问题请先登录注册