.. _start_quick_start_dynamic_filesystem: Configuration: Dynamic from filesystem ====================================== You can start Envoy with dynamic configuration by using files that implement the :ref:`xDS ` protocol. When the files are changed on the filesystem, Envoy will automatically update its configuration. At a minimum, you will need to start Envoy configured with the following sections: - :ref:`node ` to uniquely identify the proxy node. - :ref:`dynamic_resources ` to tell Envoy where to find its dynamic configuration. For the given example you will also need two dynamic configuration files: - :ref:`lds.yaml ` for listeners. - :ref:`cds.yaml ` for clusters. You can also add an :ref:`admin ` section if you wish to monitor Envoy or retrieve stats or configuration information. The following sections walk through the dynamic configuration provided in the :download:`demo dynamic filesystem configuration file <_include/envoy-dynamic-filesystem-demo.yaml>`. .. _start_quick_start_dynamic_fs_node: ``node`` -------- The :ref:`node ` should specify ``cluster`` and ``id``. .. literalinclude:: _include/envoy-dynamic-filesystem-demo.yaml :language: yaml :linenos: :lines: 1-5 :emphasize-lines: 1-3 .. _start_quick_start_dynamic_fs_dynamic_resources: ``dynamic_resources`` --------------------- The :ref:`dynamic_resources ` specify where to load dynamic configuration from. In this example, the configuration is provided by the ``yaml`` files set below. .. literalinclude:: _include/envoy-dynamic-filesystem-demo.yaml :language: yaml :linenos: :lines: 3-11 :lineno-start: 3 :emphasize-lines: 3-7 .. _start_quick_start_dynamic_fs_dynamic_lds: ``resources`` - listeners ~~~~~~~~~~~~~~~~~~~~~~~~~ The linked ``lds_config`` should be an implementation of a :ref:`Listener discovery service (LDS) `. The following example of a :download:`dynamic LDS file <_include/envoy-dynamic-lds-demo.yaml>`, configures an ``HTTP`` :ref:`listener ` on port ``10000``. All domains and paths are matched and routed to the ``service_envoyproxy_io`` cluster. The ``host`` headers are rewritten to ``www.envoyproxy.io`` .. literalinclude:: _include/envoy-dynamic-lds-demo.yaml :language: yaml :linenos: :emphasize-lines: 6-7, 20-21, 24, 26-27 .. _start_quick_start_dynamic_fs_dynamic_cds: ``resources`` - clusters ~~~~~~~~~~~~~~~~~~~~~~~~ The linked ``cds_config`` should be an implementation of a :ref:`Cluster discovery service (CDS) `. In the following example of a :download:`dynamic CDS file <_include/envoy-dynamic-cds-demo.yaml>`, the ``example_proxy_cluster`` :ref:`cluster ` proxies over ``TLS`` to https://www.envoyproxy.io. .. literalinclude:: _include/envoy-dynamic-cds-demo.yaml :language: yaml :linenos: :emphasize-lines: 11, 17-18, 22-23