Skip to content

Commit 3ebc1ec

Browse files
authored
Improve "Installing the Knative CLI" (#2230)
* Make `install kn with Go` more detailed. * Give example on how to run kn using container.
1 parent 80f7c12 commit 3ebc1ec

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

docs/install/install-kn.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,26 @@ To install the `kn` Client, you must download the executable binary for your sys
2626

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

29+
## Install `kn` using Go
30+
**Prerequisite:** Building `kn` requires Go v1.14 or newer. You will first need a working Go environment.
31+
1. Check out the [Client repository](https://github.com/knative/client):
32+
```bash
33+
git clone https://github.com/knative/client.git
34+
cd client/
35+
```
36+
1. Build an executable binary:
37+
```bash
38+
hack/build.sh -f
39+
```
40+
1. Move `kn` into your system path, and verify that `kn` commands are working properly. For example:
41+
```bash
42+
kn version
43+
```
44+
45+
## Install `kn` using brew
46+
47+
For macOs, you can [install kn using brew.](https://github.com/knative/homebrew-client)
48+
2949
## `kn` container images
3050

3151
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](https://github.com/tektoncd/catalog/tree/master/kn).
@@ -34,3 +54,16 @@ Links to either the nightly container image or the latest stable container image
3454

3555
- [Nightly container image](https://gcr.io/knative-nightly/knative.dev/client/cmd/kn)
3656
- [Latest release](https://gcr.io/knative-releases/knative.dev/client/cmd/kn)
57+
58+
You can run `kn` from a container image. For example:
59+
```bash
60+
docker run --rm -v "$HOME/.kube/config:/root/.kube/config" gcr.io/knative-releases/knative.dev/client/cmd/kn:latest service list
61+
```
62+
63+
## Using `kn` with Tekton
64+
65+
You can also [run kn using Tekton](https://github.com/tektoncd/catalog/tree/master/kn).
66+
67+
## What's next
68+
To learn more about using `kn`, see the [documentation](https://github.com/knative/client/blob/master/docs/cmd/kn.md).
69+

0 commit comments

Comments
 (0)