Closed jsparter closed 1 year ago
I change to use main branch and tried again, pod is running, but still curl http://localhost:4000/
got curl: (7) Failed to connect to ::1: No route to host
, and use lsof -i:4000
didn't get anything
I change to use main branch and tried again, pod is running, but still curl http://localhost:4000/
got curl: (7) Failed to connect to ::1: No route to host
, and use lsof -i:4000
didn't get anything
@jsparter
The service definition for edgex-ui is missing.
Please get the "main" branch of this repo, and apply the following patch:
diff --git a/deployment/helm/templates/edgex-ui/edgex-ui-service.yaml b/deployment/helm/templates/edgex-ui/edgex-ui-service.yaml
new file mode 100644
index 0000000..c12adf2
--- /dev/null
+++ b/deployment/helm/templates/edgex-ui/edgex-ui-service.yaml
@@ -0,0 +1,17 @@
+# Copyright (C) 2022 Intel Corporation
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+apiVersion: v1
+kind: Service
+metadata:
+ labels:
+ org.edgexfoundry.service: {{.Values.edgex.app.ui}}
+ name: {{.Values.edgex.app.ui}}
+spec:
+ ports:
+ - name: "http"
+ port: {{.Values.edgex.port.ui}}
+ selector:
+ org.edgexfoundry.service: {{.Values.edgex.app.ui}}
+ type: {{.Values.expose.type}}
(basically save the above to a file, and send it to the patch command to create the file)
Let me know how it goes.
After the change, you should be able to hit edgex-ui at its service address:
$ kubectl get svc edgex-ui
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
edgex-ui ClusterIP 10.110.128.49 <none> 4000/TCP 10m
firefox http://<edgex-ui-cluster-ip>:4000
or
firefox http://10.110.128.49:4000
Also, localhost
doesn't usually work in Kubernetes.
For compatibility with the docker implementation (for now), the default settings of the helm chart assume a single node Kubernetes cluster. But with hostport mounts, you need to hit the IP of the node the pod is running on. This is a hack. The proper way to expose the service outside of the cluster is to make it a NodePort or LoadBalancer service. (There are settings in values.yaml to change the default from ClusterIP to some other type of service.)
$ kubectl get pods -o wide | grep edgex-ui
edgex-ui-7b8cf4c966-27bmt 1/1 Running 0 14m 10.244.2.17 f35-k8s-edgex-w2 <none> <none>
$ kubectl get nodes -o wide
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
f35-k8s-edgex Ready control-plane,master,worker 342d v1.21.0 192.168.122.205 <none> Fedora Linux 35 (Workstation Edition) 5.15.18-200.fc35.x86_64 cri-o://1.21.3
f35-k8s-edgex-w2 Ready <none> 58d v1.21.0 192.168.122.79 <none> Fedora Linux 35 (Workstation Edition) 5.15.18-200.fc35.x86_64 cri-o://1.21.3
f35-k8s-edgex-worker Ready <none> 257d v1.21.0 192.168.122.184 <none> Fedora Linux 35 (Workstation Edition) 5.15.18-200.fc35.x86_64 cri-o://1.21.3
According to the above, firefox http://192.168.122.79:4000
should do the trick.
Lastly, the helm charts are undergoing extremely rapid change right now. Contributions are appreciated.
This fix has been merged. Reopen if this doesn't resolve your issue.
I followed
deployment/helm
README.md to deploy edgex over my k8s cluster,everything is going well except pod edge-ui,I gotCrashLoopBackOff
and all edge-ui logs I can see are as follow:There are two ping test get error response: Ping edgex-support-ruleengine
curl http://localhost:59861/
got404 page not found
Ping edgex-uicurl http://localhost:4000/
gotcurl: (7) Failed to connect to ::1: No route to host
The related release is v2.3.0 What's happened and how to fix it?