Install Envoy Proxy on Ubuntu 22.04

This article is going to teach you how to Install Envoy Proxy on Ubuntu 22.04. Envoy Proxy is a modern edge and service proxy with a small footprint and outstanding performance. Software load balancers like NGINX and HAProxy are most equivalent to Envoy. Envoy, which was developed and implemented at Lyft, currently has a large community of contributors and is an official Cloud Native Computing Foundation project.

How to Install Envoy Proxy on Ubuntu 22.04

  • To Install Envoy Proxy on Ubuntu 22.04, start by updating and upgrading your system using the following command.
sudo apt -y update && sudo apt -y upgrade
  • Next Install the dependencies for Envoy proxy server which are required for it to work properly.
sudo apt install apt-transport-https gnupg2 curl lsb-release
  • Then import the GPG key used for signing APT packages.
curl -sL 'https://deb.dl.getenvoy.io/public/gpg.8115BA8E629CC074.key' | sudo gpg --dearmor -o /usr/share/keyrings/getenvoy-keyring.gpg
  • Use the echo command below to check if the key is signed, if everything went well it should respond with OK.
echo a077cb587a1b622e03aa4bf2f3689de14658a9497a9af2c427bba5f4cc3c4723 /usr/share/keyrings/getenvoy-keyring.gpg | sha256sum --check
  • Update the changes by running system updates once more.
 sudo apt update
  • After updating your system, add the key to your system using the following command.
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/getenvoy-keyring.gpg] https://deb.dl.getenvoy.io/public/deb/ubuntu $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/getenvoy.list

Install Envoy Proxy on Ubuntu 22.04

  • Finally, use the command below to install Envoy Proxy on Ubuntu 22.04.
sudo apt install getenvoy-envoy -y

Sample output

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  galera-4 libaio1 libconfig-inifiles-perl
  libdbd-mariadb-perl libfprint-2-tod1
  libhtml-template-perl libmariadb3 libpmem1
  libreadline5 libterm-readkey-perl
  mariadb-client-10.7 mariadb-client-core-10.7
  mariadb-common mariadb-server-10.7
  mariadb-server-core-10.7 mongodb-database-tools
  mongodb-mongosh socat
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  getenvoy-envoy
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 16.5 MB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 https://deb.dl.getenvoy.io/public/deb/ubuntu focal/main amd64 getenvoy-envoy amd64 1.18.2.p0.gd362e79-1p75.g76c310e [16.5 MB]
Fetched 16.5 MB in 13s (1,317 kB/s)                  
Selecting previously unselected package getenvoy-envoy
.
(Reading database ... 218982 files and directories cur
rently installed.)
Preparing to unpack .../getenvoy-envoy_1.18.2.p0.gd362
e79-1p75.g76c310e_amd64.deb ...
Unpacking getenvoy-envoy (1.18.2.p0.gd362e79-1p75.g76c
310e) ...
Setting up getenvoy-envoy (1.18.2.p0.gd362e79-1p75.g76
c310e) ...
  • You can check the version you installed using the command below.
envoy --version
  • List some of Envoy commands.
envoy --help

Sample output

USAGE: 

   envoy  [--enable-core-dump] [--socket-mode ] [--socket-path
          ] [--disable-extensions ] [--cpuset-threads]
          [--enable-mutex-tracing] [--disable-hot-restart] [--mode
          ] [--parent-shutdown-time-s ] [--drain-strategy
          ] [--drain-time-s ] [--file-flush-interval-msec
          ] [--service-zone ] [--service-node ]
          [--service-cluster ] [--hot-restart-version]
          [--restart-epoch ] [--log-path ]
          [--enable-fine-grain-logging] [--log-format-escaped]
          [--log-format ] [--component-log-level ] [-l
          ] [--local-address-ip-version ]
          [--admin-address-path ] [--ignore-unknown-dynamic-fields]
          [--reject-unknown-dynamic-fields] [--allow-unknown-static-fields]
          [--allow-unknown-fields] [--bootstrap-version ]
          [--config-yaml ] [-c ] [--concurrency ]
          [--base-id-path ] [--use-dynamic-base-id] [--base-id
          ] [--] [--version] [-h]


Where: 

   --enable-core-dump
     Enable core dumps

   --socket-mode 
     Socket file permission

   --socket-path 
     Path to hot restart socket file

   --disable-extensions 
     Comma-separated list of extensions to disable

   --cpuset-threads
     Get the default # of worker threads from cpuset size

   --enable-mutex-tracing
     Enable mutex contention tracing functionality

   --disable-hot-restart
     Disable hot restart functionality

   --mode 
     One of 'serve' (default; validate configs and then serve traffic
     normally) or 'validate' (validate configs and exit).

   --parent-shutdown-time-s 
     Hot restart parent shutdown time in seconds

   --drain-strategy 
     Hot restart drain sequence behaviour, one of 'gradual' (default) or
     'immediate'.

   --drain-time-s 
     Hot restart and LDS removal drain time in seconds

   --file-flush-interval-msec 
     Interval for log flushing in msec

   --service-zone 
     Zone name

   --service-node 
     Node name

   --service-cluster 
     Cluster name

   --hot-restart-version
     hot restart compatibility version

   --restart-epoch 
     hot restart epoch #

   --log-path 
     Path to logfile

   --enable-fine-grain-logging
     Logger mode: enable file level log control(Fancy Logger)or not

   --log-format-escaped
     Escape c-style escape sequences in the application logs

   --log-format 
     Log message format in spdlog syntax (see
     https://github.com/gabime/spdlog/wiki/3.-Custom-formatting)

     Default is "[%Y-%m-%d %T.%e][%t][%l][%n] [%g:%#] %v"

   --component-log-level 
     Comma separated list of component log levels. For example
     upstream:debug,config:trace

   -l ,  --log-level 
     Log levels: [trace][debug][info][warning
     |warn][error][critical][off]

     Default is [info]

   --local-address-ip-version 
     The local IP address version (v4 or v6).

   --admin-address-path 
     Admin address path

   --ignore-unknown-dynamic-fields
     ignore unknown fields in dynamic configuration

   --reject-unknown-dynamic-fields
     reject unknown fields in dynamic configuration

   --allow-unknown-static-fields
     allow unknown fields in static configuration

   --allow-unknown-fields
     allow unknown fields in static configuration (DEPRECATED)

   --bootstrap-version 
     API version to parse the bootstrap config as (e.g. 3). If unset, all
     known versions will be attempted

   --config-yaml 
     Inline YAML configuration, merges with the contents of --config-path

   -c ,  --config-path 
     Path to configuration file

   --concurrency 
     # of worker threads to run

   --base-id-path 
     path to which the base ID is written

   --use-dynamic-base-id
     the server chooses a base ID dynamically. Supersedes a static base ID.
     May not be used when the restart epoch is non-zero.

   --base-id 
     base ID so that multiple envoys can run on the same host if needed

   --,  --ignore_rest
     Ignores the rest of the labeled arguments following this flag.

   --version
     Displays version information and exits.

   -h,  --help
     Displays usage information and exits.


   envoy
  • You have reached the end of the article, Congratulations. You have learned how to install Envoy Proxy on Ubuntu 22.04.

Getting Started with Envoy Proxy

Check the documentation page on how to get started with Envoy proxy.

Other Tutorials

Install Squid Proxy on Ubuntu 22.04

Install VeraCrypt on Ubuntu 22.04

Encrypt data using EncFS on Ubuntu 22.04

System administrator | Software Developer | DevOps

Leave a Comment