2016-06-17 15 views
0

kube-awsを使用してkubernetesクラスタをプロビジョニングしました。私は2つのコントローラを追加し、3つのコントローラノードにクラスタ化しました。 etcdクラスタは(ほとんど)健全に見え、異なるノードで値を設定して取得すると機能します。kube-apiserverポート443で外部接続を拒否する

私は/etc/kubernetes/manifests/kube-apiserver.yamlする新しいetcdサーバを追加しました:

--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: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!) 
...

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)" 

この...このようなエントリが含まれています

そう...

$ curl http://localhost:8080/api/v1/namespaces 

のように、ポート8080上でローカルKUBE-apiserverの照会...有効な応答を返します。

しかし、セキュアポートでの試行は拒否されます。

誰でも私に正しい方向を指摘できますか?この質問はKUBE-apiserverに問題が見つかった人のため

答えて

0

...

私の問題は、/ etc/kubernetes/SSL/TLSに常駐悪い資産であることが判明しました。 (後ろ向きでは、HTTP要求には応答していたが、HTTPSには応答していなかったことは明らかです。)私の質問のログエントリは、TLSアセットの問題とは関係ありませんでした。 kubeletログは私が問題を追跡助け:

$ journalctl -u kubelet -e # jump to end of kubelet logs 

以下にも便利になりました:

$ journalctl -u oem-cloudinit # if using aws will help you debug your cloud-config 
$ journalctl -u etcd2 -f # follow etcd logs 
関連する問題