请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

client-go连接阿里云服务器失败

老师你好,我租了一台阿里云轻量级云服务器,然后用client-go去连接访问,但是报错

kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
networking:
  # WARNING: It is _strongly_ recommended that you keep this the default
  # (127.0.0.1) for security reasons. However it is possible to change this.
  apiServerAddress: "172.24.61.141"
  # By default the API server listens on a random open port.
  # You may choose a specific port but probably don't need to in most cases.
  # Using a random port makes it easier to spin up multiple clusters.
  apiServerPort: 6443

containerdConfigPatches:
- |-
  [plugins."io.containerd.grpc.v1.cri".registry.mirrors."docker.io"]
    endpoint = ["https://njzb6yez.mirror.aliyuncs.com"]
nodes:
- role: control-plane
- role: worker
- role: worker
Get "https://172.24.61.141:6443/api/v1/pods": dial tcp 172.24.61.141:6443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

172.24.61.141是我的私人ip,我在防火墙也开启了6443端口
图片描述
但是我用我自己创建的Ubuntu就可以,这是为什么

正在回答 回答被采纳积分+3

1回答

暮闲 2024-06-15 13:02:50

阿里云服务器需要去安全组开启6443端口哦

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信