概述
执行命令: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 connection to the server localhost:8080 was refused - did you specify the right host or port?所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复