How to install asdf core and istio plugin on ubuntu

ยท

2 min read

Introduction

asdf is a command-line interface tool, or CLI tool, for managing different runtime versions across multiple programming languages. It brings all the runtimes together under one configuration file and uses a plugin system to manage everything with a single tool.

Official Guide it from here.

https://asdf-vm.com/guide/getting-started.html

In this tutorial, we will install the asdf core and the istio plugin on ubuntu. After that weโ€™ll manage multiple Istio clusters running different versions of Istio, itโ€™s easy to mess up the client and run with the wrong istioctl for the target cluster.

If you donโ€™t want to spend a few hours debugging an issue to find that you werenโ€™t used the right version of istioctl.

1. Install Dependencies

asdf primarily requires git & curl

OSPackage ManagerCommand
linuxAptitudeapt install curl git
linuxDNFdnf install curl git
linuxPacmanpacman -S curl git
linuxZypperzypper install curl git
macOSHomebrewbrew install coreutils curl git
macOSSpackspack install coreutils curl git

2. Download asdf

Official Download

git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.0

By default, Ubuntu uses Bash for its shell, which uses the ~/.bashrc file for configuration and customization. To enable the usage of the asdf command, you will have to add the following line:

echo ". $HOME/.asdf/asdf.sh" >> ~/.bashrc

Next, make sure your changes are applied to your current session:

source ~/.bashrc

3. To install istio plugin with asdf

asdf plugin-add istio https://github.com/solo-io/asdf-istio

4. List Installable Istio versions

asdf list-all istio

aungaung@noobops-pc:~$ asdf list-all istio 1.19.9 1.19.10 1.20.4 1.20.5 1.20.6 1.21.0 1.21.1 1.21.2

5. Download and install specific versions

asdf install istio 1.19.10

asdf install istio 1.20.6

asdf install istio 1.21.2

Untitled

6. Use

To make our Istio/Kubernetes projects use a specific version of Istio

asdf global istio 1.21.2

How to add plugins and List All in Short-name Repository

asdf plugin list all

asdf plugin add <name> <git-url>

or asdf plugin add <name>

Untitled

List Installed

aungaung@noobops-pc:~$ asdf plugin list istio kubectl

Remove

asdf plugin remove kubectl

ย