首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >API服务器启动失败

API服务器启动失败
EN

Stack Overflow用户
提问于 2016-01-14 11:46:11
回答 1查看 2.7K关注 0票数 2

尝试按照master.sh成功运行的指南( api )脚本配置一个主节点,但http://kubernetes.io/v1.1/docs/getting-started-guides/docker-multinode.html#master-node服务器无法启动。软件版本:

代码语言:javascript
运行
复制
K8S_VERSION=1.1.3
ETCD_VERSION=2.2.1
FLANNEL_VERSION=0.5.5

操作系统版本:

代码语言:javascript
运行
复制
VERSION="2015.09"
ID="amzn"
ID_LIKE="rhel fedora"
VERSION_ID="2015.09"
PRETTY_NAME="Amazon Linux AMI 2015.09"
ANSI_COLOR="0;33"
CPE_NAME="cpe:/o:amazon:linux:2015.09:ga"
HOME_URL="http://aws.amazon.com/amazon-linux-ami/"

Docker: 1.7.1

内核版本:

代码语言:javascript
运行
复制
Linux ip-172-0-11-22 4.1.10-17.31.amzn1.x86_64 #1 SMP Sat Oct 24 01:31:37 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

kubelet的日志信息:

代码语言:javascript
运行
复制
I0113 15:44:42.517777 7987 server.go:770] Started kubelet
E0113 15:44:42.517812 7987 kubelet.go:756] Image garbage collection failed: unable to find data for container /
E0113 15:44:42.518437 7987 event.go:197] Unable to write event: 'Post http://localhost:8080/api/v1/namespaces/default/events: dial tcp 127.0.0.1:8080: connection refused' (may retry after sleeping)
I0113 15:44:42.518460 7987 server.go:89] Starting to listen read-only on 0.0.0.0:10255
I0113 15:44:42.518885 7987 server.go:72] Starting to listen on 0.0.0.0:10250
I0113 15:44:42.524222 7987 kubelet.go:777] Running in container "/kubelet"
I0113 15:44:42.696510 7987 factory.go:239] Registering Docker factory
I0113 15:44:42.698516 7987 factory.go:93] Registering Raw factory
I0113 15:44:42.698837 7987 kubelet.go:2300] Recording NodeHasSufficientDisk event message for node localhost
I0113 15:44:42.698862 7987 kubelet.go:2300] Recording NodeReady event message for node localhost
I0113 15:44:42.698871 7987 kubelet.go:869] Attempting to register node localhost
I0113 15:44:42.699523 7987 kubelet.go:872] Unable to register localhost with the apiserver: Post http://localhost:8080/api/v1/nodes: dial tcp 127.0.0.1:8080: connection refused
I0113 15:44:42.829361 7987 manager.go:1006] Started watching for new ooms in manager
I0113 15:44:42.830001 7987 oomparser.go:183] oomparser using systemd
I0113 15:44:42.842667 7987 manager.go:250] Starting recovery of all containers
I0113 15:44:42.868829 7987 manager.go:255] Recovery completed
I0113 15:44:42.880876 7987 container_manager_linux.go:215] Configure resource-only container /docker-daemon with memory limit: 2903034265
I0113 15:44:42.880910 7987 manager.go:104] Starting to sync pod status with apiserver
I0113 15:44:42.880963 7987 kubelet.go:1960] Starting kubelet main sync loop.
I0113 15:44:42.881004 7987 kubelet.go:2012] SyncLoop (ADD): "k8s-master-localhost_default"
E0113 15:44:42.881457 7987 kubelet.go:1915] error getting node: node 'localhost' is not in cache
E0113 15:44:42.884752 7987 kubelet.go:1356] Failed creating a mirror pod "k8s-master-localhost_default": Post http://localhost:8080/api/v1/namespaces/default/pods: dial tcp 127.0.0.1:8080: connection refused
E0113 15:44:42.884780 7987 kubelet.go:1361] Mirror pod not available
I0113 15:44:42.884839 7987 manager.go:1707] Need to restart pod infra container for "k8s-master-localhost_default" because it is not found
W0113 15:44:42.885688 7987 manager.go:108] Failed to updated pod status: error updating status for pod "k8s-master-localhost_default": Get http://localhost:8080/api/v1/namespaces/default/pods/k8s-master-localhost: dial tcp 127.0.0.1:8080: connection refused
I0113 15:44:42.900665 7987 kubelet.go:2300] Recording NodeHasSufficientDisk event message for node localhost
I0113 15:44:42.900693 7987 kubelet.go:2300] Recording NodeReady event message for node localhost
I0113 15:44:42.900751 7987 kubelet.go:869] Attempting to register node localhost
I0113 15:44:42.901194 7987 kubelet.go:872] Unable to register localhost with the apiserver: Post http://localhost:8080/api/v1/nodes: dial tcp 127.0.0.1:8080: connection refused
I0113 15:44:42.977270 7987 provider.go:91] Refreshing cache for provider: *credentialprovider.defaultDockerConfigProvider
I0113 15:44:42.977458 7987 docker.go:159] Pulling image gcr.io/google_containers/pause:0.8.0 without credentials
I0113 15:44:43.302487 7987 kubelet.go:2300] Recording NodeHasSufficientDisk event message for node localhost
I0113 15:44:43.302552 7987 kubelet.go:2300] Recording NodeReady event message for node localhost
EN

回答 1

Stack Overflow用户

发布于 2016-01-16 00:41:38

首先,我会升级到更新的Docker版本。

但我认为这个问题与你的kubelet配置有关。

参数-- hostname -override允许您覆盖主机名。我不是百分之百确定,但我认为您的节点必须能够通过kube-api服务器的主机名进行访问。如果你的api-server在另一个节点上,localhost将无法工作。

有关详情,请参阅:http://kubernetes.io/v1.1/docs/admin/kubelet.html

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/34781378

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档