Installing Linkerd is simple and easy to do in a Kubernetes cluster. It begins with the installation of the Linkerd CLI, which is used to install Linkerd in a Kubernetes environment. At the time of writing, Linkerd 2.6.0 is the latest stable version, and we will use this version so that we're consistent with the exercises that we will be performing to understand and learn about Linkerd. Follow these steps to install Linkerd:
- Visit https://github.com/linkerd/linkerd2/releases to check the latest releases of Linkerd.
- Run the following command to list the Linkerd releases:
$ curl -Ls https://api.github.com/repos/linkerd/linkerd2/releases | grep tag_name
You will see stable-2.6.0 release in the list, and that is what we will use in this chapter to install Linkerd.
- Run the following command to install the Linkerd CLI in the VM environment:
$ cd ## Switch to the home directory
$ export LINKERD2_VERSION=stable-2.6.0
$ curl -s -L https://run.linkerd.io/install | sh -
- The preceding curl command will download the specific version defined by LINKERD2_VERSION environment variable:
Download complete!, validating checksum...
Checksum valid.
Linkerd was successfully installed
Add the linkerd CLI to your path with:
export PATH=$PATH:$HOME/.linkerd2/bin
Now run:
linkerd check --pre # validate that Linkerd can --
-- be installed
linkerd install | kubectl apply -f - # install the control plane --
-- into the 'linkerd' namespace
linkerd check # validate everything worked!
linkerd dashboard # launch the dashboard
Looking for more? Visit https://linkerd.io/2/next-steps
- Before running any of the pre-checks, edit and source your local .bashrc file and add linkerd2 to the path:
$ vi ~/.bashrc
## Add these two lines
export LINKERD2_VERSION=stable-2.6.0
export PATH=$PATH:$HOME/.linkerd2/bin
$ source ~/.bashrc
- Validate Linkerd's client version:
$ linkerd version
Client version: stable-2.6.0
Server version: unavailable
You will notice that the server version is unavailable. This is because the control plane hasn't been installed yet. Now that we have installed the CLI, let's go ahead and install Linkerd.