我正在使用 KOP 在 AWS 环境中启动 Kubernetes 集群。
- 调用
create cluster
时是否可以设置预定义的 SSH key ? - 如果 KOPs 在运行
create cluster
时自动生成 SSH key ,是否有办法下载此 key 以访问集群节点?
最佳答案
请阅读 Kops SSH docs :
When using the default images, the SSH username will be admin, and the SSH private key is be the private key corresponding to the public key in kops get secrets --type sshpublickey admin. When creating a new cluster, the SSH public key can be specified with the --ssh-public-key option, and it defaults to ~/.ssh/id_rsa.pub.
所以回答你的问题:
- 是的,您可以使用
--ssh-public-key
设置 key > - 当未指定
--ssh-public-key
时,Kops 不会自动生成 key ,而是使用在~.ssh/id_rsa.pub
中找到的 key /li>
关于amazon-web-services - 在 KOP 中定义自定义 SSH key 或查找自动生成的 SSH key ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42862555/