资讯专栏INFORMATION COLUMN

kube-apiserver启动时报错并且不能操作etcd

blastz / 1140人阅读

摘要:启动时报错,错误信息如下此时查看,也没有。经过一些参数的研究,最后发现是版本的问题。修改参数,再启动可以正常使用。

kube-apiserver启动时报错,错误信息如下:

Flag --kubelet-port has been deprecated, kubelet-port is deprecated and will be removed.
W0914 15:57:18.574093   29704 authentication.go:362] AnonymousAuth is not allowed with the AllowAll authorizer.  Resetting AnonymousAuth to false. You should use a different authorizer
E0914 15:57:19.164301   29704 reflector.go:201] k8s.io/kubernetes/pkg/client/informers/informers_generated/internalversion/factory.go:70: Failed to list *api.LimitRange: Get https://localhost:6443/api/v1/limitranges?resourceVersion=0: dial tcp 127.0.0.1:6443: getsockopt: connection refused
E0914 15:57:19.164904   29704 reflector.go:201] k8s.io/kubernetes/pkg/client/informers/informers_generated/internalversion/factory.go:70: Failed to list *api.Namespace: Get https://localhost:6443/api/v1/namespaces?resourceVersion=0: dial tcp 127.0.0.1:6443: getsockopt: connection refused
E0914 15:57:19.165363   29704 reflector.go:201] k8s.io/kubernetes/pkg/client/informers/informers_generated/internalversion/factory.go:70: Failed to list *api.Secret: Get https://localhost:6443/api/v1/secrets?resourceVersion=0: dial tcp 127.0.0.1:6443: getsockopt: connection refused
E0914 15:57:19.165826   29704 reflector.go:201] k8s.io/kubernetes/pkg/client/informers/informers_generated/internalversion/factory.go:70: Failed to list *api.ResourceQuota: Get https://localhost:6443/api/v1/resourcequotas?resourceVersion=0: dial tcp 127.0.0.1:6443: getsockopt: connection refused
[restful] 2017/09/14 15:57:19 log.go:30: [restful/swagger] listing is available at https://192.168.246.205:6443/swaggerapi/
[restful] 2017/09/14 15:57:19 log.go:30: [restful/swagger] https://192.168.246.205:6443/swaggerui/ is mapped to folder /swagger-ui/
I0914 15:57:19.311924   29704 serve.go:79] Serving securely on 0.0.0.0:6443
I0914 15:57:19.312350   29704 serve.go:94] Serving insecurely on 0.0.0.0:8080
W0914 15:58:19.360647   29704 storage_extensions.go:127] third party resource sync failed: the server cannot complete the requested operation at this time, try again later (get thirdpartyresources.extensions)
E0914 15:58:20.172521   29704 reflector.go:201] k8s.io/kubernetes/pkg/client/informers/informers_generated/internalversion/factory.go:70: Failed to list *api.LimitRange: the server cannot complete the requested operation at this time, try again later (get limitranges)
E0914 15:58:20.217171   29704 reflector.go:201] k8s.io/kubernetes/pkg/client/informers/informers_generated/internalversion/factory.go:70: Failed to list *api.Namespace: the server cannot complete the requested operation at this time, try again later (get namespaces)
E0914 15:58:20.237223   29704 reflector.go:201] k8s.io/kubernetes/pkg/client/informers/informers_generated/internalversion/factory.go:70: Failed to list *api.Secret: the server cannot complete the requested operation at this time, try again later (get secrets)
E0914 15:58:20.288630   29704 reflector.go:201] k8s.io/kubernetes/pkg/client/informers/informers_generated/internalversion/factory.go:70: Failed to list *api.ResourceQuota: the server cannot complete the requested operation at this time, try again later (get resourcequotas)
E0914 15:59:21.174936   29704 reflector.go:201] k8s.io/kubernetes/pkg/client/informers/informers_generated/internalversion/factory.go:70: Failed to list *api.LimitRange: the server cannot complete the requested operation at this time, try again later (get limitranges)
E0914 15:59:21.220406   29704 reflector.go:201] k8s.io/kubernetes/pkg/client/informers/informers_generated/internalversion/factory.go:70: Failed to list *api.Namespace: the server cannot complete the requested operation at this time, try again later (get namespaces)
E0914 15:59:21.241277   29704 reflector.go:201] k8s.io/kubernetes/pkg/client/informers/informers_generated/internalversion/factory.go:70: Failed to list *api.Secret: the server cannot complete the requested operation at this time, try again later (get secrets)
E0914 15:59:21.292228   29704 reflector.go:201] k8s.io/kubernetes/pkg/client/informers/informers_generated/internalversion/factory.go:70: Failed to list *api.ResourceQuota: the server cannot complete the requested operation at this time, try again later (get resourcequotas)
W0914 15:59:29.363806   29704 storage_extensions.go:127] third party resource sync failed: the server cannot complete the requested operation at this time, try again later (get thirdpartyresources.extensions)

此时查看etcd,也没有/registry。经过一些参数的研究,最后发现是etcd版本的问题。

--storage-backend string                                  The storage backend for persistence. Options: "etcd3" (default), "etcd2".

修改参数,再启动kube-apiserver,可以正常使用。搞定!

