Set up a cluster¶
Create a disposable local kind cluster with Knative Serving and Eventing.
Set this up once for Serving and Eventing; local Functions development does not
need a cluster. For production clusters, see Install and Manage.
Requirements¶
- A running Docker engine.
- A Bash-compatible terminal (on Windows, use WSL 2 with Docker integration).
- At least 3 CPUs, 3 GB of RAM, internet access,
curl, and a free port 80.
Install tools¶
brew install \
kind \
kubectl \
knative/client/kn \
knative-extensions/kn-plugins/quickstart
Download the binary for your OS and architecture (use Linux binaries in
WSL 2), make it executable, and place it on your PATH. Keep
kn-quickstart as the plugin filename so kn can discover it.
| Tool | Download | Name |
|---|---|---|
| kind | kind installation | kind |
| kubectl | kubectl installation | kubectl |
| Knative CLI | kn releases | kn |
| Quickstart plugin | quickstart releases | kn-quickstart |
Create and verify¶
Already have the knative learning cluster ready? Skip cluster creation and
verify your context below. Do not recreate or repurpose a cluster used for other
work.
kn quickstart kind
This creates a kind cluster named knative, installs Serving and Eventing, and
creates example-broker. Confirm your context and default namespace before
running tutorial commands — do not use a production cluster:
kubectl config use-context kind-knative
kubectl config set-context --current --namespace=default
kubectl config current-context
kubectl config view --minify -o jsonpath='{.contexts[0].context.namespace}'; echo
If setup fails, see the Quickstart documentation or get help.
Continue with Try Serving (recommended first), Try Eventing, or Try Functions (jump directly to Deploy to Knative if you have already created and tested your function locally).