edgemesh gateway unable to find the service in another namespace
What happened: kubectl logs -n kubeedge edgemesh-gateway-6c649d89fb-sgcdf E0316 15:23:06.652338 1 http.go:77] route by http request uri err: service bound to the destination default.zbl-internal-nginx-service.zbl does not exist, reason: service "zbl-internal-nginx-service.zbl" not found E0316 15:45:35.721900 1 http.go:77] route by http request uri err: service bound to the destination default.zbl-internal-nginx-service.zbl.svc.cluster.local does not exist, reason: service "zbl-internal-nginx-service.zbl.svc.cluster.local" not found E0316 15:45:39.561912 1 http.go:77] route by http request uri err: service bound to the destination default.zbl-internal-nginx-service.zbl.svc.cluster.local does not exist, reason: service "zbl-internal-nginx-service.zbl.svc.cluster.local" not found E0316 15:45:40.461874 1 http.go:77] route by http request uri err: service bound to the destination default.zbl-internal-nginx-service.zbl.svc.cluster.local does not exist, reason: service "zbl-internal-nginx-service.zbl.svc.cluster.local" not found E0316 15:50:01.748800 1 http.go:77] route by http request uri err: service bound to the destination default.zbl-internal-nginx-service.zbl.svc.cluster.local does not exist, reason: service "zbl-internal-nginx-service.zbl.svc.cluster.local" not found What you expected to happen: should be able to find the service and gateway should work How to reproduce it (as minimally and precisely as possible): create a gateway in default ns and service in another namespace Anything else we need to know?:
Environment:
- EdgeMesh version: v1.19.3-kubeedge-v1.8.1
- Kubernetes version (use
kubectl version):v1.21.0 - KubeEdge version(e.g.
cloudcore --versionandedgecore --version):
Other details:
When i do curl 192.168.15.20:23333 and check the edgemesh-gateway logs E0316 15:45:40.461874 1 http.go:77] route by http request uri err: service bound to the destination default.zbl-internal-nginx-service.zbl.svc.cluster.local does not exist, reason: service "zbl-internal-nginx-service.zbl.svc.cluster.local" not found E0316 15:50:01.748800 1 http.go:77] route by http request uri err: service bound to the destination default.zbl-internal-nginx-service.zbl.svc.cluster.local does not exist, reason: service "zbl-internal-nginx-service.zbl.svc.cluster.local" not found
# kubectl get svc -n zbl zbl-internal-nginx-service
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
zbl-internal-nginx-service ClusterIP 10.98.158.67
virtual service apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata: name: edgemesh-gateway-svc spec: gateways: - edgemesh-gateway hosts: - '*' http: - match: - uri: prefix: / route: - destination: host: zbl-internal-nginx-service.zbl.svc.cluster.local port: number: 12345_
I am able to curl the service from test pod
kubectl exec -it alpine-test curl zbl-internal-nginx-service.zbl.svc.cluster.local:12345 kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.
Could you print your gateway yaml?
apiVersion: networking.istio.io/v1alpha3 kind: Gateway metadata: name: edgemesh-gateway spec: selector: kubeedge: edgemesh-gateway servers: - hosts: - '*' port: name: http-0 number: 23333 protocol: HTTP
Your gateway, virtualService, service need in the same k8s namespaces
ok. Is there any plan to develop this feature?
May I ask why to constrain the namesapce of service to be the same as of the gateway? This desgin results that the host field in the virtualService can only be filled with a serviceName and a FQDN will fail.