[英]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.yml
为k8s
,但是当我做kompose
时,它说:我已经安装了kubectl
和minikube
并且不知道如何设置配置文件所以这个 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.