Working With Gloo
Gloo Overview:
Gloo serves as a gateway that connects client requests to any backend interface. It serves as the “glue” between clients and their service requests. This makes it able to map REST API to gRPC.
Quicklinks:
-Gloo’s Home Website
-Video Tutorial for Running Gloo
https://medium.com/solo-io/new-in-gloo-connect-json-clients-to-your-grpc-services-4724656ed15f
-Git Tutorial for Gloo
https://github.com/solo-io/gloo/tree/master/example/grpc
-Gloo Basic Steps for mapping HTTP Requests to gRPC
-
Deploy the Service
- Kubectl apply -f <DEPLOYMENT>
-
Create a route for upstream to backend
- Glooctl route create
- --path-exact /REQUEST-NAME
- --http-method METHOD-TYPE (GET, POST, DELETE, .etc)
- --upstream DEPLOYMENT-NAME
- --function NAME-OF-FUNCTION
- Glooctl route create
-
Get URL of Gateway
-
Run curl method in terminal with URL
Upstreams
- https://gloo.solo.io/introduction/concepts/#Upstreams
- Define destinations for routes, to connect gloo to services
- Spec field defines where to route to
- Essential for Gloo architecture
- Created when deploying .yaml files
- https://github.com/solo-io/glooctl
- Gives guides on using upstreams