当前位置: 首页 > 工具软件 > API-requestor > 使用案例 >

k8s安装过程中出现api-service启动失败

林星华
2023-12-01

失败原因查看

cat /var/log/messages|grep kube-apiserver|grep -i error
Jun 22 20:11:53 localhost kube-apiserver: E0622 20:11:53.535079    4461 cacher.go:260] unexpected ListAndWatch error: pkg/storage/cacher.go:201: Failed to list *api.Service: client: etcd cluster is unavailable or misconfigured; error #0: http: no Host in request URL
Jun 22 20:11:53 localhost kube-apiserver: E0622 20:11:53.567959    4461 cacher.go:260] unexpected ListAndWatch error: pkg/storage/cacher.go:201: Failed to list *storage.StorageClass: client: etcd cluster is unavailable or misconfigured; error #0: http: no Host in request URL
Jun 22 20:11:53 localhost kube-apiserver: E0622 20:11:53.568024    4461 cacher.go:260] unexpected ListAndWatch error: pkg/storage/cacher.go:201: Failed to list *apps.StatefulSet: client: etcd cluster is unavailable or misconfigured; error #0: http: no Host in request URL
Jun 22 20:11:53 localhost kube-apiserver: E0622 20:11:53.568178    4461 cacher.go:260] unexpected ListAndWatch error: pkg/storage/cacher.go:201: Failed to list *autoscaling.HorizontalPodAutoscaler: client: etcd cluster is unavailable or misconfigured; error #0: http: no Host in request URL
Jun 22 20:11:53 localhost kube-apiserver: E0622 20:11:53.568241    4461 cacher.go:260] unexpected ListAndWatch error: pkg/storage/cacher.go:201: Failed to list *batch.Job: client: etcd cluster is unavailable or misconfigured; error #0: http: no Host in request URL
Jun 22 20:11:53 localhost kube-apiserver: E0622 20:11:53.568308    4461 cacher.go:260] unexpected ListAndWatch error: pkg/storage/cacher.go:201: Failed to list *certificates.CertificateSigningRequest: client: etcd cluster is unavailable or misconfigured; error #0: http: no Host in request URL
Jun 22 20:11:53 localhost kube-apiserver: E0622 20:11:53.568377    4461 cacher.go:260] unexpected ListAndWatch error: pkg/storage/cacher.go:201: Failed to list *autoscaling.HorizontalPodAutoscaler: client: etcd cluster is unavailable or misconfigured; error #0: http: no Host in request URL
Jun 22 20:11:53 localhost kube-apiserver: E0622 20:11:53.568457    4461 cacher.go:260] unexpected ListAndWatch error: pkg/storage/cacher.go:201: Failed to list *api.ReplicationController: client: etcd cluster is unavailable or misconfigured; error #0: http: no Host in request URL
Jun 22 20:11:53 localhost kube-apiserver: E0622 20:11:53.568522    4461 cacher.go:260] unexpected ListAndWatch error: pkg/storage/cacher.go:201: Failed to list *extensions.DaemonSet: client: etcd cluster is unavailable or misconfigured; error #0: http: no Host in request URL
Jun 22 20:11:53 localhost kube-apiserver: E0622 20:11:53.568572    4461 cacher.go:260] unexpected ListAndWatch error: pkg/storage/cacher.go:201: Failed to list *extensions.Deployment: client: etcd cluster is unavailable or misconfigured; error #0: http: no Host in request URL
Jun 22 20:11:53 localhost kube-apiserver: E0622 20:11:53.568603    4461 cacher.go:260] unexpected ListAndWatch error: pkg/storage/cacher.go:201: Failed to list *batch.Job: client: etcd cluster is unavailable or misconfigured; error #0: http: no Host in request URL
Jun 22 20:11:53 localhost kube-apiserver: E0622 20:11:53.568651    4461 cacher.go:260] unexpected ListAndWatch error: pkg/storage/cacher.go:201: Failed to list *extensions.Ingress: client: etcd cluster is unavailable or misconfigured; error #0: http: no Host in request URL
Jun 22 20:11:53 localhost kube-apiserver: E0622 20:11:53.568694    4461 cacher.go:260] unexpected ListAndWatch error: pkg/storage/cacher.go:201: Failed to list *extensions.ReplicaSet: client: etcd cluster is unavailable or misconfigured; error #0: http: no Host in request URL
Jun 22 20:11:53 localhost kube-apiserver: E0622 20:11:53.568740    4461 cacher.go:260] unexpected ListAndWatch error: pkg/storage/cacher.go:201: Failed to list *extensions.NetworkPolicy: client: etcd cluster is unavailable or misconfigured; error #0: http: no Host in request URL
Jun 22 20:11:53 localhost kube-apiserver: E0622 20:11:53.568841    4461 cacher.go:260] unexpected ListAndWatch error: pkg/storage/cacher.go:201: Failed to list *policy.PodDisruptionBudget: client: etcd cluster is unavailable or misconfigured; error #0: http: no Host in request URL
Jun 22 20:11:53 localhost kube-apiserver: E0622 20:11:53.568893    4461 cacher.go:260] unexpected ListAndWatch error: pkg/storage/cacher.go:201: Failed to list *rbac.Role: client: etcd cluster is unavailable or misconfigured; error #0: http: no Host in request URL
Jun 22 20:11:53 localhost kube-apiserver: E0622 20:11:53.568925    4461 cacher.go:260] unexpected ListAndWatch error: pkg/storage/cacher.go:201: Failed to list *rbac.Role: client: etcd cluster is unavailable or misconfigured; error #0: http: no Host in request URL
Jun 22 20:11:53 localhost kube-apiserver: E0622 20:11:53.568977    4461 cacher.go:260] unexpected ListAndWatch error: pkg/storage/cacher.go:201: Failed to list *rbac.RoleBinding: client: etcd cluster is unavailable or misconfigured; error #0: http: no Host in request URL
Jun 22 20:11:53 localhost kube-apiserver: E0622 20:11:53.569026    4461 cacher.go:260] unexpected ListAndWatch error: pkg/storage/cacher.go:201: Failed to list *rbac.ClusterRole: client: etcd cluster is unavailable or misconfigured; error #0: http: no Host in request URL
Jun 22 20:11:53 localhost kube-apiserver: E0622 20:11:53.569139    4461 cacher.go:260] unexpected ListAndWatch error: pkg/storage/cacher.go:201: Failed to list *rbac.ClusterRoleBinding: client: etcd cluster is unavailable or misconfigured; error #0: http: no Host in request URL
Jun 22 20:11:53 localhost kube-apiserver: E0622 20:11:53.569177    4461 cacher.go:260] unexpected ListAndWatch error: pkg/storage/cacher.go:201: Failed to list *rbac.RoleBinding: client: etcd cluster is unavailable or misconfigured; error #0: http: no Host in request URL
Jun 22 20:11:53 localhost kube-apiserver: E0622 20:11:53.569216    4461 cacher.go:260] unexpected ListAndWatch error: pkg/storage/cacher.go:201: Failed to list *rbac.ClusterRole: client: etcd cluster is unavailable or misconfigured; error #0: http: no Host in request URL
Jun 22 20:11:53 localhost kube-apiserver: E0622 20:11:53.569254    4461 cacher.go:260] unexpected ListAndWatch error: pkg/storage/cacher.go:201: Failed to list *rbac.ClusterRoleBinding: client: etcd cluster is unavailable or misconfigured; error #0: http: no Host in request URL
Jun 22 20:11:53 localhost kube-apiserver: F0622 20:11:53.639859    4461 controller.go:128] Unable to perform initial IP allocation check: unable to refresh the service IP block: client: etcd cluster is unavailable or misconfigured; error #0: http: no Host in request URL
Jun 22 20:11:53 localhost kube-apiserver: E0622 20:11:53.961183    4474 cacher.go:260] unexpected ListAndWatch error: pkg/storage/cacher.go:201: Failed to list *api.ReplicationController: client: etcd cluster is unavailable or misconfigured; error #0: http: no Host in request URL
Jun 22 20:11:53 localhost kube-apiserver: E0622 20:11:53.962516    4474 cacher.go:260] unexpected ListAndWatch error: pkg/storage/cacher.go:201: Failed to list *api.PodTemplate: client: etcd cluster is unavailable or misconfigured; error #0: http: no Host in request URL
Jun 22 20:11:53 localhost kube-apiserver: E0622 20:11:53.962694    4474 cacher.go:260] unexpected ListAndWatch error: pkg/storage/cacher.go:201: Failed to list *api.LimitRange: client: etcd cluster is unavailable or misconfigured; error #0: http: no Host in request URL
Jun 22 20:11:53 localhost kube-apiserver: E0622 20:11:53.962761    4474 cacher.go:260] unexpected ListAndWatch error: pkg/storage/cacher.go:201: Failed to list *api.ResourceQuota: client: etcd cluster is unavailable or misconfigured; error #0: http: no Host in request URL
Jun 22 20:11:53 localhost kube-apiserver: E0622 20:11:53.962839    4474 cacher.go:260] unexpected ListAndWatch error: pkg/storage/cacher.go:201: Failed to list *api.Secret: client: etcd cluster is unavailable or misconfigured; error #0: http: no Host in request URL
Jun 22 20:11:53 localhost kube-apiserver: E0622 20:11:53.962912    4474 cacher.go:260] unexpected ListAndWatch error: pkg/storage/cacher.go:201: Failed to list *api.ServiceAccount: client: etcd cluster is unavailable or misconfigured; error #0: http: no Host in request URL
Jun 22 20:11:53 localhost kube-apiserver: E0622 20:11:53.962963    4474 cacher.go:260] unexpected ListAndWatch error: pkg/storage/cacher.go:201: Failed to list *api.PersistentVolume: client: etcd cluster is unavailable or misconfigured; error #0: http: no Host in request URL
Jun 22 20:11:53 localhost kube-apiserver: E0622 20:11:53.963014    4474 cacher.go:260] unexpected ListAndWatch error: pkg/storage/cacher.go:201: Failed to list *api.PersistentVolumeClaim: client: etcd cluster is unavailable or misconfigured; error #0: http: no Host in request URL
Jun 22 20:11:53 localhost kube-apiserver: E0622 20:11:53.963069    4474 cacher.go:260] unexpected ListAndWatch error: pkg/storage/cacher.go:201: Failed to list *api.ConfigMap: client: etcd cluster is unavailable or misconfigured; error #0: http: no Host in request URL
Jun 22 20:11:53 localhost kube-apiserver: E0622 20:11:53.963126    4474 cacher.go:260] unexpected ListAndWatch error: pkg/storage/cacher.go:201: Failed to list *api.Namespace: client: etcd cluster is unavailable or misconfigured; error #0: http: no Host in request URL
Jun 22 20:11:53 localhost kube-apiserver: E0622 20:11:53.963178    4474 cacher.go:260] unexpected ListAndWatch error: pkg/storage/cacher.go:201: Failed to list *api.Endpoints: client: etcd cluster is unavailable or misconfigured; error #0: http: no Host in request URL
Jun 22 20:11:53 localhost kube-apiserver: E0622 20:11:53.963215    4474 cacher.go:260] unexpected ListAndWatch error: pkg/storage/cacher.go:201: Failed to list *api.Node: client: etcd cluster is unavailable or misconfigured; error #0: http: no Host in request URL
Jun 22 20:11:53 localhost kube-apiserver: E0622 20:11:53.963254    4474 cacher.go:260] unexpected ListAndWatch error: pkg/storage/cacher.go:201: Failed to list *api.SecurityContextConstraints: client: etcd cluster is unavailable or misconfigured; error #0: http: no Host in request URL
Jun 22 20:11:53 localhost kube-apiserver: E0622 20:11:53.963301    4474 cacher.go:260] unexpected ListAndWatch error: pkg/storage/cacher.go:201: Failed to list *api.Pod: client: etcd cluster is unavailable or misconfigured; error #0: http: no Host in request URL
Jun 22 20:11:53 localhost kube-apiserver: E0622 20:11:53.963353    4474 cacher.go:260] unexpected ListAndWatch error: pkg/storage/cacher.go:201: Failed to list *api.Service: client: etcd cluster is unavailable or misconfigured; error #0: http: no Host in request URL
Jun 22 20:11:53 localhost kube-apiserver: E0622 20:11:53.981891    4474 cacher.go:260] unexpected ListAndWatch error: pkg/storage/cacher.go:201: Failed to list *extensions.ReplicaSet: client: etcd cluster is unavailable or misconfigured; error #0: http: no Host in request URL
Jun 22 20:11:53 localhost kube-apiserver: E0622 20:11:53.981957    4474 cacher.go:260] unexpected ListAndWatch error: pkg/storage/cacher.go:201: Failed to list *apps.StatefulSet: client: etcd cluster is unavailable or misconfigured; error #0: http: no Host in request URL

很显然是api-service和etcd通信失败

查看 /etc/kubernetes/kube-apiserver 配置文件中 有个笔误

#KUBE_ETCD_SERVERS="--etcd-servers=http:///127.0.0.1:2379" 《=笔误
KUBE_ETCD_SERVERS="--etcd-servers=http://127.0.0.1:2379"

 

 类似资料: