首页 > 解决方案 > 如何在 ssh 中打开 aws ec2 的主节点

问题描述

我在主 EC2 实例中使用 kops 和 kubectl 创建了 kubernetes 集群,并自动创建了主子节点。

kops create cluster \
--state=${KOPS_STATE_STORE} \
--node-count=2 \
--master-size=t2.medium \
--node-size=t2.medium \
--zones=ap-south-1a,ap-south-1b \
--name=${KOPS_CLUSTER_NAME} \
--dns private \
--master-count 1

我可以从 git bash 或直接连接 kops ec2 instance(main)。但我无法以任何方式打开主实例。

 ssh -i key1.pem ec2-user@kops-ip  #working for kops 

在连接到主节点时,它的提供:

There was a problem setting up the instance connection
Log in failed. If this instance has just started up, try again in a minute or two.

我的问题是:

1.如何打开主ec2实例?

2.我需要在master或kops实例(目前有)中安装kubernetes仪表板吗?

AWS 实例:

kops(ec2-user)
master-ap-south-1a.masters.a.com
nodes.a.com 
nodes.a.com 

标签: amazon-web-servicesamazon-ec2sshkubernetes

解决方案


推荐阅读