Suggested improvements for getting started (#4979)

* Suggested improvements for getting started

* fix typo
This commit is contained in:
Ashleigh Brennan 2022-05-27 15:30:29 -05:00 committed by GitHub
parent 9aa8a46565
commit 964cedba45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 144 additions and 155 deletions

View File

@ -1,15 +1,31 @@
# Welcome to the Knative Quickstart tutorial
This tutorial lets you try out some of the commonly used features in Knative.
Following this Quickstart tutorial provides you with a simplified, local Knative installation by using the Knative `quickstart` plugin.
In the first lesson you will install Knative locally using the Knative `quickstart` plugin.
To follow the tutorial you must use the `quickstart` plugin to install Knative.
The plugin provides a Knative deployment for development use, which has
been configured with the components you need for this tutorial.
You can use this simple Knative deployment to try out commonly used features of **Knative Serving** and **Knative Eventing**.
Then, on your new cluster, you will carry out common tasks for **Knative Serving** and **Knative Eventing**.
!!! warning
Knative `quickstart` environments are for experimentation use only.
For a production ready installation, see the [YAML-based installation](/docs/install/yaml-install/)
or the [Knative Operator installation](/docs/install/operator/knative-with-operators/).
We recommend that you complete the topics in this tutorial in order.
## Before you begin
Before you can get started with a Knative `quickstart` deployment you must install:
- [kind](https://kind.sigs.k8s.io/docs/user/quick-start){target=_blank} (Kubernetes in Docker)
or [minikube](https://minikube.sigs.k8s.io/docs/start/){target=_blank} to enable
you to run a local Kubernetes cluster with Docker container nodes.
- The [Kubernetes CLI (`kubectl`)](https://kubernetes.io/docs/tasks/tools/install-kubectl){target=_blank} to run commands against Kubernetes clusters. You can use `kubectl` to deploy applications, inspect and manage cluster resources, and view logs.
- The Knative CLI (`kn`). For instructions, see the next section.
- You need to have a minimum of 3 CPUs and 3 GB of RAM available for the cluster to be created.
!!! tip
Hit ++"."++ (period) on your keyboard to move forward in the tutorial. Use ++","++ (comma) to go back at any time.
<!--TODO: This tip only applies for users using a keyboard, i.e. not great for responsive design, since it doesn't work for users on mobile devices. Should we remove it or have it only appear on certain devices? Is responsive design really possible using mkdocs?-->

View File

@ -1,11 +1,11 @@
# Introducing the Knative Eventing
# Introducing Knative Eventing
With Knative Serving, we have a powerful tool which can take our containerized code and deploy it with relative ease. **With Knative Eventing, you gain a few new super powers :rocket:** that allow you to build **Event-Driven Applications**.
Knative Eventing provides you with helpful tools that can be used to create event-driven applications, by easily attaching event sources, triggers, and other options to your Knative Services.
??? question "What are Event Driven Applications?"
Event-driven applications are designed to detect events as they occur, and then deal with them using some event-handling procedure. Producing and consuming events with an "event-handling procedure" is precisely what Knative Eventing enables.
Event-driven applications are designed to detect events as they occur, and process these events by using user-defined, event-handling procedures.
Want to find out more about Event-Driven Architecture and Knative Eventing? Check out this CNCF Session aptly named ["Event-driven architecture with Knative events"](https://www.cncf.io/online-programs/event-driven-architecture-with-knative-events/){target=blank}
!!! tip
To find out more about event-driven architecture and Knative Eventing, check out this CNCF Session about [event-driven architecture with Knative events](https://www.cncf.io/online-programs/event-driven-architecture-with-knative-events/){target=blank}
## Knative Eventing examples

View File

@ -1,6 +1,120 @@
--8<-- "quickstart-install.md"
# Install the Knative CLI
--8<-- "install-kn.md"
# Install the Knative quickstart plugin
To get started, install the Knative `quickstart` plugin:
=== "Using Homebrew"
Do one of the following:
- To install the `quickstart` plugin by using [Homebrew](https://brew.sh){target=_blank}, run the command (Use `brew upgrade` instead if you are upgrading from a previous version):
```bash
brew install knative-sandbox/kn-plugins/quickstart
```
=== "Using a binary"
1. Download the binary for your system from the [`quickstart` release page](https://github.com/knative-sandbox/kn-plugin-quickstart/releases){target=_blank}.
1. Rename the file to remove the OS and architecture information. For example, rename `kn-quickstart-amd64` to `kn-quickstart`.
1. Make the plugin executable. For example, `chmod +x kn-quickstart`.
1. Move the executable binary file to a directory on your `PATH`, for example, in `/usr/local/bin`.
1. Verify that the plugin is working by running the command:
```bash
kn quickstart --help
```
=== "Using Go"
1. Check out the `kn-plugin-quickstart` repository:
```bash
git clone https://github.com/knative-sandbox/kn-plugin-quickstart.git
cd kn-plugin-quickstart/
```
1. Build an executable binary:
```bash
hack/build.sh
```
1. Move the executable binary file to a directory on your `PATH`:
```bash
mv kn-quickstart /usr/local/bin
```
1. Verify that the plugin is working by running the command:
```bash
kn quickstart --help
```
# Run the Knative quickstart plugin
The `quickstart` plugin completes the following functions:
1. **Checks if you have the selected Kubernetes instance installed**
1. **Creates a cluster called `knative`**
1. **Installs Knative Serving** with Kourier as the default networking layer, and sslip.io as the DNS
1. **Installs Knative Eventing** and creates an in-memory Broker and Channel implementation
To get a local deployment of Knative, run the `quickstart` plugin:
=== "Using kind"
1. Install Knative and Kubernetes using [kind](https://kind.sigs.k8s.io/docs/user/quick-start/#installation) by running:
```bash
kn quickstart kind
```
1. After the plugin is finished, verify you have a cluster called `knative`:
```bash
kind get clusters
```
=== "Using minikube"
1. Install Knative and Kubernetes in a [minikube](https://minikube.sigs.k8s.io/docs/start/) instance by running:
!!! note
The minikube cluster will be created with 6&nbsp;GB of RAM. If you don't have enough memory, you can change to a
different value not lower than 3&nbsp;GB by running the command `minikube config set memory 3078` before this command.
```bash
kn quickstart minikube
```
1. The output of the previous command asked you to run minikube tunnel.
Run the following command to start the process in a secondary terminal window, then return to the primary window and press enter to continue:
```bash
minikube tunnel --profile knative
```
The tunnel must continue to run in a terminal window any time you are using your Knative `quickstart` environment.
The tunnel command is required because it allows your cluster to access Knative ingress service as a LoadBalancer from your host computer.
!!! note
To terminate the tunnel process and clean up network routes, enter `Ctrl-C`.
For more information about the `minikube tunnel` command, see the [minikube documentation](https://minikube.sigs.k8s.io/docs/handbook/accessing/#using-minikube-tunnel).
1. After the plugin is finished, verify you have a cluster called `knative`:
```bash
minikube profile list
```
## Next steps
Now you've installed Knative, learn how to deploy your first Service in the
next topic in this tutorial.
Now that you have installed Knative, you can learn how to deploy your first Knative Service in the next topic in this tutorial.

View File

@ -1,141 +0,0 @@
# Install Knative using quickstart
This topic describes how to install a local deployment of Knative Serving and
Eventing using the Knative `quickstart` plugin.
The plugin installs a preconfigured Knative deployment on a local Kubernetes cluster.
!!! warning
Knative `quickstart` environments are for experimentation use only.
For a production ready installation, see the [YAML-based installation](/docs/install/yaml-install/)
or the [Knative Operator installation](/docs/install/operator/knative-with-operators/).
## Before you begin
Before you can get started with a Knative `quickstart` deployment you must install:
- [kind](https://kind.sigs.k8s.io/docs/user/quick-start){target=_blank} (Kubernetes in Docker)
or [minikube](https://minikube.sigs.k8s.io/docs/start/){target=_blank} to enable
you to run a local Kubernetes cluster with Docker container nodes.
- The [Kubernetes CLI (`kubectl`)](https://kubernetes.io/docs/tasks/tools/install-kubectl){target=_blank}
to run commands against Kubernetes clusters.
You can use `kubectl` to deploy applications, inspect and manage cluster resources, and view logs.
- The Knative CLI (`kn`). For instructions, see the next section.
- You need minimum of 3&nbsp;CPUs and 3&nbsp;GB of RAM available for the cluster to be created.
### Install the Knative CLI
--8<-- "install-kn.md"
## Install the Knative quickstart plugin
To get started, install the Knative `quickstart` plugin:
=== "Using Homebrew"
Do one of the following:
- To install the `quickstart` plugin by using [Homebrew](https://brew.sh){target=_blank}, run the command (Use `brew upgrade` instead if you are upgrading from a previous version):
```bash
brew install knative-sandbox/kn-plugins/quickstart
```
=== "Using a binary"
1. Download the binary for your system from the [`quickstart` release page](https://github.com/knative-sandbox/kn-plugin-quickstart/releases){target=_blank}.
1. Rename the file to remove the OS and architecture information. For example, rename `kn-quickstart-amd64` to `kn-quickstart`.
1. Make the plugin executable. For example, `chmod +x kn-quickstart`.
1. Move the executable binary file to a directory on your `PATH`, for example, in `/usr/local/bin`.
1. Verify that the plugin is working by running the command:
```bash
kn quickstart --help
```
=== "Using Go"
1. Check out the `kn-plugin-quickstart` repository:
```bash
git clone https://github.com/knative-sandbox/kn-plugin-quickstart.git
cd kn-plugin-quickstart/
```
1. Build an executable binary:
```bash
hack/build.sh
```
1. Move the executable binary file to a directory on your `PATH`:
```bash
mv kn-quickstart /usr/local/bin
```
1. Verify that the plugin is working by running the command:
```bash
kn quickstart --help
```
## Run the Knative quickstart plugin
The `quickstart` plugin completes the following functions:
1. **Checks if you have the selected Kubernetes instance installed**
1. **Creates a cluster called `knative`**
1. **Installs Knative Serving** with Kourier as the default networking layer, and sslip.io as the DNS
1. **Installs Knative Eventing** and creates an in-memory Broker and Channel implementation
To get a local deployment of Knative, run the `quickstart` plugin:
=== "Using kind"
1. Install Knative and Kubernetes using [kind](https://kind.sigs.k8s.io/docs/user/quick-start/#installation) by running:
```bash
kn quickstart kind
```
1. After the plugin is finished, verify you have a cluster called `knative`:
```bash
kind get clusters
```
=== "Using minikube"
1. Install Knative and Kubernetes in a [minikube](https://minikube.sigs.k8s.io/docs/start/) instance by running:
!!! note
The minikube cluster will be created with 6&nbsp;GB of RAM. If you don't have enough memory, you can change to a
different value not lower than 3&nbsp;GB by running the command `minikube config set memory 3078` before this command.
```bash
kn quickstart minikube
```
1. The output of the previous command asked you to run minikube tunnel.
Run the following command to start the process in a secondary terminal window, then return to the primary window and press enter to continue:
```bash
minikube tunnel --profile knative
```
The tunnel must continue to run in a terminal window any time you are using your Knative `quickstart` environment.
The tunnel command is required because it allows your cluster to access Knative ingress service as a LoadBalancer from your host computer.
!!! note
To terminate the tunnel process and clean up network routes, enter `Ctrl-C`.
For more information about the `minikube tunnel` command, see the [minikube documentation](https://minikube.sigs.k8s.io/docs/handbook/accessing/#using-minikube-tunnel).
1. After the plugin is finished, verify you have a cluster called `knative`:
```bash
minikube profile list
```