我是靠谱客的博主 纯情自行车,这篇文章主要介绍The connection to the server localhost:8080 was refused - did you specify the right host or port?,现在分享给大家,希望可以做个参考。

执行命令:sshpass -p XXX ssh root@192.168.1.222 "kubectl create -f /root/nginx-deploy.yaml"

报错:

W1208 02:50:04.426384    4100 factory_object_mapping.go:423] Failed to download OpenAPI (Get http://localhost:8080/swagger-2.0.0.pb-v1: dial tcp [::1]:8080: getsockopt: connection refused), falling back to swagger
The connection to the server localhost:8080 was refused - did you specify the right host or port?

 

解决方法:

需要开启api server 代理端口:

查看端口是否代理:curl localhost:8080/api

开启端口代理:kubectl proxy --port=8080 &

参考:https://yq.aliyun.com/articles/149595

最后

以上就是纯情自行车最近收集整理的关于The connection to the server localhost:8080 was refused - did you specify the right host or port?的全部内容,更多相关The内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(45)

评论列表共有 0 条评论

立即
投稿
返回
顶部