Getting Started

    The fastest way to get started using Envoy is . You can also build it from source.

    These examples use the , but use only the static configuration feature of the API, which is most useful for simple requirements. For more complex requirements Dynamic Configuration is supported.

    These instructions run from files in the Envoy repo. The sections below give a more detailed explanation of the configuration file and execution steps for the same configuration.

    A very minimal Envoy configuration that can be used to validate basic plain HTTP proxying is available in . This is not intended to represent a realistic Envoy deployment:

    The Docker image used will contain the latest version of Envoy and a basic Envoy configuration. This basic configuration tells Envoy to route incoming requests to *.google.com.

    The admin message is required to configure the administration server. The address key specifies the listening which in this case is simply 0.0.0.0:9901.

    1. access_log_path: /tmp/admin_access.log
    2. address:
    3. socket_address: { address: 0.0.0.0, port_value: 9901 }

    The static_resources contains everything that is configured statically when Envoy starts, as opposed to the means of configuring resources dynamically when Envoy is running. The describes this.

    1. static_resources:

    The specification of the listeners.

    The specification of the .

    1. clusters:
    2. - name: service_google
    3. connect_timeout: 0.25s
    4. type: LOGICAL_DNS
    5. # Comment out the following line to test on v6 networks
    6. lb_policy: ROUND_ROBIN
    7. load_assignment:
    8. cluster_name: service_google
    9. endpoints:
    10. - lb_endpoints:
    11. - endpoint:
    12. socket_address:
    13. address: www.google.com
    14. transport_socket:
    15. name: envoy.transport_sockets.tls
    16. typed_config:
    17. "@type": type.googleapis.com/envoy.api.v2.auth.UpstreamTlsContext
    18. sni: www.google.com

    Create a simple Dockerfile to execute Envoy, which assumes that envoy.yaml (described above) is in your local directory. You can refer to the Command line options.

    1. FROM envoyproxy/envoy:v1.13.0
    2. COPY envoy.yaml /etc/envoy/envoy.yaml

    And now you can execute it with:

    1. $ docker run -d --name envoy -p 9901:9901 -p 10000:10000 envoy:v1

    And finally, test it using:

    1. $ curl -v localhost:10000

    If you would like to use Envoy with docker-compose you can overwrite the provided configuration file by using a volume.

    We’ve created a number of sandboxes using Docker Compose that set up different environments to test out Envoy’s features and show sample configurations. As we gauge peoples’ interests we will add more sandboxes demonstrating different features. The following sandboxes are available:

    In addition to the proxy itself, Envoy is also bundled as part of several open source distributions that target specific use cases.