Install Knative components¶
Install Knative using the konk script¶
You can get started with a local deployment of Knative by using Knative on Kind (konk):
Install Knative and Kubernetes on a local Docker Daemon using konk
curl -sL install.konk.dev | bash
konk is a shell script that completes the following functions:
- Checks if you have
kindinstalled, and creates a cluster calledknative. - Installs Knative Serving with Kourier as the default networking layer, and nip.io as the DNS.
- Installs Knative Eventing and creates a default broker and channel implementation.
Install the Knative CLI¶
The Knative CLI (kn) provides a quick and easy interface for creating Knative resources such as Knative services and event sources, without the need to create or modify YAML files directly. kn also simplifies completion of otherwise complex procedures such as autoscaling and traffic splitting.
Installing the kn CLI
For macOS, you can install kn by using Homebrew.
brew install knative/client/kn
You can install kn by downloading the executable binary for your system and placing it in the system path.
A link to the latest stable binary release is available on the kn release page.
-
Check out the
knclient repository:git clone https://github.com/knative/client.git cd client/ -
Build an executable binary:
hack/build.sh -f -
Move
kninto your system path, and verify thatkncommands are working properly. For example:kn version
Warning
Nightly container images include features which may not be included in the latest Knative release and are not considered to be stable.
Links to images 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
Note
Running kn from a container image does not place the binary on a permanent path. This procedure must be repeated each time you want to use kn.
Note
For more complex installations, such as nightly releases, see Install kn