This repository hosts helper tools for the Extensible Service Proxy.
These tools are not official Google products.
This repository hosts tools used by the Extensible Service Proxy:
- helper script for Kubernetes deployment is a Golang command line utility that automates ESP injection as a sidecar container in Kubernetes deployments and configuring the proxy. This script is used by a single-line ESP tutorial, and shows how to use the start-up script.
- obsoleted_start_esp: this folder is obsolete and has been moved to the ESP repository.
ESP command line tool (espcli) lets you try out the Extensible Service Proxy on a Kubernetes cluster using a simple two-step deployment process. ESP CLI depends on kubectl and its active kube configuration. You also need a Google Cloud Platform project.
First, bring up a Kubernetes deployment consisting of echo service and echo pods on your GCP cluster:
kubectl create -f echo_http.yaml
Next, run the following command to inject ESP container into echo pods and create a new service called endpoints:
espcli deploy echo endpoints --project MY_PROJECT -e LoadBalancer
Replace MY_PROJECT above with the name of your GCP project.
Then make a request to the external IP address of endpoints service as follows:
curl -d '{"message":"hello world"}' -H "content-type:application/json" http://ENDPOINTS_IP/echo
Go to the Endpoints UI and see the detailed logging and monitoring information for the newly created API.
We use Bazel to build the ESP tools.
To build espcli, run the following command:
bazel build :espcli
This command fetches all required dependencies and produces a single binary
bazel-bin/espcli. To read more about its usage and flags,
please consult:
bazel run :espcli -- help
Your contributions are welcome. Please follow the contributor guidelines.