2017-08-23 37 views
0

所以我試圖在Kubernetes集羣上創建一個容器。這裏是我從中創建pod的yml文件。Etcd集羣不可用或配置錯誤;不能驗證證書;因爲它不包含任何IP SAN

kind: Pod 
apiVersion: v1 
metadata: 
    name: task-pv-pod2 
spec: 
    containers: 
    - name: task-pv-container2 
     image: <<image_name>> 

吊艙掛在容器創建。這是kubectl describe pod的輸出。

Events: 
    FirstSeen LastSeen Count From     SubObjectPath Type  Reason  Message 
    --------- -------- ----- ----     ------------- -------- ------  ------- 
    10s  10s  1 default-scheduler     Normal  Scheduled Successfully assigned task-pv-pod2 to ip-10-205-234-170.ec2.internal 
    8s  8s  1 kubelet, ip-10-205-234-170.ec2.internal   Warning  FailedSync Error syncing pod, skipping: failed to "SetupNetwork" for "task-pv-pod2_default" with SetupNetworkError: "NetworkPlugin cni failed to set up pod \"task-pv-pod2_default\" network: client: etcd cluster is unavailable or misconfigured; error #0: x509: cannot validate certificate for 10.205.234.170 because it doesn't contain any IP SANs\n; error #1: x509: cannot validate certificate for 10.205.235.160 because it doesn't contain any IP SANs\n; error #2: x509: cannot validate certificate for 10.205.234.162 because it doesn't contain any IP SANs\n" 

    7s 6s 2 kubelet, ip-10-205-234-170.ec2.internal  Warning FailedSync Error syncing pod, skipping: failed to "TeardownNetwork" for "task-pv-pod2_default" with TeardownNetworkError: "NetworkPlugin cni failed to teardown pod \"task-pv-pod2_default\" network: client: etcd cluster is unavailable or misconfigured; error #0: x509: cannot validate certificate for 10.205.234.170 because it doesn't contain any IP SANs\n; error #1: x509: cannot validate certificate for 10.205.235.160 because it doesn't contain any IP SANs\n; error #2: x509: cannot validate certificate for 10.205.234.162 because it doesn't contain any IP SANs\n" 

有誰知道可能是什麼原因造成的。爲了讓Kubernetes能夠使用aws作爲雲提供商,我必須在hyperkube容器中設置一個代理變量。 Co

回答

0

看起來您的ETCD證書不可信任您訪問的名稱(或IP)。我建議你使用kubectl get cs來檢查你的集羣健康狀況,如果需要的話修改k8s的方式與ETCD交談。

相關問題