gpt4 book ai didi

SSH 进入在 Amazon 上运行的 Kubernetes 集群

转载 作者:行者123 更新时间:2023-12-04 23:15:21 24 4
gpt4 key购买 nike

创建了一个 2 节点 Kubernetes 集群:

KUBERNETES_PROVIDER=aws NUM_NODES=2 kube-up.sh

这将输出显示为:
Found 2 node(s).
NAME STATUS AGE
ip-172-20-0-226.us-west-2.compute.internal Ready 57s
ip-172-20-0-227.us-west-2.compute.internal Ready 55s
Validate output:
NAME STATUS MESSAGE ERROR
controller-manager Healthy ok
scheduler Healthy ok
etcd-0 Healthy {"health": "true"}
etcd-1 Healthy {"health": "true"}
Cluster validation succeeded
Done, listing cluster services:

Kubernetes master is running at https://52.33.9.1
Elasticsearch is running at https://52.33.9.1/api/v1/proxy/namespaces/kube-system/services/elasticsearch-logging
Heapster is running at https://52.33.9.1/api/v1/proxy/namespaces/kube-system/services/heapster
Kibana is running at https://52.33.9.1/api/v1/proxy/namespaces/kube-system/services/kibana-logging
KubeDNS is running at https://52.33.9.1/api/v1/proxy/namespaces/kube-system/services/kube-dns
kubernetes-dashboard is running at https://52.33.9.1/api/v1/proxy/namespaces/kube-system/services/kubernetes-dashboard
Grafana is running at https://52.33.9.1/api/v1/proxy/namespaces/kube-system/services/monitoring-grafana
InfluxDB is running at https://52.33.9.1/api/v1/proxy/namespaces/kube-system/services/monitoring-influxdb

我可以在 EC2 控制台中看到实例。如何通过 ssh 进入主节点?

最佳答案

这是对我有用的确切命令:

ssh -i ~/.ssh/kube_aws_rsa admin@<masterip>
kube_aws_rsa是生成的默认 key ,否则由 AWS_SSH_KEY 控制环境变量。对于 AWS,它在文件 cluster/aws/config-default.sh 中指定.

可以使用 kubectl.sh config view 找到有关集群的更多详细信息。 .

关于SSH 进入在 Amazon 上运行的 Kubernetes 集群,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39522549/

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