Installing the Knative CLI

This guide provides details about how you can install the Knative kn client (CLI) using various methods.

Install kn using an executable binary

To install the kn Client, you must download the executable binary for your system. Links to the latest stable executable binary releases are available on the kn release page.

You must place the executable binary in your system path, and make sure that it is executable.

Install kn using nightly executable binary

Nightly executable binaries are available for users who want to install the most recent pre-release features of kn. These binaries include all kn features, even those not included in the latest stable release.

WARNING: Nightly executable binaries include features which may not be included in the latest stable Knative release, and are therefore not considered to be stable.

To install the kn Client, you must download the executable binary for your system. Links to the latest nightly executable binaries are available here:

You must place the executable binary in your system path, and make sure that it is executable.

Install kn using Go

Prerequisite: Building kn requires Go v1.14 or newer. You will first need a working Go environment.

  1. Check out the Client repository:
git clone https://github.com/knative/client.git
cd client/
  1. Build an executable binary:
hack/build.sh -f
  1. Move kn into your system path, and verify that kn commands are working properly. For example:
kn version

Install kn using brew

For macOs, you can install kn using brew.

kn container images

The kn container images are available for users who require these for additional use cases. For example, if you want to use the kn container image with Tekton.

Links to either the nightly container image or the latest stable container image are available here:

You can run kn from a container image. For example:

docker run --rm -v "$HOME/.kube/config:/root/.kube/config" gcr.io/knative-releases/knative.dev/client/cmd/kn:latest service list

Using kn with Tekton

You can also run kn using Tekton.

What’s next

To learn more about using kn, see the documentation.