k8s节点node报错The connection to the server localhost:8080 was refused - did you specify the right host
2022/4/2 14:19:37
本文主要是介绍k8s节点node报错The connection to the server localhost:8080 was refused - did you specify the right host,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
解决办法:
将master节点上的admin.conf文件拷贝到从节点
1在master节点上执行传文件
[root@master .kube]# scp /etc/kubernetes/admin.conf node1:~ Password: admin.conf 100% 5562 2.1MB/s 00:00
2在node节点上执行配置环境变量:
[root@node1 ~]# export KUBECONFIG=$HOME/admin.conf
3在node的节点上查看
[root@node1 ~]# kubectl get nodes NAME STATUS ROLES AGE VERSION master Ready master 3d4h v1.19.3 node1 Ready <none> 3d2h v1.19.3 node2 Ready <none> 3d2h v1.19.3
这篇关于k8s节点node报错The connection to the server localhost:8080 was refused - did you specify the right host的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-05-29一文搞定 KubeKey 3.1.1 离线部署 KubeSphere 3.4.1 和 Kubernetes v1.28
- 2024-05-29云原生周刊:K8s 上的 gRPC 名称解析和负载平衡
- 2024-05-08云原生周刊:Kubernetes v1.30 发布 | 2024.4.22
- 2024-05-08云原生周刊:K8s 中的服务和网络 | 2024.4.29
- 2024-03-29kubernetes crashloopbackoff
- 2024-03-13ubuntu install kubernetes
- 2024-03-07k8s coredns containercreating
- 2024-03-04k8s for dummies
- 2024-03-01pulumi kubernetes operator
- 2024-02-06云原生周刊:K8s 1.26 到 1.29 版本的更新 | 2024.1.29