简体   繁体   English

部署应用程序时出错:Get http://localhost:8080/api: dial tcp [::1]:8080: connectex:

[英]Error while deploying application: Get http://localhost:8080/api: dial tcp [::1]:8080: connectex:

How do you set up environment variable for config.你如何为配置设置环境变量。 Could some one please explain in details.有人可以详细解释一下。 I am using windows home and trying to docker-compose.yml to k8s but when I do kompose up it says: I have installed kubectl and minikube and dont know how to set the config file so this api can be started我正在使用 windows 主页并尝试将docker-compose.ymlk8s ,但是当我做kompose时,它说:我已经安装了kubectlminikube并且不知道如何设置配置文件所以这个 Z8A5DA52ED1264E74ADAC3 可以开始

Error while deploying application: Get http://localhost:8080/api: dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.

Thanks by advance提前致谢

Kompose always refer to http://localhost:8080/ by default. Kompose 默认总是引用http://localhost:8080/ The problem is that as you are using minikube, your api server is in a different address.问题是当您使用 minikube 时,您的 api 服务器位于不同的地址。

To check the address of your API, run any kubectl command and get your API server address:要检查您的 API 的地址,请运行任何 kubectl 命令并获取您的 API 服务器地址:

$ kubectl get nodes -v6

Output: Output:

I0518 07:27:05.109476    3656 loader.go:375] Config loaded from file:  /home/christofoletti/.kube/config
I0518 07:27:05.138651    3656 round_trippers.go:443] GET https://192.168.39.6:8443/api/v1/nodes?limit=500 200 OK in 19 milliseconds
NAME       STATUS   ROLES    AGE     VERSION
cluster2   Ready    master   3d19h   v1.18.2

As you can see, we have GET https://192.168.39.36:8443/api/v1/nodes?limit=500 200 OK .如您所见,我们有GET https://192.168.39.36:8443/api/v1/nodes?limit=500 200 OK

So, my API server address is https://192.168.39.26:8443/ .所以,我的 API 服务器地址是https://192.168.39.26:8443/

Now you can run $ kompose up --server https://192.168.39.26:8443/ and Kompose will know where to send the request.现在您可以运行$ kompose up --server https://192.168.39.26:8443/并且 Kompose 将知道将请求发送到哪里。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误:无法从服务器读取版本:获取 http://localhost:8080/api: dial tcp 127.0.0.1:8080: connection denied - Error: couldn't read version from server: Get http://localhost:8080/api: dial tcp 127.0.0.1:8080: connection refused Docker 获取 http://localhost:8091/api/order: 拨打 tcp 127.0.0.1:8091: 连接连接被拒绝 - Docker Get http://localhost:8091/api/order: dial tcp 127.0.0.1:8091: connect: connection refused 出现错误“Get http://localhost:9443/metrics: dial tcp 127.0.0.1:9443: connect: connection refused” - Getting error "Get http://localhost:9443/metrics: dial tcp 127.0.0.1:9443: connect: connection refused" 我无法在 MacOS 上使用 Docker 在 http://localhost:8080 访问 Jenkins - I can't access Jenkins at http://localhost:8080 with Docker on MacOS 拨打 tcp 127.0.0.1:8080:连接:连接被拒绝。 go docker 应用程序 - dial tcp 127.0.0.1:8080: connect: connection refused. go docker app 运行docker映像时无法访问localhost:8080 - Can't reach localhost:8080 while running docker image kubectl get:与服务器localhost:8080的连接被拒绝-Kubernetes - kubectl get: The connection to the server localhost:8080 was refused -Kubernetes Kubernetes 从站错误 - 与服务器 localhost:8080 的连接被拒绝 - Kubernetes Slave Error - The connection to the server localhost:8080 was refused 如何将子路径添加到 localhost:8080 - how to add subpath to localhost:8080 Docker 本地主机错误:拨打 tcp:在 8.8.8.8:53 上查找本地主机:没有这样的主机 - Docker on localhost error: dial tcp: lookup localhost on 8.8.8.8:53: no such host
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM