edge node cannot access the service with clusterip
kubernetes1.20 kubeedge1.8.2 edgemesh:last kube-proxy and coredns not scheduling in edge node,edgemesh deployment successful
I can't access services through podip or service
Can cloud services be accessed from edge nodes? How to configure? Is there a correct configuration tutorial
edgemesh-server log
cloudcore log
edgecore log
edgecore log
need some edgemesh-agent log
I can't access services through podip or service
edgemesh only support access services by clusterip or services DNS name.
I can't access services through podip or service
edgemesh only support access services by clusterip or services DNS name.
Sorry for my late reply, I access service through clusterip, but there was no response. There was no problem accessing in the cloud node

edgemesh-agent-master log

edgemesh-server log

edgemesh-agent-slaver

edgemesh-agent-edge log

I use binary to deploy kubeedge,
Using helm to deploy edgemesh, the configuration of edgemesh has not been modified after successful deployment. Do I need to modify it?Or Kube proxy and coredns?

I also found a problem. When deleting the service endpoint, I can access the service through clusterip: curl (52) empty reply from server
However, when the endpoint exists, I can access the service directly through podid, but I cannot access the service through clusterip

The service whose cluster ip is 10.96.0.1 is a very special service. This is a service automatically created by k8s to access the kube apiserver. It is also an external service, and if you want to access it at the edge, some additional configuration is required.
Let's start with some simple services, you can refer to edgemesh's test case: https://edgemesh.netlify.app/guide/test-case.html
The service whose cluster ip is 10.96.0.1 is a very special service. This is a service automatically created by k8s to access the kube apiserver. It is also an external service, and if you want to access it at the edge, some additional configuration is required.
I deployed the joint inference service of Sedna. Edge needs to access port 5000 of cloud, but it cannot be accessed through clusterip. DNS resolution is normal In the service test case, I deployed TCP test, and the service endpoint was deployed on edge node The pod in edge can be accessed, but the pod in cloud cannot
cross-edge-cloud test failed, and no other services were tested. It is certain that there is a problem with Edge and cloud communication. Can you infer the cause of the problem?
@seven-07-11 How to fix your problem:
CLOUD_NODE="cloud-node-name"
EDGE_NODE="edge-node-name"
kubectl create -f - <<EOF
apiVersion: sedna.io/v1alpha1
kind: JointInferenceService
metadata:
name: helmet-detection-inference-example
namespace: default
spec:
edgeWorker:
model:
name: "helmet-detection-inference-little-model"
hardExampleMining:
name: "IBT"
parameters:
- key: "threshold_img"
value: "0.9"
- key: "threshold_box"
value: "0.9"
template:
spec:
nodeName: $EDGE_NODE
dnsPolicy: ClusterFirstWithHostNet <----------- LOOK AT HERE!!!
containers:
- image: kubeedge/sedna-example-joint-inference-helmet-detection-little:v0.3.0
imagePullPolicy: IfNotPresent
name: little-model
env: # user defined environments
- name: input_shape
value: "416,736"
- name: "video_url"
value: "rtsp://localhost/video"
- name: "all_examples_inference_output"
value: "/data/output"
- name: "hard_example_cloud_inference_output"
value: "/data/hard_example_cloud_inference_output"
- name: "hard_example_edge_inference_output"
value: "/data/hard_example_edge_inference_output"
resources: # user defined resources
requests:
memory: 64M
cpu: 100m
limits:
memory: 2Gi
volumeMounts:
- name: outputdir
mountPath: /data/
volumes: # user defined volumes
- name: outputdir
hostPath:
# user must create the directory in host
path: /joint_inference/output
type: Directory
cloudWorker:
model:
name: "helmet-detection-inference-big-model"
template:
spec:
nodeName: $CLOUD_NODE
containers:
- image: kubeedge/sedna-example-joint-inference-helmet-detection-big:v0.3.0
name: big-model
imagePullPolicy: IfNotPresent
env: # user defined environments
- name: "input_shape"
value: "544,544"
resources: # user defined resources
requests:
memory: 2Gi
EOF
This is a k8s knowledge, if your pod is a host network, you need to configure dnsPolicy like dnsPolicy: ClusterFirstWithHostNet . You can get more information from the kubernetes docs: https://kubernetes.io/zh/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy
I have a similar issue. Cloud -> Edge connection is okay, but edge -> cloud works only for resolving and that is all. After that I've just an error: Connection closed by foreign host