【发布时间】:2016-10-18 17:48:59
【问题描述】:
我有一个使用 kube-aws 配置的 kubernetes 集群。我在三个控制器节点上添加了两个额外的控制器和集群 etcd。当我在不同节点上设置和获取值时,etcd 集群似乎(大部分)健康并且工作。
我将新的 etcd 服务器添加到 /etc/kubernetes/manifests/kube-apiserver.yaml:
--etcd-servers=http://10.0.0.50:2379,http://10.0.1.50:2379,http://10.0.2.50:2379
现在,kube-apiserver 拒绝安全端口 443 上的连接。
kubelet 日志包含这样的条目...
E0617 02:07:17.488289 30972 pod_workers.go:138] Error syncing pod
b394008e8164, skipping: failed to "StartContainer" for "etcd-container" with
CrashLoopBackOff: "Back-off 5m0s restarting failed container=etcd-container
pod=etcd-server-ip-10-0-0-50.eu-west-1.compute.internal_default(b394008e8164)"
还有这个……
E0617 02:03:00.542951 30972 event.go:193] Server rejected event
'&api.Event{TypeMeta:unversioned.TypeMeta{Kind:"", APIVersion:""},
ObjectMeta:api.ObjectMeta{Name:"etcd-server-ip-10-0-0-50.eu-
west-1.compute.internal.1458b", GenerateName:"", Namespace:"default",
SelfLink:"", UID:"", ResourceVersion:"1189", Generation:0,
CreationTimestamp:unversioned.Time{Time:time.Time{sec:0, nsec:0,
loc:(*time.Location)(nil)}}, DeletionTimestamp:(*unversioned.Time)(nil),
DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string(nil),
Annotations:map[string]string(nil)},
InvolvedObject:api.ObjectReference{Kind:"Pod", Namespace:"default",
Name:"etcd-server-ip-10-0-0-50.eu-west-1.compute.internal",
UID:"b394008e8164", APIVersion:"v1", ResourceVersion:"", FieldPath:""},
Reason:"FailedSync", Message:"Error syncing pod, skipping: failed to
\"StartContainer\" for \"etcd-container\" with RunContainerError:
\"runContainer: API error (500): mkdir /usr/local/openssl: read-only file
system\\n\"\n", Source:api.EventSource{Component:"kubelet", Host:"ip-
10-0-0-50.eu-west-1.compute.internal"},
FirstTimestamp:unversioned.Time{Time:time.Time{sec:63601711997, nsec:0,
loc:(*time.Location)(0x3b1a5c0)}},
LastTimestamp:unversioned.Time{Time:time.Time{sec:63601725780,
nsec:522501285, loc:(*time.Location)(0x3b1a5c0)}}, Count:7, Type:"Warning"}':
'events "etcd-server-ip-10-0-0-50.eu-west-1.compute.internal.1458b" not
found' (will not retry!)
像这样在端口 8080 上本地查询 kube-apiserver...
$ curl http://localhost:8080/api/v1/namespaces
...返回一个有效的响应。
但它拒绝对安全端口的任何尝试。
谁能指出正确的方向?
【问题讨论】:
标签: kubernetes