Skip to content

hermanbanken/k8s-xds

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kubernetes xDS server

This small server can be used for:

  • gRPC client-side Load Balancing
  • Envoy cluster CDS

Configuration in the client (supported clients as of september 2020: C-core, Java & Go) goes like this:

    1. Set the environment variable GRPC_XDS_BOOTSTRAP=/bootstrap.json (doc)
    1. Add this file /bootstrap.json containing these contents:
    {
      "xds_servers": [{
        "server_uri": "xds-server-address:8080"
      }],
      "node": {
        "id": "$HOSTNAME",
        "metadata": {
            "SOME_KEY": "SOME_VALUE"
        },
        "locality": {
            "zone": "europe-west4-a"
        }
      }
    } 
    1. Create the gRPC client like this:
    import (
      _ "google.golang.org/grpc/xds" // To install the xds resolvers and balancers.
    )
    
    grpc.Dial("xds:///upstream-service", grpc.WithInsecure())

References

  1. Guide to the xDS protocol
  2. Original proposal: https://github.com/grpc/proposal/blob/master/A27-xds-global-load-balancing.md
  3. https://itnext.io/proxyless-grpc-load-balancing-in-kubernetes-ca1a4797b742 & https://github.com/asishrs/proxyless-grpc-lb
  4. GoogleBlog: efficient multi-zone and topology aware routing
  5. This is an (more flexible) alternative to the TopologyAwareHints beta-feature in Kubernetes 1.23+
  6. Using xDS v3: server_features <- xds_v3
  7. gRPC xDS Loadbalancing
  8. debug gRPC xDS clients

About

XDS server for Kubernetes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages