Suggestions for getting started (#3578)

* Suggestions for getting started

* tweaks

* fix notes

* Update mkdocs.yml

remove whitespace

* Update install-serving-eventing.md

Fixing admonitions formatting

Co-authored-by: Omer B <obensaadon@vmware.com>
This commit is contained in:
Ashleigh Brennan 2021-05-18 09:17:15 -05:00 committed by GitHub
parent 25abbf58bf
commit d7a525badc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 99 additions and 94 deletions

View File

@ -0,0 +1,11 @@
# Before you begin
Before you can get started with Knative you must set up a development environment.
## Set up a development cluster
You can use [`kind`](https://kind.sigs.k8s.io/docs/user/quick-start){target=_blank} (Kubernetes in Docker) to run a local Kubernetes cluster with Docker container nodes.
## Install the Kubernetes CLI
The [Kubernetes CLI (`kubectl`)](https://kubernetes.io/docs/tasks/tools/install-kubectl){target=_blank}, allows you to run commands against Kubernetes clusters. You can use `kubectl` to deploy applications, inspect and manage cluster resources, and view logs.

View File

@ -1,93 +0,0 @@
# Before you begin
## Prerequisites
### Install `kind`.
`kind` (Kubernetes in Docker) is a tool for running local Kubernetes clusters using Docker container “nodes”. `kind` was primarily designed for testing Kubernetes itself, but may be used for local development.
See [Kind website](https://kind.sigs.k8s.io/docs/user/quick-start){target=_blank} for installation options.
### Install `kubectl`
The Kubernetes command-line tool, kubectl, allows you to run commands against Kubernetes clusters. You can use kubectl to deploy applications, inspect and manage cluster resources, and view logs.
See [the Kubernetes docs](https://kubernetes.io/docs/tasks/tools/install-kubectl){target=_blank} for installation options.
### Install `kn`
==**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.
!!! todo "Installing the `kn` CLI"
=== "Using Homebrew"
For macOS, you can install `kn` by using <a href="https://github.com/knative/homebrew-client" target="_blank">Homebrew</a>.
```
brew install knative/client/kn
```
=== "Using a binary"
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 <a href="https://github.com/knative/client/releases" target="_blank">`kn` release page</a>.
=== "Installing kn using Go"
1. Check out the `kn` 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
```
=== "Running kn using container images"
**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:
- <a href="https://gcr.io/knative-releases/knative.dev/client/cmd/kn" target="_blank">Latest release</a>
- <a href="https://gcr.io/knative-nightly/knative.dev/client/cmd/kn" target="_blank">Nightly container image</a>
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`.
For more complex installations, such as nightly releases, see [Install `kn`](../client/install-kn.md)
## Installing Knative (sandbox)
==**The fastest way to get started with Knative locally** is to use a Knative on Kind (konk)==
!!! todo "Install Knative and Kubernetes on a local Docker Daemon using Konk"
```
curl -sL install.konk.dev | bash
```
??? question "What does the KonK script actually do?"
Knative on Kind (KonK) is a shell script which:
1. Checks to see that you have Kind installed and creates a Cluster called "knative" via **[`01-kind.sh`](https://github.com/csantanapr/knative-kind/blob/master/01-kind.sh)**
2. Installs **Knative Serving** with **Kourier** as the networking layer and **nip.io** as the DNS + some port-forwarding magic on the "knative" Cluster via **[`02-serving.sh`](https://github.com/csantanapr/knative-kind/blob/master/02-serving.sh)**
3. Installs **Knative Eventing** with an In-Memory **Channels** and In-Memory **Broker** on the "knative" Cluster via **[`04-eventing.sh`](https://github.com/csantanapr/knative-kind/blob/master/04-eventing.sh)**

View File

@ -0,0 +1,79 @@
# 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`):
!!! todo "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:
1. Checks if you have `kind` installed, and creates a cluster called `knative`.
1. Installs Knative Serving with Kourier as the default networking layer, and nip.io as the DNS.
1. 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.
!!! todo "Installing the `kn` CLI"
=== "Using Homebrew"
For macOS, you can install `kn` by using <a href="https://github.com/knative/homebrew-client" target="_blank">Homebrew</a>.
```
brew install knative/client/kn
```
=== "Using a binary"
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 <a href="https://github.com/knative/client/releases" target="_blank">`kn` release page</a>.
=== "Using Go"
1. Check out the `kn` 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
```
=== "Using a container image"
!!! 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:
- <a href="https://gcr.io/knative-releases/knative.dev/client/cmd/kn" target="_blank">Latest release</a>
- <a href="https://gcr.io/knative-nightly/knative.dev/client/cmd/kn" target="_blank">Nightly container image</a>
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`](../../client/install-kn)

View File

@ -33,6 +33,13 @@
width: auto;
}
/**Modify H1**/
.md-typeset h1 {
margin: 1em 0 0.75em;
}
.md-typeset > h1:first-of-type {
margin: 0 0 0.75em;
.md-version__list li:nth-last-child(1) a {
color: gray;
}

View File

@ -10,7 +10,8 @@ edit_uri: edit/main/docs
nav:
- Home: index.md
- Getting Started:
- Before you begin: getting-started/getting-started.md
- Before you begin: getting-started/README.md
- Install Knative: getting-started/install-serving-eventing.md
- Serverless:
- First Knative Service: getting-started/first-service.md
- Scaling to Zero: getting-started/first-autoscale.md