W0914 16:13:16.067598   30094 authentication.go:362] AnonymousAuth is not allowed with the AllowAll authorizer.  Resetting AnonymousAuth to false. You should use a different authorizer
W0914 16:13:16.403210   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.408058   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.408428   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.408972   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.409507   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.412534   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.413109   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.413742   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.414275   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.414856   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.415388   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.417098   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.418250   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.419170   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.419871   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.420374   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.469806   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.470232   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.470989   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.471696   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.472371   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.472779   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.473057   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.417098   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.418250   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.419170   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.419871   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.420374   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.469806   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.470232   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.470989   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.471696   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.472371   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.472779   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.473057   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.473751   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.474703   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.475538   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.476526   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.477211   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.477906   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.479327   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.480063   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.480658   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.481126   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.481728   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.482141   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.482550   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.482831   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.483082   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.483445   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.483768   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.484033   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
W0914 16:13:16.484276   30094 storage_codec.go:52] storage type "etcd2" does not support media type "application/vnd.kubernetes.protobuf", using "application/json"
E0914 16:13:16.575205   30094 reflector.go:201] k8s.io/kubernetes/pkg/client/informers/informers_generated/internalversion/factory.go:70: Failed to list *api.Secret: Get https://localhost:6443/api/v1/secrets?resourceVersion=0: dial tcp 127.0.0.1:6443: getsockopt: connection refused
[restful] 2017/09/14 16:13:16 log.go:30: [restful/swagger] listing is available at https://192.168.246.205:6443/swaggerapi/
[restful] 2017/09/14 16:13:16 log.go:30: [restful/swagger] https://192.168.246.205:6443/swaggerui/ is mapped to folder /swagger-ui/
I0914 16:13:16.735123   30094 serve.go:79] Serving securely on 0.0.0.0:6443
I0914 16:13:16.735605   30094 serve.go:94] Serving insecurely on 0.0.0.0:8080

参考资料:https://github.com/kubernetes...

文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。

转载请注明本文地址:https://www.ucloud.cn/yun/32575.html

相关文章

  • Kubernetes v1.0特性解析

    摘要:问题是不是定义的一个的容器集群是只部署在同一个主机上杨乐到目前是,同一个里的是部署在同一台主机的。问题这个图里的是安装在哪里的所有的客户端以及会连接这个嘛杨乐可以任意地方,只要能访问到集群,会作为的出口。 kubernetes1.0刚刚发布,开源社区400多位贡献者一年的努力,多达14000多次的代码提交,最终达到了之前预计的milestone, 并意味着这个开源容器编排系统可以正式在...

    HackerShell 评论0 收藏0
  • 循序渐进的手动安装k8s笔记-2

    摘要:启动并设置为开机自启动安装服务这部分配置与上一篇笔记完全相同。我们创建这个文件并填入如下内容安装完和之后将其启动并设置为开机自启动以上,角色的功能已经安装完成。 上一篇笔记中,我尝试了使用 k8s 1.6 版本安装一个最简单的集群。这一次,我希望能够增加 node 的数量并且安装网络插件,然后配置内部的域名解析功能。 在起初的设想中,我仍然希望不配置各个组件间的认证,只关心功能的正常运...

    pingink 评论0 收藏0
  • k8s :kube-apiserver 启动流程 - 1

    摘要:前言看源代码有一段时间,总感觉在迷宫里乱窜,有时候觉得终于找到出口了,一下子又撞墙了,总结下来还是自己的内功不够深厚,本文是对遗留,即将废弃初始化流程以及数据结构的一个梳理,算是做个路标,便于以后在迷宫中还能找到回来的路主要功能是提供接 前言 看 k8s 源代码有一段时间,总感觉在迷宫里乱窜,有时候觉得终于找到出口了,一下子又撞墙了,总结下来还是自己的内功不够深厚,本文是对 kube-...

    wwolf 评论0 收藏0
  • k8s :kube-apiserver 启动流程 - 1

    摘要:前言看源代码有一段时间,总感觉在迷宫里乱窜,有时候觉得终于找到出口了,一下子又撞墙了,总结下来还是自己的内功不够深厚,本文是对遗留,即将废弃初始化流程以及数据结构的一个梳理,算是做个路标,便于以后在迷宫中还能找到回来的路主要功能是提供接 前言 看 k8s 源代码有一段时间,总感觉在迷宫里乱窜,有时候觉得终于找到出口了,一下子又撞墙了,总结下来还是自己的内功不够深厚,本文是对 kube-...

    RayKr 评论0 收藏0
  • 循序渐进的手动安装k8s笔记-1

    摘要:日志级别通过启动并设置为开机自启动之后可以通过来检查服务器运行状态安装服务编辑服务文件环境变量文件中定义了启动参数。 不知道有没有人和我一样,在手动安装时因为很多原因没有成功(主要还是知识储备不够),被各种高可用配置和各种证书权限弄得迷迷糊糊。这个笔记是我在尝试了很多种手动安装Kubernetes集群教程中的方法失败后产生的想法,希望能够将复杂的配置化繁为简,呈现出一个基本功能的Kub...

    CoderDock 评论0 收藏0

发表评论

0条评论

blastz

|高级讲师

TA的文章

阅读更多
最新活动
阅读需要支付1元查看
<