执行命令: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
本文介绍了一种在使用Kubernetes部署应用过程中遇到的连接被拒绝错误,并提供了详细的解决步骤,包括开启apiserver代理端口的方法。
3450

被折叠的 条评论
为什么被折叠?



