Edge connection with EdgeMesh

    Check more details at edgemesh website to use EdgeMesh.

    Assume we have two edge nodes in ready state, we call them edge node “a” and “b”:

    Deploy a sample pod from Cloud Side:

    1. deployment.apps/nginx-deployment created

    Check if it works:

    1. $ curl 172.17.0.2
    2. <!DOCTYPE html>
    3. <html>
    4. <head>
    5. <title>Welcome to nginx!</title>
    6. <style>
    7. body {
    8. width: 35em;
    9. margin: 0 auto;
    10. </style>
    11. </head>
    12. <body>
    13. <h1>Welcome to nginx!</h1>
    14. <p>If you see this page, the nginx web server is successfully installed and
    15. working. Further configuration is required.</p>
    16. <p>For online documentation and support please refer to
    17. <a href="https://nginx.org/">nginx.org</a>.<br/>
    18. Commercial support is available at
    19. <a href="https://nginx.com/">nginx.com</a>.</p>
    20. <p><em>Thank you for using nginx.</em></p>
    21. </html>

    172.17.0.2 is the IP of deployment and the output may be different since the version of nginx image is different.

    Then create a service for it:

    1. $ kubectl get service
    2. NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
    3. nginx-svc ClusterIP 10.96.191.183 <none> 12345/TCP 77m
    4. $ kubectl get endpoints
    5. NAME ENDPOINTS AGE
    6. nginx-svc 172.17.0.2:80 81m

    To request a server, use url like this: <service_name>.<service_namespace>.svc.<cluster>.<local>:<port>

    In our case, from edge node a or b, run following command:

    1. One service
    2. One or more pods’ labels match the service’s selector
    3. To request a server, use: :
      • get the service’s name and namespace from domain name
      • LoadBalance returns the real backend containers’ hostIP and hostPort