Want to run the Knative CLI tool kn
in Google Cloud’s Cloud Shell? It’s easy:
Download the latest release from github. linux-amd64
is the platform you want for CloudShell. Here I download version 1.3.0:
wget "https://github.com/knative/client/releases/download/knative-v1.3.0/kn-linux-amd64"
Then, move it into place, and add it to your PATH:
chmod +x kn-linux-amd64
mkdir -p .local/bin
mv kn-linux-amd64 .local/bin/kn
echo 'export PATH=".local/bin:$PATH"' >> .bashrc
. .bashrc
[Updated 2024-02-15 with version 1.3.0]