gpt4 book ai didi

amazon-web-services - 为什么 AWS 提供商的 OpenShift 安装程序无法连接到 Kubernetes API?

转载 作者:行者123 更新时间:2023-12-02 12:29:56 25 4
gpt4 key购买 nike

OpenShift AWS 安装程序无法等待 Kubernetes API 可用,并出现 fatal error “等待 Kubernetes API:超出上下文期限”:

$ openshift-install create cluster --dir=$HOME/openshift --log-level debug
...
DEBUG Still waiting for the Kubernetes API: Get https://api.cluster-name.'IP_ADDRESS'.nip.io:6443/version?timeout=32s: dial tcp 'IP_ADDRESS':6443: i/o timeout
DEBUG Still waiting for the Kubernetes API: Get https://api.cluster-name.'IP_ADDRESS'.nip.io:6443/version?timeout=32s: dial tcp 'IP_ADDRESS':6443: i/o timeout
DEBUG Still waiting for the Kubernetes API: Get https://api.cluster-name.'IP_ADDRESS'.nip.io:6443/version?timeout=32s: dial tcp 'IP_ADDRESS':6443: i/o timeout
DEBUG Still waiting for the Kubernetes API: Get https://api.cluster-name.'IP_ADDRESS'.nip.io:6443/version?timeout=32s: dial tcp 'IP_ADDRESS':6443: i/o timeout
DEBUG Fetching "Install Config"...
DEBUG Loading "Install Config"...
DEBUG Loading "SSH Key"...
DEBUG Using "SSH Key" loaded from state file
DEBUG Loading "Base Domain"...
DEBUG Loading "Platform"...
DEBUG Using "Platform" loaded from state file
DEBUG Using "Base Domain" loaded from state file
DEBUG Loading "Cluster Name"...
DEBUG Loading "Base Domain"...
DEBUG Using "Cluster Name" loaded from state file
DEBUG Loading "Pull Secret"...
DEBUG Using "Pull Secret" loaded from state file
DEBUG Loading "Platform"...
DEBUG Using "Install Config" loaded from state file
DEBUG Reusing previously-fetched "Install Config"
INFO Use the following commands to gather logs from the cluster
...
FATAL waiting for Kubernetes API: context deadline exceeded

该问题也描述了 here

最佳答案

在我的情况下,安装程序尝试连接到链接到不存在的端点的 Kubernetes API。如果oc 的迹象之一-client 在运行像 oc whoami 这样的简单命令时挂起- 它实际上尝试连接到同一个端点(假设设置了 KUBECONFIG)。
事实证明,它与 Route 53 托管区域有关,尤其是与子域有关。当针对子域(如我的情况)安装 OpenShift 时,需要在主域中创建引用子域的记录集。因此,对于 openshift.example.com,在 aws 控制台中执行以下操作:
转到 Route 53 -> 托管区域 -> 单击 openshift.example.com。 (如果它不存在 - 创建一个托管区域) -> 复制 NS 记录,例如:

ns-711.awsdns-24.net.   
ns-126.awsdns-15.com.
ns-1274.awsdns-31.org.
ns-1556.awsdns-02.co.uk.

返回托管区域 -> example.com。 -> 创建记录集:
为 openshift.example.com 创建一个记录集,输入:NS - 名称服务器,值:粘贴复制的 NS 记录。

在此更改后,安装成功完成。

关于amazon-web-services - 为什么 AWS 提供商的 OpenShift 安装程序无法连接到 Kubernetes API?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59384073/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com