diff --git a/docs/install/Knative-with-AKS.md b/docs/install/Knative-with-AKS.md deleted file mode 100644 index 728f8e313..000000000 --- a/docs/install/Knative-with-AKS.md +++ /dev/null @@ -1,219 +0,0 @@ ---- -title: "Install on Azure Kubernetes Service (AKS)" -linkTitle: "Azure Kubernetes Service" -weight: 15 -type: "docs" ---- - -This guide walks you through the installation of the latest version of Knative -using pre-built images. - -You can find [guides for other platforms here](./README.md). - -## Before you begin - -Knative requires a Kubernetes cluster v1.15 or newer, as well as a compatible -`kubectl`. This guide walks you through creating a cluster with the correct -specifications for Knative on Azure Kubernetes Service (AKS). - -This guide assumes you are using bash in a Mac or Linux environment; some -commands will need to be adjusted for use in a Windows environment. - -### Installing the Azure CLI - -1. If you already have `azure cli` version `2.0.41` or later installed, you can - skip to the next section and install `kubectl` - -Install `az` by following the instructions for your operating system. See the -[full installation instructions](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest) -if yours isn't listed below. You will need az cli version 2.0.37 or greater. - -#### MacOS - -```console -brew install azure-cli -``` - -#### Ubuntu 64-bit - -1. Add the azure-cli repo to your sources: - ```console - echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ wheezy main" | \ - sudo tee /etc/apt/sources.list.d/azure-cli.list - ``` -1. Run the following commands to install the Azure CLI and its dependencies: - ```console - sudo apt-key adv --keyserver packages.microsoft.com --recv-keys 52E16F86FEE04B979B07E28DB02C46DF417A0893 - sudo apt-get install apt-transport-https - sudo apt-get update && sudo apt-get install azure-cli - ``` - -### Installing kubectl - -1. If you already have `kubectl`, run `kubectl version` to check your client - version. If the client is within a minor version of the master, then you - can skip to the next section and create an AKS cluster - -```bash -az aks install-cli -``` - -## Cluster Setup - -Now that we have all the tools, we need a Kubernetes cluster to install Knative. - -### Configure your Azure account - -First let's identify your Azure subscription and save it for use later. - -1. Run `az login` and follow the instructions in the command output to authorize - `az` to use your account -1. List your Azure subscriptions: - ```bash - az account list -o table - ``` - -### Create a Resource Group for AKS - -To simplify the command lines for this walkthrough, we need to define a few -environment variables. First determine which region you'd like to run AKS in, -along with the resource group you'd like to use. - -1. Set `RESOURCE_GROUP` and `LOCATION` variables: - - ```bash - export LOCATION=eastus - export RESOURCE_GROUP=knative-group - export CLUSTER_NAME=knative-cluster - ``` - -2. Create a resource group with the az cli using the following command if you - are using a new resource group. - ```bash - az group create --name $RESOURCE_GROUP --location $LOCATION - ``` - -### Create a Kubernetes cluster using AKS - -Next we will create a managed Kubernetes cluster using AKS. To make sure the -cluster is large enough to host all the Knative and Istio components, the -recommended configuration for a cluster is: - -- Kubernetes version 1.15 or later -- Three or more nodes -- Standard_DS3_v2 nodes -- RBAC enabled - -1. Enable AKS in your subscription, use the following command with the az cli: - `bash az provider register -n Microsoft.ContainerService` You should also - ensure that the `Microsoft.Compute` and `Microsoft.Network` providers are - registered in your subscription. If you need to enable them: - `bash az provider register -n Microsoft.Compute az provider register -n Microsoft.Network` -1. Create the AKS cluster! - - ```bash - az aks create --resource-group $RESOURCE_GROUP \ - --name $CLUSTER_NAME \ - --generate-ssh-keys \ - --kubernetes-version 1.15.5 \ - --enable-rbac \ - --node-vm-size Standard_DS3_v2 - ``` - -1. Configure kubectl to use the new cluster. - - ```bash - az aks get-credentials --resource-group $RESOURCE_GROUP --name $CLUSTER_NAME --admin - ``` - -1. Verify your cluster is up and running - ```bash - kubectl get nodes - ``` - -## Installing Istio - -Knative depends on Istio. If your cloud platform offers a managed Istio -installation, we recommend installing Istio that way, unless you need the -ability to customize your installation. - -If you prefer to install Istio manually, if your cloud provider doesn't offer a -managed Istio installation, or if you're installing Knative locally using -Minkube or similar, see the -[Installing Istio for Knative guide](./installing-istio.md). - -You must install Istio on your Kubernetes cluster before continuing with these -instructions to install Knative. - -> Note: [Ambassador](https://www.getambassador.io/), [Contour](https://projectcontour.io/), and -> [Gloo](https://docs.solo.io/gloo/latest/) are available as an alternative to Istio. -> [Click here](./Knative-with-Ambassador.md) to install Knative with Ambassador. -> [Click here](./Knative-with-Contour.md) to install Knative with Contour. -> [Click here](./Knative-with-Gloo.md) to install Knative with Gloo. - -## Installing `cluster-local-gateway` for serving cluster-internal traffic - -If you installed Istio, you can install a `cluster-local-gateway` within your Knative cluster so that you can serve cluster-internal traffic. If you want to configure your revisions to use routes that are visible only within your cluster, [install and use the `cluster-local-gateway`](./installing-istio.md#updating-your-install-to-use-cluster-local-gateway). - -## Installing Knative - -The following commands install all available Knative components. To customize -your Knative installation, see -[Performing a Custom Knative Installation](./Knative-custom-install.md). - -1. To install Knative, first install the CRDs by running the `kubectl apply` - command once with the `--selector knative.dev/crd-install=true` flag. This - prevents race conditions during the install, which cause intermittent errors: - - ```bash - kubectl apply --selector knative.dev/crd-install=true \ - --filename https://github.com/knative/serving/releases/download/{{< version >}}/serving.yaml \ - --filename https://github.com/knative/eventing/releases/download/{{< version >}}/eventing.yaml \ - --filename https://github.com/knative/serving/releases/download/{{< version >}}/monitoring.yaml - ``` - -1. To complete the install of Knative and its dependencies, run the - `kubectl apply` command again, this time without the - `--selector knative.dev/crd-install=true` flag, to complete the install of - Knative and its dependencies: - - ```bash - kubectl apply --filename https://github.com/knative/serving/releases/download/{{< version >}}/serving.yaml \ - --filename https://github.com/knative/eventing/releases/download/{{< version >}}/eventing.yaml \ - --filename https://github.com/knative/serving/releases/download/{{< version >}}/monitoring.yaml - ``` - -1. Monitor the Knative components until all of the components show a `STATUS` of - `Running`: - ```bash - kubectl get pods --namespace knative-serving - kubectl get pods --namespace knative-eventing - kubectl get pods --namespace knative-monitoring - ``` - -## What's next - -Now that your cluster has Knative installed, you can see what Knative has to -offer. - -To deploy your first app with the -[Getting Started with Knative App Deployment](../serving/getting-started-knative-app.md) -guide. - -Get started with Knative Eventing by walking through one of the -[Eventing Samples](../eventing/samples/). - -[Install Cert-Manager](../serving/installing-cert-manager.md) if you want to use the -[automatic TLS cert provisioning feature](../serving/using-auto-tls.md). - -## Cleaning up - -Running a cluster costs money, so you might want to delete the cluster when -you're done if you're not using it. Deleting the cluster will also remove -Knative, Istio, and any apps you've deployed. - -To delete the cluster, enter the following command: - -```bash -az aks delete --resource-group $RESOURCE_GROUP --name $CLUSTER_NAME --yes --no-wait -``` diff --git a/docs/install/Knative-with-Ambassador.md b/docs/install/Knative-with-Ambassador.md deleted file mode 100644 index 90fdbf677..000000000 --- a/docs/install/Knative-with-Ambassador.md +++ /dev/null @@ -1,185 +0,0 @@ ---- -title: "Installing Knative with Ambassador" -linkTitle: "Ambassador API Gateway" -weight: 15 -type: "docs" ---- - -[Ambassador](https://www.getambassador.io/) is a popular Kubernetes-native, -open-source API gateway built on [Envoy Proxy](https://www.envoyproxy.io/). - -This guide walks you through the installation of the latest version of Knative -using pre-built images. - -## Before you Begin - -Knative requires a Kubernetes cluster v1.15 or newer, as well as a compatible `kubectl`. - -This guide assumes that you have already -[created a Kubernetes cluster](https://kubernetes.io/docs/setup/) and are using -bash in a Mac or Linux environment. - -## Install Knative - -First, let's install Knative to manage our serverless applications. - -The following commands install all available Knative components as well as the -standard set of observability plugins. To customize your Knative installation, -see Performing a Custom Knative Installation. - -1. To install Knative, first install the CRDs by running the following `kubectl apply` - command. This prevents race conditions during the install, which cause intermittent errors: - - kubectl apply --filename https://github.com/knative/serving/releases/download/{{< version >}}/serving-crds.yaml - -2. To complete the install of Knative and its dependencies, next run the - following `kubectl apply` command: - - kubectl apply --filename https://github.com/knative/serving/releases/download/{{< version >}}/serving-core.yaml - -3. Monitor the Knative namespaces and wait until all of the pods come up with a - `STATUS` of `Running`: - - ``` - kubectl get pods -w --all-namespaces - ``` - -## Install Ambassador - -Knative was originally built using Istio to handle cluster networking. While the -Istio gateway provides the functionality needed to serve requests to your -application, installing a service mesh just to handle north-south traffic -carries some operational overhead with it. Ambassador provides a way to get -traffic to your Knative application without the overhead or complexity of a full -service mesh. - -You can install Ambassador with `kubectl`: - -1. Create a namespace to install Ambassador in: - - ``` - kubectl create namespace ambassador - ``` - -2. Install Ambassador: - - ``` - kubectl apply --namespace ambassador \ - --filename https://getambassador.io/yaml/ambassador/ambassador-rbac.yaml \ - --filename https://getambassador.io/yaml/ambassador/ambassador-service.yaml - ``` - -3. Give Ambassador the required permissions: - - ``` - kubectl patch clusterrolebinding ambassador -p '{"subjects":[{"kind": "ServiceAccount", "name": "ambassador", "namespace": "ambassador"}]}' - ``` - -4. Enable Knative support in Ambasssador: - - ``` - kubectl set env --namespace ambassador deployments/ambassador AMBASSADOR_KNATIVE_SUPPORT=true - ``` - -## Configuring DNS - -Installing Ambassador will create a Kubernetes Service with type `LoadBalancer`. -This may take some time to get an IP address assigned, during this process it -will appear as ``. You must wait for this IP address to be assigned -before DNS may be set up. - -Get this external IP address with: - -``` -$ kubectl get service ambassador -n ambassador - -NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE -ambassador LoadBalancer 10.59.246.30 35.229.120.99 80:32073/TCP 13m - -``` - -This external IP can be used with your DNS provider with a wildcard `A` record; -however, for a basic functioning DNS setup (not suitable for production!) this -external IP address can be added to the `config-domain` ConfigMap in -`knative-serving`. You can edit this with the following command: - -``` -kubectl edit cm config-domain --namespace knative-serving -``` - -Given the external IP above, change the content to: -``` -apiVersion: v1 -kind: ConfigMap -metadata: - name: config-domain - namespace: knative-serving -data: - # xip.io is a "magic" DNS provider, which resolves all DNS lookups for: - # *.{ip}.xip.io to {ip}. - 35.229.120.99.xip.io: "" -``` - -## Deploying an Application - -Now that Knative and Ambassador are running, you can use them to manage and -route traffic to a serverless application. - -1. Create a `Knative Service` - - For this demo, a simple helloworld application written in go will be used. - Copy the YAML below to a file called `helloworld-go.yaml` and apply it with - `kubectl` - - ```yaml - apiVersion: serving.knative.dev/v1 - kind: Service - metadata: - name: helloworld-go - namespace: default - spec: - template: - spec: - containers: - - image: gcr.io/knative-samples/helloworld-go - env: - - name: TARGET - value: Go Sample v1 - ``` - - ``` - kubectl apply -f helloworld-go.yaml - ``` - -2. Send a request - - `Knative Service`s are exposed via a `Host` header assigned by Knative. By - default, Knative will assign the `Host`: - `{service-name}.{namespace}.{the domain we setup above}`. You can see this - with: - - ``` - $ kubectl get ksvc helloworld-go - NAME URL LATESTCREATED LATESTREADY READY REASON - helloworld-go http://helloworld-go.default.34.83.124.52.xip.io helloworld-go-nwblj helloworld-go-nwblj True - ``` - - You can send a request to the `helloworld-go` service with curl - using the `URL` given above: - - ``` - $ curl http://helloworld-go.default.34.83.124.52.xip.io - - Hello Go Sample v1! - ``` - -Congratulations! You have successfully installed Knative with Ambassador to -manage and route to serverless applications! - -## What's next - -- Try the - [Getting Started with App Deployment guide](../serving/getting-started-knative-app.md) - for Knative serving. -- Get started with Knative Eventing by walking through one of the - [Eventing Samples](../eventing/samples/). diff --git a/docs/install/Knative-with-Contour.md b/docs/install/Knative-with-Contour.md deleted file mode 100644 index f51f1d5aa..000000000 --- a/docs/install/Knative-with-Contour.md +++ /dev/null @@ -1,176 +0,0 @@ ---- -title: "Knative Install using Contour on a Kubernetes Cluster" -linkTitle: "Contour" -weight: 10 -type: "docs" ---- - -Learn how to deploy Contour and Knative to your Kubernetes cluster. - -[Contour](https://projectcontour.io/) is an open source Kubernetes ingress controller providing the control plane for the Envoy edge and service proxy. - -## Before you begin - -Knative requires a Kubernetes cluster v1.15 or newer, as well as a compatible -`kubectl`. This guide assumes that you've already created a Kubernetes cluster, -and that you are using bash in a Mac or Linux environment; some commands will -need to be adjusted for use in a Windows environment. - -## Installing Knative Serving - -First, let's install Knative to manage our serverless applications. - -The following commands install the Knative Serving components: - -1. To install Knative, first install the CRDs by running the following `kubectl apply` - command. This prevents race conditions during the install, which cause intermittent errors: - - kubectl apply --filename https://github.com/knative/serving/releases/download/{{< version >}}/serving-crds.yaml - -1. To complete the install of Knative and its dependencies, next run the - following `kubectl apply` command: - - kubectl apply --filename https://github.com/knative/serving/releases/download/{{< version >}}/serving-core.yaml - -1. Monitor the `knative-serving` namespaces and wait until all of the pods come up with a - `STATUS` of `Running`: - - ``` - kubectl get pods -w --all-namespaces - ``` - -### Installing Contour for Knative - -Contour is installed in the namespace `projectcontour` with an additional controller in `knative-serving` to bridge the two. - -To install Contour, enter the following command: - - kubectl apply --filename https://raw.githubusercontent.com/knative/serving/{{< version >}}/third_party/contour-latest/contour.yaml - - -To configure Knative Serving to use Contour, add the following key to -the `config-network` config map in `knative-serving`: - -```yaml -apiVersion: v1 -kind: ConfigMap -metadata: - name: config-network - namespace: knative-serving -data: - ingress.class: contour.ingress.networking.knative.dev -``` - -Enter the following command to add the key: - - kubectl edit --namespace knative-serving configmap config-network - - - -## Configuring DNS - -Knative dispatches to different services based on their hostname, so it greatly -simplifies things to have DNS properly configured. For this, we must look up the -external IP address that Contour received. This can be done with the following command: - -``` -$ kubectl get svc -n projectcontour -NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE -contour-external ClusterIP 10.3.2.96 8001/TCP 29d -contour-internal ClusterIP 10.3.9.254 8001/TCP 29d -envoy-external LoadBalancer 10.3.12.166 35.235.99.116 80:31093/TCP,443:31196/TCP 29d -envoy-internal ClusterIP 10.3.11.69 80/TCP 29d -``` - - -This external IP can be used with your DNS provider with a wildcard `A` record; -however, for a basic functioning DNS setup (not suitable for production!) this -external IP address can be used with `xip.io` in the `config-domain` ConfigMap -in `knative-serving`. Enter the following command to edit the ConfigMap: - - -``` -kubectl edit cm config-domain --namespace knative-serving -``` - -Given the external IP above, change the content to: - -``` -apiVersion: v1 -kind: ConfigMap -metadata: - name: config-domain - namespace: knative-serving -data: - # xip.io is a "magic" DNS provider, which resolves all DNS lookups for: - # *.{ip}.xip.io to {ip}. - 35.235.99.116.xip.io: "" -``` - - -## Running Knative apps - -Now that your cluster has Contour and Knative installed, you can run serverless applications with Knative. - -Let's deploy an app to test that everything is set up correctly: - - -1. Create a `Knative Service`. - - For this demo, a simple helloworld application written in go will be used. - Copy the YAML below to a file called `helloworld-go.yaml` and apply it with - `kubectl` - - ```yaml - apiVersion: serving.knative.dev/v1 - kind: Service - metadata: - name: helloworld-go - namespace: default - spec: - template: - spec: - containers: - - image: gcr.io/knative-samples/helloworld-go - env: - - name: TARGET - value: Go Sample v1 - ``` - - ``` - kubectl apply -f helloworld-go.yaml - ``` - -1. Send a request - - **Knative Services** are exposed via the *Host* header assigned by Knative. By - default, Knative will use the header `Host`: - `{service-name}.{namespace}.{the domain we setup above}`. You can see this with: - - ``` - $ kubectl get ksvc helloworld-go - NAME URL LATESTCREATED LATESTREADY READY REASON - helloworld-go http://helloworld-go.default.35.235.99.116.xip.io helloworld-go-nwblj helloworld-go-nwblj True - ``` - - You can send a request to the `helloworld-go` service with curl using the `URL` given above: - - ``` - $ curl http://helloworld-go.default.35.235.99.116.xip.io - - Hello Go Sample v1! - ``` - -You have successfully installed Knative with Contour to manage and route to serverless applications! - -## What's next - -Now that your cluster has Knative installed, you can see what Knative has to -offer. - -Learn more about deploying apps to Knative with the -[Getting Started with Knative App Deployment](../serving/getting-started-knative-app.md) -guide. - -To get started with Knative Eventing, pick one of the -[Eventing Samples](../eventing/samples/) to walk through. diff --git a/docs/install/Knative-with-Docker-for-Mac.md b/docs/install/Knative-with-Docker-for-Mac.md deleted file mode 100644 index f7c3c2716..000000000 --- a/docs/install/Knative-with-Docker-for-Mac.md +++ /dev/null @@ -1,112 +0,0 @@ ---- -title: "Install on Docker for Mac OS" -linkTitle: "Docker - Mac OS" -weight: 15 -type: "docs" ---- - -This guide walks you through the installation of the latest version of -[Knative Serving](https://github.com/knative/serving) using pre-built images and -demonstrates creating and deploying an image of a sample "hello world" app onto -the newly created Knative cluster. - -You can find [guides for other platforms here](./README.md). - -## Before you begin - -Knative requires a Kubernetes cluster v1.15 or newer. If you don't have one, you -can create one using [Docker for Mac](https://docs.docker.com/docker-for-mac/). -If you haven't already, -[install Docker for Mac](https://docs.docker.com/docker-for-mac/install/) before -continuing. - -## Creating a Kubernetes cluster - -1. After Docker for Mac is installed, configure it with sufficient resources. - You can do that via the - [_Advanced_ menu](https://docs.docker.com/docker-for-mac/#advanced) in Docker - for Mac's preferences. Set **CPUs** to at least **2** and **Memory** to at - least **6.0 GiB**. -1. Now enable Docker for Mac's - [Kubernetes capabilities](https://docs.docker.com/docker-for-mac/#kubernetes) - and wait for the cluster to start up. - -## Installing Istio - -Knative depends on [Istio](https://istio.io/docs/concepts/what-is-istio/) or -other HTTP loadbalancers for traffic routing and ingress. See the -[installing Istio for Knative guide](./installing-istio.md), and -[select the minimal install without sidecar injection or SSL](./installing-istio.md#installing-istio-without-sidecar-injection). - -## Installing `cluster-local-gateway` for serving cluster-internal traffic - -If you installed Istio, you can install a `cluster-local-gateway` within your -Knative cluster so that you can serve cluster-internal traffic. If you want to -configure your revisions to use routes that are visible only within your -cluster, -[install and use the `cluster-local-gateway`](./installing-istio.md#updating-your-install-to-use-cluster-local-gateway). - -## Installing Knative Serving - -Next, install [Knative Serving](https://github.com/knative/serving). - -Because you have limited resources available, use the -`https://github.com/knative/serving/releases/download/{{< version >}}/serving.yaml` -file, which installs only Knative Serving: - -```shell -curl -L https://github.com/knative/serving/releases/download/{{< version >}}/serving.yaml \ - | kubectl apply --filename - -``` - -> Note: Unlike minikube, we're not changing the LoadBalancer to a NodePort here. -> Docker for Mac will assign `localhost` as the host for that LoadBalancer, -> making the applications available easily. - -Monitor the Knative components until all of the components show a `STATUS` of -`Running`: - -```shell -kubectl get pods --namespace knative-serving -``` - -Just as with the Istio components, it will take a few seconds for the Knative -components to be up and running; you can rerun the command to see the current -status. - -> Note: Instead of rerunning the command, you can add `--watch` to the above -> command to view the component's status updates in real time. Use CTRL+C to -> exit watch mode. - -Now you can deploy an app to your newly created Knative cluster. - -## Deploying an app - -Now that your cluster has Knative installed, you're ready to deploy an app. - -If you'd like to follow a step-by-step guide for deploying your first app on -Knative, check out the -[Getting Started with Knative App Deployment](../serving/getting-started-knative-app.md) -guide. Note that (as of 1.11) you'll need to push your docker images to -DockerHub rather than only building them locally. - -If you'd like to view the available sample apps and deploy one of your choosing, -head to the [sample apps](../serving/samples/README.md) repo. - -> Note: You can replace the {IP_ADDRESS} placeholder used in the samples with -> `localhost` as mentioned above. - -Get started with Knative Eventing by walking through one of the -[Eventing Samples](../eventing/samples/). - -[Install Cert-Manager](../serving/installing-cert-manager.md) if you want to use -the [automatic TLS cert provisioning feature](../serving/using-auto-tls.md). - -## Cleaning up - -Docker for Mac supports several levels of resetting its state and thus cleaning -up. - -To reset only the Kubernetes cluster to a fresh one, click "Reset Kubernetes -cluster" in the -[_Reset_ preferences](https://docs.docker.com/docker-for-mac/#reset). diff --git a/docs/install/Knative-with-GKE.md b/docs/install/Knative-with-GKE.md deleted file mode 100644 index 6e641c715..000000000 --- a/docs/install/Knative-with-GKE.md +++ /dev/null @@ -1,216 +0,0 @@ ---- -title: "Install on Google Kubernetes Engine" -linkTitle: "Google Kubernetes Engine" -weight: 15 -type: "docs" ---- - -This guide walks you through the installation of the latest version of all -Knative components using pre-built images. - -You can find [guides for other platforms here](./README.md). - -## Before you begin - -> [Cloud Run on GKE](https://cloud.google.com/run/docs/gke/setup) is a hosted -> offering on top of GKE that builds around Istio and Knative Serving. - -Knative requires a Kubernetes cluster v1.15 or newer, as well as a compatible -`kubectl`. This guide walks you through creating a cluster with the correct -specifications for Knative on Google Cloud Platform (GCP). - -This guide assumes you are using `bash` in a Mac or Linux environment; some -commands will need to be adjusted for use in a Windows environment. - -### Installing the Google Cloud SDK and `kubectl` - -1. If you already have `gcloud` installed with `kubectl`, - you can skip these steps. - - > Tip: To check which version of `kubectl` you have installed, enter: - - ``` - kubectl version - ``` - -1. Download and install the `gcloud` command line tool: - https://cloud.google.com/sdk/docs/quickstarts - -1. Install the `kubectl` component: - ``` - gcloud components install kubectl - ``` -1. Authorize `gcloud`: - ``` - gcloud auth login - ``` - -### Setting environment variables - -To simplify the command lines for this walkthrough, we need to define a few -environment variables. - -Set `CLUSTER_NAME` and `CLUSTER_ZONE` variables, you can replace `knative` and -`us-west1-c` with cluster name and zone of your choosing. - -The `CLUSTER_NAME` needs to be lowercase and unique among any other Kubernetes -clusters in your GCP project. The zone can be -[any compute zone available on GCP](https://cloud.google.com/compute/docs/regions-zones/#available). -These variables are used later to create a Kubernetes cluster. - -```bash -export CLUSTER_NAME=knative -export CLUSTER_ZONE=us-west1-c -``` - -### Setting up a Google Cloud Platform project - -You need a Google Cloud Platform (GCP) project to create a Google Kubernetes -Engine cluster. - -1. Set `PROJECT` environment variable, you can replace `my-knative-project` with - the desired name of your GCP project. If you don't have one, we'll create one - in the next step. - - ```bash - export PROJECT=my-knative-project - ``` - -1. If you don't have a GCP project, create and set it as your `gcloud` default: - - ```bash - gcloud projects create $PROJECT --set-as-default - ``` - - You also need to - [enable billing](https://cloud.google.com/billing/docs/how-to/manage-billing-account) - for your new project. - -1. If you already have a GCP project, make sure your project is set as your - `gcloud` default: - - ```bash - gcloud config set core/project $PROJECT - ``` - - > Tip: Enter `gcloud config get-value project` to view the ID of your default - > GCP project. - -1. Enable the necessary APIs: - - ```bash - gcloud services enable \ - cloudapis.googleapis.com \ - container.googleapis.com \ - containerregistry.googleapis.com - ``` - -## Creating a Kubernetes cluster - -To make sure the cluster is large enough to host Knative and its dependencies, -the recommended configuration for a cluster is: - -- Kubernetes version 1.15 or later -- 4 vCPU nodes (`n1-standard-4`) -- Node autoscaling, up to 10 nodes -- API scopes for `cloud-platform` - -1. Create a Kubernetes cluster on GKE with the required specifications: - -> Note: If this setup is for development, or a non-Istio networking layer (e.g. -> [Ambassador](./Knative-with-Ambassador.md), [Contour](./Knative-with-Contour.md), or [Gloo](./Knative-with-Gloo.md)) -> will be used, then you can remove the `--addons` line below. - -> Note: If you want to use [Auto TLS feature](../serving/using-auto-tls.md), you -> need to remove the `--addons` line below, and follow the -> [instructions](./installing-istio.md) to install Istio with Secret Discovery -> Service. - -```bash -gcloud beta container clusters create $CLUSTER_NAME \ - --addons=HorizontalPodAutoscaling,HttpLoadBalancing,Istio \ - --machine-type=n1-standard-4 \ - --cluster-version=latest --zone=$CLUSTER_ZONE \ - --enable-stackdriver-kubernetes --enable-ip-alias \ - --enable-autoscaling --min-nodes=1 --max-nodes=10 \ - --enable-autorepair \ - --scopes cloud-platform -``` - -1. Grant cluster-admin permissions to the current user: - - ```bash - kubectl create clusterrolebinding cluster-admin-binding \ - --clusterrole=cluster-admin \ - --user=$(gcloud config get-value core/account) - ``` - -Admin permissions are required to create the necessary -[RBAC rules for Knative](https://istio.io/docs/concepts/security/rbac/). - -## Installing `cluster-local-gateway` for serving cluster-internal traffic - -If you installed Istio, you can install a `cluster-local-gateway` within your Knative cluster so that you can serve cluster-internal traffic. If you want to configure your revisions to use routes that are visible only within your cluster, [install and use the `cluster-local-gateway`](./installing-istio.md#updating-your-install-to-use-cluster-local-gateway). - -## Installing Knative - -The following commands install all available Knative components as well as the -standard set of observability plugins. To customize your Knative installation, -see [Performing a Custom Knative Installation](./Knative-custom-install.md). - -1. To install Knative, first install the CRDs by running the `kubectl apply` - command once with the `-l knative.dev/crd-install=true` flag. This prevents - race conditions during the install, which cause intermittent errors: - - ```bash - kubectl apply --selector knative.dev/crd-install=true \ - --filename https://github.com/knative/serving/releases/download/{{< version >}}/serving.yaml \ - --filename https://github.com/knative/eventing/releases/download/{{< version >}}/eventing.yaml \ - --filename https://github.com/knative/serving/releases/download/{{< version >}}/monitoring.yaml - ``` - -1. To complete the install of Knative and its dependencies, run the - `kubectl apply` command again, this time without the `--selector` flag, to - complete the install of Knative and its dependencies: - - ```bash - kubectl apply --filename https://github.com/knative/serving/releases/download/{{< version >}}/serving.yaml \ - --filename https://github.com/knative/eventing/releases/download/{{< version >}}/eventing.yaml \ - --filename https://github.com/knative/serving/releases/download/{{< version >}}/monitoring.yaml - ``` - -1. Monitor the Knative components until all of the components show a `STATUS` of - `Running`: - - ```bash - kubectl get pods --namespace knative-serving - kubectl get pods --namespace knative-eventing - kubectl get pods --namespace knative-monitoring - ``` - -## What's next - -Now that your cluster has Knative installed, you can see what Knative has to -offer. - -To deploy your first app with the -[Getting Started with Knative App Deployment](../serving/getting-started-knative-app.md) -guide. - -Get started with Knative Eventing by walking through one of the -[Eventing Samples](../eventing/samples/). - -[Install Cert-Manager](../serving/installing-cert-manager.md) if you want to use the -[automatic TLS cert provisioning feature](../serving/using-auto-tls.md). - -## Cleaning up - -Running a cluster in Kubernetes Engine costs money, so you might want to delete -the cluster when you're done if you're not using it. Deleting the cluster will -also remove Knative, Istio, and any apps you've deployed. - -To delete the cluster, enter the following command: - -```bash -gcloud container clusters delete $CLUSTER_NAME --zone $CLUSTER_ZONE -``` diff --git a/docs/install/Knative-with-Gardener.md b/docs/install/Knative-with-Gardener.md deleted file mode 100644 index 8a2a9a7f9..000000000 --- a/docs/install/Knative-with-Gardener.md +++ /dev/null @@ -1,200 +0,0 @@ ---- -title: "Install on Gardener" -linkTitle: "Gardener" -weight: 10 -type: "docs" ---- - -This guide walks you through the installation of the latest version of Knative -using pre-built images on a [Gardener](https://gardener.cloud) created cluster -environment. To set up your own Gardener, see the -[documentation](https://github.com/gardener/gardener/blob/master/docs/README.md) -or have a look at the -[landscape-setup-template](https://github.com/gardener/landscape-setup-template) -project. To learn more about this open source project, read the -[blog on kubernetes.io](https://kubernetes.io/blog/2018/05/17/gardener/). - -You can find [guides for other platforms here](./README.md). - -## Before you begin - -Knative requires a Kubernetes cluster v1.15 or newer. - -### Install and configure kubectl - -1. If you already have `kubectl` CLI, run `kubectl version --short` to check - the version. You need v1.10 or newer. If your `kubectl` is older, follow the - next step to install a newer version. - -2. [Install the kubectl CLI](https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-kubectl). - -### Access Gardener - -1. Create a project in the Gardener dashboard. This will essentially create a - Kubernetes namespace with the name `garden-`. - -2. [Configure access to your Gardener project](https://kubernetes.io/docs/tasks/tools/install-kubectl/#configure-kubectl) - using a kubeconfig. If you are not the Gardener Administrator already, you - can create a technical user in the Gardener dashboard: go to the "Members" - section and add a service account. You can then download the kubeconfig for - your project. You can skip this step if you create your cluster using the - user interface; it is only needed for programmatic access, make sure you set - `export KUBECONFIG=garden-my-project.yaml` in your shell. - ![Download kubeconfig for Gardener](./images/gardener_service_account.png "downloading the kubeconfig using a service account") - -### Creating a Kubernetes cluster - -You can create your cluster using `kubectl` cli by providing a cluster -specification yaml file. You can find an example for GCP -[here](https://github.com/gardener/gardener/blob/master/example/90-shoot.yaml). -Make sure the namespace matches that of your project. Then just apply the -prepared so-called "shoot" cluster crd with kubectl: - -``` -kubectl apply --filename my-cluster.yaml -``` - -The easier alternative is to create the cluster following the cluster creation -wizard in the Gardener dashboard: -![shoot creation](./images/gardener_shoot_creation.png "shoot creation via the dashboard") - -### Configure kubectl for your cluster - -You can now download the kubeconfig for your freshly created cluster in the -Gardener dashboard or via cli as follows: - -``` -kubectl --namespace shoot--my-project--my-cluster get secret kubecfg --output jsonpath={.data.kubeconfig} | base64 --decode > my-cluster.yaml -``` - -This kubeconfig file has full administrators access to you cluster. For the rest -of this guide be sure you have `export KUBECONFIG=my-cluster.yaml` set. - -## Installing Istio - -Knative depends on Istio. If your cloud platform offers a managed Istio -installation, we recommend installing Istio that way, unless you need the -ability to customize your installation. - -Otherwise, see the [Installing Istio for Knative guide](./installing-istio.md) -to install Istio. - -You must install Istio on your Kubernetes cluster before continuing with these -instructions to install Knative. - -## Installing `cluster-local-gateway` for serving cluster-internal traffic - -If you installed Istio, you can install a `cluster-local-gateway` within your Knative cluster so that you can serve cluster-internal traffic. If you want to configure your revisions to use routes that are visible only within your cluster, [install and use the `cluster-local-gateway`](./installing-istio.md#updating-your-install-to-use-cluster-local-gateway). - -## Installing Knative - -The following commands install all available Knative components as well as the -standard set of observability plugins. To customize your Knative installation, -see [Performing a Custom Knative Installation](./Knative-custom-install.md). - -1. If you are upgrading from Knative 0.3.x: Update your domain and static IP - address to be associated with the LoadBalancer `istio-ingressgateway` instead - of `knative-ingressgateway`. Then run the following to clean up leftover - resources: - - ``` - kubectl delete svc knative-ingressgateway -n istio-system - kubectl delete deploy knative-ingressgateway -n istio-system - ``` - - If you have the Knative Eventing Sources component installed, you will also - need to delete the following resource before upgrading: - - ``` - kubectl delete statefulset/controller-manager -n knative-sources - ``` - - While the deletion of this resource during the upgrade process will not - prevent modifications to Eventing Source resources, those changes will not be - completed until the upgrade process finishes. - -1. To install Knative, first install the CRDs by running the `kubectl apply` - command once with the `-l knative.dev/crd-install=true` flag. This prevents - race conditions during the install, which cause intermittent errors: - - ```bash - kubectl apply --selector knative.dev/crd-install=true \ - --filename https://github.com/knative/serving/releases/download/{{< version >}}/serving.yaml \ - --filename https://github.com/knative/eventing/releases/download/{{< version >}}/eventing.yaml \ - --filename https://github.com/knative/serving/releases/download/{{< version >}}/monitoring.yaml - ``` - -1. To complete the install of Knative and its dependencies, run the - `kubectl apply` command again, this time without the `--selector` flag, to - complete the install of Knative and its dependencies: - - ```bash - kubectl apply --filename https://github.com/knative/serving/releases/download/{{< version >}}/serving.yaml \ - --filename https://github.com/knative/eventing/releases/download/{{< version >}}/eventing.yaml \ - --filename https://github.com/knative/serving/releases/download/{{< version >}}/monitoring.yaml - ``` - -1. Monitor the Knative components until all of the components show a `STATUS` of - `Running`: - ```bash - kubectl get pods --namespace knative-serving - kubectl get pods --namespace knative-eventing - kubectl get pods --namespace knative-monitoring - ``` - -## Set your custom domain - -1. Fetch the external IP or CNAME of the knative-ingressgateway - -``` -kubectl --namespace istio-system get service knative-ingressgateway -NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE -knative-ingressgateway LoadBalancer 100.70.219.81 35.233.41.212 80:32380/TCP,443:32390/TCP,32400:32400/TCP 4d -``` - -2. Create a wildcard DNS entry in your custom domain to point to above IP or - CNAME - -``` -*.knative. == A 35.233.41.212 -# or CNAME if you are on AWS -*.knative. == CNAME a317a278525d111e89f272a164fd35fb-1510370581.eu-central-1.elb.amazonaws.com -``` - -3. Adapt your knative config-domain (set your domain in the data field) - -``` -kubectl --namespace knative-serving get configmaps config-domain --output yaml -apiVersion: v1 -data: - knative.: "" -kind: ConfigMap - name: config-domain - namespace: knative-serving -``` - -## What's next - -Now that your cluster has Knative installed, you can see what Knative has to -offer. - -To deploy your first app with the -[Getting Started with Knative App Deployment](../serving/getting-started-knative-app.md) -guide. - -Get started with Knative Eventing by walking through one of the -[Eventing Samples](../eventing/samples/). - -[Install Cert-Manager](../serving/installing-cert-manager.md) if you want to use the -[automatic TLS cert provisioning feature](../serving/using-auto-tls.md). - -## Cleaning up - -Use the Gardener dashboard to delete your cluster, or execute the following with -kubectl pointing to your `garden-my-project.yaml` kubeconfig: - -``` -kubectl --kubeconfig garden-my-project.yaml --namespace garden--my-project annotate shoot my-cluster confirmation.garden.sapcloud.io/deletion=true - -kubectl --kubeconfig garden-my-project.yaml --namespace garden--my-project delete shoot my-cluster -``` diff --git a/docs/install/Knative-with-Gloo.md b/docs/install/Knative-with-Gloo.md deleted file mode 100644 index 2f01469aa..000000000 --- a/docs/install/Knative-with-Gloo.md +++ /dev/null @@ -1,185 +0,0 @@ ---- -title: "Knative Install using Gloo on a Kubernetes Cluster" -linkTitle: "Gloo" -weight: 10 -type: "docs" ---- - -Learn how to deploy Gloo and Knative to your Kubernetes cluster using the Gloo command line tool `glooctl`. - - -[Gloo](https://docs.solo.io/gloo/latest/) is a popular open-source Envoy control plane and API gateway built for Kubernetes (and other platforms). - -Gloo provides a complete gateway replacement for Istio and supports the full Knative Ingress spec. Choose Gloo if you don't require a service mesh in your cluster and want a lightweight alternative that requires less resource usage and operational overhead. - -## Before you begin - -Knative requires a Kubernetes cluster v1.15 or newer, as well as a compatible -`kubectl`. This guide assumes that you've already created a Kubernetes cluster -which you're comfortable installing _alpha_ software on. - -This guide assumes you are using bash in a Mac or Linux environment; some commands will need to be adjusted for use in a Windows environment. - -## Installing Glooctl - -Gloo's CLI tool `glooctl` makes it easy to install both Gloo and Knative without the need to use [Helm](https://helm.sh) or multiple manifests. Let's go ahead and download `glooctl`: - -```shell -curl -sL https://run.solo.io/gloo/install | sh -``` - -Alternatively, you can download the Gloo CLI directly via -[the github releases](https://github.com/solo-io/gloo/releases) page. - -Next, add `glooctl` to your path with: - -```shell -export PATH=$HOME/.gloo/bin:$PATH -``` - -Verify the CLI is installed and running correctly with: - -```shell -glooctl --version -``` - -### Deploying Gloo and Knative to your cluster - -Finally, install Gloo and Knative in a single command with `glooctl`: - -```shell -glooctl install knative --install-eventing --install-eventing-version= --install-knative --install-knative-version= --install-monitoring -``` - -The `glooctl install knative` command can be customized with a variety of options: -- use `--install-knative-version` to set the installed version of Knative Serving (defaults to `0.10.0`) -- use `--install-eventing` to install Knative Eventing -- use `--dry-run` to produce the kubernetes YAML that would be applied to your cluster rather than applying. -- use `--install-knative=false` to only install Gloo without installing Knative components. This can be used if you wish to install Knative independently of Gloo. - -See https://github.com/solo-io/gloo/blob/master/docs/content/cli/glooctl_install_knative.md for the full list of available options for installing Knative with `glooctl` - -> Note: `glooctl` generates a manifest which can be piped to stdout or a file using the `--dry-run` flag. Alternatively, -Gloo can be installed via its [Helm Chart](https://docs.solo.io/gloo/latest/installation/gateway/kubernetes/#installing-on-kubernetes-with-helm), which will permit fine-grained configuration of installation parameters. - -Monitor the Gloo and Knative components until each one shows a `STATUS` of `Running` or `Completed`: - -```shell -kubectl get pods --namespace gloo-system -kubectl get pods --namespace knative-serving -``` - -It will take a few minutes for all the components to be up and running; you can -rerun the command to see the current status. - -> Note: Instead of rerunning the command, you can add `--watch` to the above -> commands to view the component's status updates in real time. Use CTRL+C to -> exit watch mode. - -Now you can deploy an app using your freshly installed Knative environment. - -## Configuring DNS - -Knative dispatches to different services based on their hostname, so it greatly -simplifies things to have DNS properly configured. For this, we must look up the -external IP address that Gloo received. This can be done with the following command: - -``` -$ kubectl get svc -ngloo-system -NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE -gloo ClusterIP 10.0.11.200 9977/TCP 9m50s -knative-external-proxy LoadBalancer 10.0.15.230 34.83.80.117 80:30351/TCP,443:30157/TCP 9m50s -knative-internal-proxy ClusterIP 10.0.7.102 80/TCP,443/TCP 9m50s -``` - - -This external IP can be used with your DNS provider with a wildcard `A` record; -however, for a basic functioning DNS setup (not suitable for production!) this -external IP address can be used with `xip.io` in the `config-domain` ConfigMap -in `knative-serving`. You can edit this with the following command: - -``` -kubectl edit cm config-domain --namespace knative-serving -``` - -Given the external IP above, change the content to: - -``` -apiVersion: v1 -kind: ConfigMap -metadata: - name: config-domain - namespace: knative-serving -data: - # xip.io is a "magic" DNS provider, which resolves all DNS lookups for: - # *.{ip}.xip.io to {ip}. - 34.83.80.117.xip.io: "" -``` - - -## Running Knative apps - -Now that your cluster has Gloo & Knative installed, you can run serverless applications with Knative. - -Let's deploy an app to test that everything is set up correctly: - - -1. Next, create a `Knative Service` - - For this demo, a simple helloworld application written in go will be used. - Copy the YAML below to a file called `helloworld-go.yaml` and apply it with - `kubectl` - - ```yaml - apiVersion: serving.knative.dev/v1 - kind: Service - metadata: - name: helloworld-go - namespace: default - spec: - template: - spec: - containers: - - image: gcr.io/knative-samples/helloworld-go - env: - - name: TARGET - value: Go Sample v1 - ``` - - ``` - kubectl apply -f helloworld-go.yaml - ``` - -2. Send a request - - **Knative Services** are exposed via the *Host* header assigned by Knative. By - default, Knative will use the header `Host`: - `{service-name}.{namespace}.{the domain we setup above}`. You can see this with: - - ``` - $ kubectl get ksvc helloworld-go - NAME URL LATESTCREATED LATESTREADY READY REASON - helloworld-go http://helloworld-go.default.34.83.80.117.xip.io helloworld-go-nwblj helloworld-go-nwblj True - ``` - - You can send a request to the `helloworld-go` service with curl using the `URL` given above: - - ``` - $ curl http://helloworld-go.default.34.83.124.52.xip.io - - Hello Go Sample v1! - ``` - -Congratulations! You have successfully installed Knative with Gloo to manage and route to serverless applications! - -## What's next - -Now that your cluster has Knative installed, you can see what Knative has to -offer. - -Learn more about deploying apps to Knative with the -[Getting Started with Knative App Deployment](../serving/getting-started-knative-app.md) -guide. - -To get started with Knative Eventing, pick one of the -[Eventing Samples](../eventing/samples/) to walk through. diff --git a/docs/install/Knative-with-ICP.md b/docs/install/Knative-with-ICP.md deleted file mode 100644 index 6625d7273..000000000 --- a/docs/install/Knative-with-ICP.md +++ /dev/null @@ -1,233 +0,0 @@ ---- -title: "Install on IBM Cloud Private" -linkTitle: "IBM Cloud Private" -weight: 15 -type: "docs" ---- - -This guide walks you through the installation of the latest version of -[Knative Serving](https://github.com/knative/serving) using pre-built images and -demonstrates creating and deploying an image of a sample `hello world` app onto -the newly created Knative cluster on -[IBM Cloud Private](https://www.ibm.com/cloud/private). - -You can find [guides for other platforms here](./README.md). - -## Before you begin - -### Install IBM Cloud Private - -Knative requires a v3.1.1 standard -[IBM Cloud Private](https://www.ibm.com/cloud/private) cluster. Before you can -install Knative, you must first complete all the steps that are provided in the -[IBM Cloud Private standard cluster installation instructions](https://www.ibm.com/support/knowledgecenter/SSBS6K_3.1.1/installing/install_containers.html). -For Example: - -1. Install Docker for your boot node only - -2. Set up the installation environment - -3. Customize your cluster - -4. Set up Docker for your cluster nodes - -5. Deploy the environment - -6. Verify the status of your installation - -### Configure IBM Cloud Private security policies - -You need to create and set both the image security and pod security policies -before you install Knative in your cluster. - -#### Update the image security policy - -Update the -[image security policy (`image-security-enforcement`)](https://www.ibm.com/support/knowledgecenter/SSBS6K_3.1.1/manage_images/image_security.html) -in IBM Cloud Private to allow the access to the Knative image: - -1. Edit the image security policy: - - ``` - kubectl edit clusterimagepolicies ibmcloud-default-cluster-image-policy - ``` - -2. Update `spec.repositories` by adding the following entries, for example: - ```yaml - spec: - repositories: - - name: gcr.io/knative-releases/* - - name: k8s.gcr.io/* - - name: quay.io/* - ``` - -#### Update pod security policy - -Configure the namespaces `knative-serving` into pod security policy -`ibm-privileged-psp`. The step as follows: - -1. Create a cluster role for the pod security policy resource. The resourceNames - for this role must be the name of the pod security policy that was created - previous. Here we use `ibm-privileged-psp`. Run the following command: - - ```shell - cat <}}/serving.yaml \ - | sed 's/LoadBalancer/NodePort/' \ - | kubectl apply --filename - - ``` - - ```shell - curl -L https://github.com/knative/eventing/releases/download/{{< version >}}/eventing.yaml \ - | sed 's/LoadBalancer/NodePort/' \ - | kubectl apply --filename - - ``` - - ```shell - curl -L https://github.com/knative/serving/releases/download/{{< version >}}/monitoring.yaml \ - | sed 's/LoadBalancer/NodePort/' \ - | kubectl apply --filename - - ``` - - > **Note**: If your install fails on the first attempt, try rerunning the - > commands. They will likely succeed on the second attempt. For background - > info and to track the upcoming solution to this problem, see issues - > [#968](https://github.com/knative/docs/issues/968) and - > [#1036](https://github.com/knative/docs/issues/1036). - - See - [Installing logging, metrics, and traces](../serving/installing-logging-metrics-traces.md) - for details about installing the various supported observability plug-ins. - -1. Monitor the Knative components until all of the components show a `STATUS` of - `Running`: - - ```bash - kubectl get pods --namespace knative-serving - kubectl get pods --namespace knative-eventing - kubectl get pods --namespace knative-monitoring - ``` - - > Note: Instead of rerunning the command, you can add `--watch` to the above - > command to view the component's status updates in real time. Use CTRL+C to - > exit watch mode. - -Now you can deploy an app to your newly created Knative cluster. - -## What's next - -Now that your cluster has Knative installed, you can see what Knative has to -offer. - -To deploy your first app with the -[Getting Started with Knative App Deployment](../serving/getting-started-knative-app.md) -guide. - -> **Note**: When looking up the IP address to use for accessing your app, you -> need the address used for ICP. The following command looks up the value to use -> for the {IP_ADDRESS} placeholder in the samples: - -```shell -echo $(ICP cluster ip):$(kubectl get svc istio-ingressgateway --namespace istio-system \ ---output 'jsonpath={.spec.ports[?(@.port==80)].nodePort}') -``` - -Get started with Knative Eventing by walking through one of the -[Eventing Samples](../eventing/samples/). - -[Install Cert-Manager](../serving/installing-cert-manager.md) if you want to use the -[automatic TLS cert provisioning feature](../serving/using-auto-tls.md). - -## Cleaning up - -To remove Knative from your IBM Cloud Private cluster, run the following -commands: - -```shell -curl -L https://github.com/knative/serving/releases/download/{{< version >}}/serving.yaml \ - | sed 's/LoadBalancer/NodePort/' \ - | kubectl delete --filename - -``` - -```shell -curl -L https://github.com/knative/eventing/releases/download/{{< version >}}/eventing.yaml \ - | sed 's/LoadBalancer/NodePort/' \ - | kubectl delete --filename - -``` - -```shell -curl -L https://github.com/knative/serving/releases/download/{{< version >}}/monitoring.yaml \ - | sed 's/LoadBalancer/NodePort/' \ - | kubectl delete --filename - -``` diff --git a/docs/install/Knative-with-IKS.md b/docs/install/Knative-with-IKS.md deleted file mode 100644 index df230a7bc..000000000 --- a/docs/install/Knative-with-IKS.md +++ /dev/null @@ -1,254 +0,0 @@ ---- -title: "Install on IBM Cloud Kubernetes Service (IKS)" -linkTitle: "IBM Cloud Kubernetes Service" -weight: 10 -type: "docs" ---- - -This guide walks you through the installation of the latest version of Knative -on an IBM Cloud Kubernetes Service (IKS) cluster. - -You can find [guides for other platforms here](./README.md). - -## Before you begin - -Knative requires a Kubernetes cluster v1.15 or newer. This guide walks you -through creating a cluster with the correct specifications for Knative on IBM -Cloud Kubernetes Service. - -This guide assumes you are using bash in a Mac or Linux environment; some -commands need to be adjusted for use in a Windows environment. - -### Installing the IBM Cloud developer tools - -> If you already have `ibmcloud` installed with the `ibmcloud cs` plugin, you -> can skip these steps. - -1. Download and install the `ibmcloud` command line tool: - https://console.bluemix.net/docs/cli/index.html#overview - -1. Install the `cs` (container-service) plugin: - ```bash - ibmcloud plugin install container-service -r Bluemix - ``` -1. Authorize `ibmcloud`: - ```bash - ibmcloud login - ``` - -### Setting environment variables - -To simplify the command lines for this walkthrough, you need to define a few -environment variables. - -1. Set `CLUSTER_NAME`, `CLUSTER_REGION`, and `CLUSTER_ZONE` variables: - - ```bash - export CLUSTER_NAME=knative - export CLUSTER_REGION=us-south - export CLUSTER_ZONE=dal13 - ``` - - - `CLUSTER_NAME` must be lowercase and unique among any other Kubernetes - clusters in this IBM Cloud region. - - `CLUSTER_REGION` can be any region where IKS is available. You can get a - list of all available regions via the - [IBM Cloud documentation](https://console.bluemix.net/docs/containers/cs_regions.html#regions-and-zones) - or via `ibmcloud cs regions`. - - `CLUSTER_ZONE` can be any zone that is available in the specified region - above. You can get a list of all avaible locations from the - [IBM Cloud documentation](https://console.bluemix.net/docs/containers/cs_regions.html#zones) - or by using `ibmcloud cs zones` after you set the region by using - `ibmcloud cs region-set $CLUSTER_REGION`. - -### Creating a Kubernetes cluster - -To make sure the cluster is large enough to host all the Knative and Istio -components, the recommended configuration for a cluster is: - -- Kubernetes version 1.15 or later -- 4 vCPU nodes with 16GB memory (`b2c.4x16`) - -1. Set `ibmcloud` to the appropriate region: - - ```bash - ibmcloud cs region-set $CLUSTER_REGION - ``` - -1. Create a Kubernetes cluster on IKS with the required specifications: - - ```bash - ibmcloud cs cluster-create --name=$CLUSTER_NAME \ - --zone=$CLUSTER_ZONE \ - --machine-type=b2c.4x16 \ - --workers=3 - ``` - - If you're starting in a fresh account with no public and private VLANs, they - are created automatically for you. If you already have VLANs configured in - your account, get them via `ibmcloud cs vlans --zone $CLUSTER_ZONE` and - include the public/private VLAN in the `cluster-create` command: - - ```bash - ibmcloud cs cluster-create --name=$CLUSTER_NAME \ - --zone=$CLUSTER_ZONE \ - --machine-type=b2c.4x16 \ - --workers=3 \ - --private-vlan $PRIVATE_VLAN_ID \ - --public-vlan $PUBLIC_VLAN_ID - ``` - -1. Wait until your Kubernetes cluster is deployed: - - ```bash - ibmcloud cs clusters | grep $CLUSTER_NAME - ``` - - It can take a while for your cluster to be deployed. Repeat the above - command until the state of your cluster is "normal". - -1. Point `kubectl` to the cluster: - - ```bash - ibmcloud cs cluster-config $CLUSTER_NAME - ``` - - Follow the instructions on the screen to `EXPORT` the correct `KUBECONFIG` - value to point to the created cluster. - -1. Make sure all nodes are up: - - ``` - kubectl get nodes - ``` - - Make sure all the nodes are in `Ready` state. You are now ready to install - Istio into your cluster. - -With a Kuberntes cluster ready, you now have two choices on how to install -Knative: via a one-click "add-on" or manually. - -## Installing Knative using an IKS managed add-on - -The easiest way to install it is using the Managed Knative add-on facility. This -one-click install process will install Knative, and Istio if not already -installed, and provide automatic updates and lifecycle management of your -Knative control plane. - -You can get the add-on via the "Add-ons" tab of your Kubernetes cluster's -console page, or via the command line: - -```bash -ibmcloud ks cluster-addon-enable knative -y $CLUSTER_NAME -``` - -For more information about the add-on see -[here](https://cloud.ibm.com/docs/containers?topic=containers-knative_tutorial#knative_tutorial). - -## Manually installing Knative on IKS - -However, if you'd like to install Knative manually, see the instructions below. -Kind in mind that if you do not use the add-on mechanism then you will need to -manually manage the upgrade of your Istio and Knative installs yourself going -forward. - -### Installing Istio - -Knative depends on Istio. If your cloud platform offers a managed Istio -installation, we recommend installing Istio that way, unless you need the -ability to customize your installation. - -If you prefer to install Istio manually, if your cloud provider doesn't offer a -managed Istio installation, or if you're installing Knative locally using -Minkube or similar, see the -[Installing Istio for Knative guide](./installing-istio.md). - -You must install Istio on your Kubernetes cluster before continuing with these -instructions to install Knative. - -## Installing `cluster-local-gateway` for serving cluster-internal traffic - -If you installed Istio, you can install a `cluster-local-gateway` within your Knative cluster so that you can serve cluster-internal traffic. If you want to configure your revisions to use routes that are visible only within your cluster, [install and use the `cluster-local-gateway`](./installing-istio.md#updating-your-install-to-use-cluster-local-gateway). - -### Installing Knative - -The following commands install all available Knative components as well as the -standard set of observability plugins. To customize your Knative installation, -see [Performing a Custom Knative Installation](./Knative-custom-install.md). - -1. If you are upgrading from Knative 0.3.x: Update your domain and static IP - address to be associated with the LoadBalancer `istio-ingressgateway` instead - of `knative-ingressgateway`. Then run the following to clean up leftover - resources: - - ``` - kubectl delete svc knative-ingressgateway -n istio-system - kubectl delete deploy knative-ingressgateway -n istio-system - ``` - - If you have the Knative Eventing Sources component installed, you will also - need to delete the following resource before upgrading: - - ``` - kubectl delete statefulset/controller-manager -n knative-sources - ``` - - While the deletion of this resource during the upgrade process will not - prevent modifications to Eventing Source resources, those changes will not be - completed until the upgrade process finishes. - -1. To install Knative, first install the CRDs by running the `kubectl apply` - command once with the `-l knative.dev/crd-install=true` flag. This prevents - race conditions during the install, which cause intermittent errors: - - ```bash - kubectl apply --selector knative.dev/crd-install=true \ - --filename https://github.com/knative/serving/releases/download/{{< version >}}/serving.yaml \ - --filename https://github.com/knative/eventing/releases/download/{{< version >}}/eventing.yaml \ - --filename https://github.com/knative/serving/releases/download/{{< version >}}/monitoring.yaml - ``` - -1. To complete the install of Knative and its dependencies, run the - `kubectl apply` command again, this time without the `--selector` flag, to - complete the install of Knative and its dependencies: - - ```bash - kubectl apply --filename https://github.com/knative/serving/releases/download/{{< version >}}/serving.yaml \ - --filename https://github.com/knative/eventing/releases/download/{{< version >}}/eventing.yaml \ - --filename https://github.com/knative/serving/releases/download/{{< version >}}/monitoring.yaml - ``` - -1. Monitor the Knative components until all of the components show a `STATUS` of - `Running`: - ```bash - kubectl get pods --namespace knative-serving - kubectl get pods --namespace knative-eventing - kubectl get pods --namespace knative-monitoring - ``` - -## What's next - -Now that your cluster has Knative installed, you can see what Knative has to -offer. - -To deploy your first app with the -[Getting Started with Knative App Deployment](../serving/getting-started-knative-app.md) -guide. - -Get started with Knative Eventing by walking through one of the -[Eventing Samples](../eventing/samples/). - -[Install Cert-Manager](../serving/installing-cert-manager.md) if you want to use the -[automatic TLS cert provisioning feature](../serving/using-auto-tls.md). - -## Cleaning up - -Running a cluster in IKS costs money, so if you're not using it, you might want -to delete the cluster when you're done. Deleting the cluster also removes -Knative, Istio, and any apps you've deployed. - -To delete the cluster, enter the following command: - -```bash -ibmcloud cs cluster-rm $CLUSTER_NAME -``` diff --git a/docs/install/Knative-with-MicroK8s.md b/docs/install/Knative-with-MicroK8s.md deleted file mode 100644 index 2e87d7c4e..000000000 --- a/docs/install/Knative-with-MicroK8s.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: "Install on MicroK8s" -linkTitle: "MicroK8s" -weight: 10 -type: "docs" ---- - -[MicroK8s](https://microk8s.io) is a lightweight, powerful fully-conformant Kubernetes that tracks upstream releases and makes clustering trivial. It can run on any flavor of Linux that supports [Snap](https://snapcraft.io) packages. It can run on Windows and Mac OS using [Multipass](https://multipass.run). -This guide walks you through the installation of Knative using MicroK8s. - -If you need help or support please reach out on the [Kubernetes forum](https://discuss.kubernetes.io/tags/microk8s) or Kubernetes.slack.com channel #microk8s. -Additionally if you wish to contribute or report an issue please visit [MicroK8s Github](https://github.com/ubuntu/microk8s). - -You can find [guides for other platforms here](./README.md). - -### Install MicroK8s - -```shell -sudo snap install --classic microk8s -``` - -## Alias MicroK8s kubectl for convenience - -```shell -sudo snap alias microk8s.kubectl kubectl -``` - -## Enable Knative - -```shell -echo 'N;' | microk8s.enable knative -``` -This command will install the Knative Serving 0.9.0 and Knative Eventing 0.9.0 components. - -You can check the status of Knative pods using the following commands: - -```shell -kubectl get pods -n knative-serving -``` - -```shell -kubectl get pods -n knative-eventing -``` - -```shell -kubectl get pods -n knative-monitoring -``` - -## Cleaning up - -Knative can be removed from MicroK8s using the following command: - -```shell -sudo microk8s.disable knative -``` - -To delete MicroK8s along with Knative, Istio, and any deployed apps run: - -```shell -sudo snap remove microk8s -``` diff --git a/docs/install/Knative-with-Minikube.md b/docs/install/Knative-with-Minikube.md deleted file mode 100644 index b7b48571f..000000000 --- a/docs/install/Knative-with-Minikube.md +++ /dev/null @@ -1,169 +0,0 @@ ---- -title: "Install on Minikube" -linkTitle: "Minikube" -weight: 10 -type: "docs" ---- - -This guide walks you through the installation of the latest version of -[Knative Serving](https://github.com/knative/serving) using pre-built images and -demonstrates creating and deploying an image of a sample "hello world" app onto -the newly created Knative cluster. - -You can find [guides for other platforms here](./README.md). - -## Before you begin - -Knative requires a Kubernetes cluster v1.15 or newer. - -### Install kubectl and Minikube - -1. If you already have `kubectl` CLI, run `kubectl version` to check the - version. You need v1.10 or newer. If your `kubectl` is older, follow the next - step to install a newer version. - -1. [Install the kubectl CLI](https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-kubectl). - -1. [Install and configure minikube](https://github.com/kubernetes/minikube#installation) - version v0.28.1 or later with a - [VM driver](https://github.com/kubernetes/minikube#requirements), e.g. `kvm2` - on Linux or `hyperkit` on macOS. - -## Creating a Kubernetes cluster - -After kubectl and Minikube are installed, create a cluster with version 1.12 or -greater and your chosen VM driver: - -For Linux use: - -```shell -minikube start --memory=8192 --cpus=6 \ - --kubernetes-version=v1.15.0 \ - --vm-driver=kvm2 \ - --disk-size=30g \ - --extra-config=apiserver.enable-admission-plugins="LimitRanger,NamespaceExists,NamespaceLifecycle,ResourceQuota,ServiceAccount,DefaultStorageClass,MutatingAdmissionWebhook" -``` - -For macOS use: - -```shell -minikube start --memory=8192 --cpus=6 \ - --kubernetes-version=v1.15.0 \ - --vm-driver=hyperkit \ - --disk-size=30g \ - --extra-config=apiserver.enable-admission-plugins="LimitRanger,NamespaceExists,NamespaceLifecycle,ResourceQuota,ServiceAccount,DefaultStorageClass,MutatingAdmissionWebhook" -``` - -## Installing Istio - -Knative depends on [Istio](https://istio.io/docs/concepts/what-is-istio/) for -traffic routing and ingress. You have the option of injecting Istio sidecars and -enabling the Istio service mesh, but it's not required for all Knative -components. - -If your cloud platform offers a managed Istio installation, we recommend -installing Istio that way, unless you need the ability to customize your -installation. - -If you prefer to install Istio manually, if your cloud provider doesn't offer a -managed Istio installation, or if you're installing Knative locally using -Minkube or similar, see the -[Installing Istio for Knative guide](./installing-istio.md). - -> Note: [Ambassador](https://www.getambassador.io/), [Contour](https://projectcontour.io/), and -> [Gloo](https://docs.solo.io/gloo/latest/) are available as an alternative to Istio. -> [Click here](./Knative-with-Ambassador.md) to install Knative with Ambassador. -> [Click here](./Knative-with-Contour.md) to install Knative with Contour. -> [Click here](./Knative-with-Gloo.md) to install Knative with Gloo. - -## Installing `cluster-local-gateway` for serving cluster-internal traffic - -If you installed Istio, you can install a `cluster-local-gateway` within your Knative cluster so that you can serve cluster-internal traffic. If you want to configure your revisions to use routes that are visible only within your cluster, [install and use the `cluster-local-gateway`](./installing-istio.md#updating-your-install-to-use-cluster-local-gateway). - -## Installing Knative - -The following commands install all available Knative components as well as the -standard set of observability plugins. To customize your Knative installation, -see [Performing a Custom Knative Installation](./Knative-custom-install.md). - -1. If you are upgrading from Knative 0.3.x: Update your domain and static IP - address to be associated with the LoadBalancer `istio-ingressgateway` instead - of `knative-ingressgateway`. Then run the following to clean up leftover - resources: - - ```shell - kubectl delete svc knative-ingressgateway -n istio-system - kubectl delete deploy knative-ingressgateway -n istio-system - ``` - - If you have the Knative Eventing Sources component installed, you will also - need to delete the following resource before upgrading: - - ```shell - kubectl delete statefulset/controller-manager -n knative-sources - ``` - - While the deletion of this resource during the upgrade process will not - prevent modifications to Eventing Source resources, those changes will not be - completed until the upgrade process finishes. - -1. To install Knative, first install the CRDs by running the `kubectl apply` - command once with the `-l knative.dev/crd-install=true` flag. This prevents - race conditions during the install, which cause intermittent errors: - - ```shell - kubectl apply --selector knative.dev/crd-install=true \ - --filename https://github.com/knative/serving/releases/download/{{< version >}}/serving.yaml \ - --filename https://github.com/knative/eventing/releases/download/{{< version >}}/eventing.yaml \ - --filename https://github.com/knative/serving/releases/download/{{< version >}}/monitoring.yaml - ``` - -1. To complete the install of Knative and its dependencies, run the - `kubectl apply` command again, this time without the `--selector` flag, to - complete the install of Knative and its dependencies: - - ```shell - kubectl apply --filename https://github.com/knative/serving/releases/download/{{< version >}}/serving.yaml \ - --filename https://github.com/knative/eventing/releases/download/{{< version >}}/eventing.yaml \ - --filename https://github.com/knative/serving/releases/download/{{< version >}}/monitoring.yaml - ``` - -1. Monitor the Knative components until all of the components show a `STATUS` of - `Running`: - - ```shell - kubectl get pods --namespace knative-serving - kubectl get pods --namespace knative-eventing - kubectl get pods --namespace knative-monitoring - ``` - -## Deploying an app - -Now that your cluster has Knative installed, you're ready to deploy an app. - -If you'd like to follow a step-by-step guide for deploying your first app on -Knative, check out the -[Getting Started with Knative App Deployment](../serving/getting-started-knative-app.md) -guide. - -If you'd like to view the available sample apps and deploy one of your choosing, -head to the [sample apps](../serving/samples/README.md) repo. - -> Note: When looking up the IP address to use for accessing your app, you need -> to look up the NodePort for the `istio-ingressgateway` well as the IP address -> used for Minikube. You can use the following command to look up the value to -> use for the {IP_ADDRESS} placeholder used in the samples: - -```shell -INGRESSGATEWAY=istio-ingressgateway - -echo $(minikube ip):$(kubectl get svc $INGRESSGATEWAY --namespace istio-system --output 'jsonpath={.spec.ports[?(@.port==80)].nodePort}') -``` - -## Cleaning up - -Delete the Kubernetes cluster along with Knative, Istio, and any deployed apps: - -```shell -minikube delete -``` diff --git a/docs/install/Knative-with-PKS.md b/docs/install/Knative-with-PKS.md deleted file mode 100644 index a094b370f..000000000 --- a/docs/install/Knative-with-PKS.md +++ /dev/null @@ -1,143 +0,0 @@ ---- -title: "Install on Pivotal Container Service" -linkTitle: "Pivotal Container Service" -weight: 10 -type: "docs" ---- - -This guide walks you through the installation of the latest version of Knative -using pre-built images. - -You can find [guides for other platforms here](./README.md). - -## Before you begin - -Knative requires a Kubernetes cluster v1.15 or newer, as well as a compatible -`kubectl`. This guide walks you through creating a cluster with the correct -specifications for Knative on Pivotal Container Service. - -This guide assumes you are using bash in a Mac or Linux environment; some -commands will need to be adjusted for use in a Windows environment. - -### Installing Pivotal Container Service - -To install Pivotal Container Service (PKS), follow the documentation at -https://docs.pivotal.io/runtimes/pks/1-1/installing-pks.html. - -## Creating a Kubernetes cluster - -> NOTE: Knative uses Istio sidecar injection and requires privileged mode for -> your init containers. - -To enable privileged mode and create a cluster: - -1. Enable privileged mode: - 1. Open the Pivotal Container Service tile in PCF Ops Manager. - 1. In the plan configuration that you want to use, enable both of the - following: - - Enable Privileged Containers - Use with caution - - Disable DenyEscalatingExec - 1. Save your changes. - 1. In the PCF Ops Manager, review and then apply your changes. -1. [Create a cluster](https://docs.pivotal.io/runtimes/pks/1-1/create-cluster.html). - -## Access the cluster - -To retrieve your cluster credentials, follow the documentation at -https://docs.pivotal.io/runtimes/pks/1-1/cluster-credentials.html. - -## Installing Istio - -Knative depends on Istio. If your cloud platform offers a managed Istio -installation, we recommend installing Istio that way, unless you need the -ability to customize your installation. For example, the -[GKE Install Guide](./Knative-with-GKE.md) includes the instructions for -installing Istio on your cluster using `gcloud`. - -If you prefer to install Istio manually, if your cloud provider doesn't offer a -managed Istio installation, or if you're installing Knative locally using -Minkube or similar, see the -[Installing Istio for Knative guide](./installing-istio.md). - -You must install Istio on your Kubernetes cluster before continuing with these -instructions to install Knative. - -## Installing `cluster-local-gateway` for serving cluster-internal traffic - -If you installed Istio, you can install a `cluster-local-gateway` within your Knative cluster so that you can serve cluster-internal traffic. If you want to configure your revisions to use routes that are visible only within your cluster, [install and use the `cluster-local-gateway`](./installing-istio.md#updating-your-install-to-use-cluster-local-gateway). - -## Installing Knative - -The following commands install all available Knative components as well as the -standard set of observability plugins. To customize your Knative installation, -see [Performing a Custom Knative Installation](./Knative-custom-install.md). - -1. If you are upgrading from Knative 0.3.x: Update your domain and static IP - address to be associated with the LoadBalancer `istio-ingressgateway` instead - of `knative-ingressgateway`. Then run the following to clean up leftover - resources: - - ``` - kubectl delete svc knative-ingressgateway -n istio-system - kubectl delete deploy knative-ingressgateway -n istio-system - ``` - - If you have the Knative Eventing Sources component installed, you will also - need to delete the following resource before upgrading: - - ``` - kubectl delete statefulset/controller-manager -n knative-sources - ``` - - While the deletion of this resource during the upgrade process will not - prevent modifications to Eventing Source resources, those changes will not be - completed until the upgrade process finishes. - -1. To install Knative, first install the CRDs by running the `kubectl apply` - command once with the `-l knative.dev/crd-install=true` flag. This prevents - race conditions during the install, which cause intermittent errors: - - ```bash - kubectl apply --selector knative.dev/crd-install=true \ - --filename https://github.com/knative/serving/releases/download/{{< version >}}/serving.yaml \ - --filename https://github.com/knative/eventing/releases/download/{{< version >}}/eventing.yaml \ - --filename https://github.com/knative/serving/releases/download/{{< version >}}/monitoring.yaml - ``` - -1. To complete the install of Knative and its dependencies, run the - `kubectl apply` command again, this time without the `--selector` flag, to - complete the install of Knative and its dependencies: - - ```bash - kubectl apply --filename https://github.com/knative/serving/releases/download/{{< version >}}/serving.yaml \ - --filename https://github.com/knative/eventing/releases/download/{{< version >}}/eventing.yaml \ - --filename https://github.com/knative/serving/releases/download/{{< version >}}/monitoring.yaml - ``` - -1. Monitor the Knative components until all of the components show a `STATUS` of - `Running`: - ```bash - kubectl get pods --namespace knative-serving - kubectl get pods --namespace knative-eventing - kubectl get pods --namespace knative-monitoring - ``` - -## What's next - -Now that your cluster has Knative installed, you can see what Knative has to -offer. - -To deploy your first app with the -[Getting Started with Knative App Deployment](../serving/getting-started-knative-app.md) -guide. - -Get started with Knative Eventing by walking through one of the -[Eventing Samples](../eventing/samples/). - -[Install Cert-Manager](../serving/installing-cert-manager.md) if you want to use the -[automatic TLS cert provisioning feature](../serving/using-auto-tls.md). - -## Cleaning up - -To delete the cluster, follow the documentation at -https://docs.pivotal.io/runtimes/pks/1-1/delete-cluster.html. diff --git a/docs/install/README.md b/docs/install/README.md index c019de188..c2bf85aba 100644 --- a/docs/install/README.md +++ b/docs/install/README.md @@ -1,146 +1,4 @@ -Follow this guide to install Knative components on a platform of your choice. +To install Knative components on your Kubernetes cluster, follow our [installation guide](./knative-with-any-k8s.md). -## Choosing a Kubernetes cluster - -To get started with Knative, you need a Kubernetes cluster. If you aren't sure -which Kubernetes platform is right for you, see -[Picking the Right Solution](https://kubernetes.io/docs/setup/). - -We provide information for installing Knative on -[Google Kubernetes Engine](https://cloud.google.com/kubernetes-engine/docs/), -[IBM Cloud Kubernetes Service](https://www.ibm.com/cloud/container-service), -[IBM Cloud Private](https://www.ibm.com/cloud/private), -[Azure Kubernetes Service](https://docs.microsoft.com/en-us/azure/aks/), -[Minikube](https://kubernetes.io/docs/setup/minikube/), -[OpenShift](https://github.com/openshift/origin) and -[Pivotal Container Service](https://pivotal.io/platform/pivotal-container-service) -clusters. - -## Installing Knative - -Knative depends on an Ingress/Gateway which is capable of routing requests to -Knative Services. - -Currently, four options exist which provide this functionality: -[Ambassador](https://www.getambassador.io/), an Envoy-based API Gateway, -[Contour](https://projectcontour.io/), an Envoy-based ingress, -[Gloo](https://docs.solo.io/gloo/latest/), an Envoy-based API Gateway, and -[Istio](https://istio.io/), an Envoy-based Service Mesh. - -## Installing Knative with Ambassador - -[Installing with Ambassador](./Knative-with-Ambassador.md) gives us an -alternative to installing a service mesh for routing to applications with the -Knative Serving component. - -## Installing Knative with Contour - -[Install with Contour](./Knative-with-Contour.md): Contour can handle all of -the networking requirements for a full Knative installation. - -## Installing Knative with Gloo - -[Install with Gloo](./Knative-with-Gloo.md): Gloo functions as a lightweight gateway for Knative. Choose this option if you don't require a service mesh in your cluster and want a lightweight alternative to Istio. Gloo supports all documented Knative features, as well as extensions to Serving such as Eventing and Monitoring. - -## Installing Knative with Istio - -Istio is a popular service mesh that includes a Knative-compatible ingress. -Choose this option if you wish to use Istio service mesh features. - -There are several options when installing Knative: - -- **Comprehensive install** -- Comes with the default versions of all Knative - components as well as a set of observability plugins. Quickest option for - setup. - -- **Limited install** -- Installs a subset of Knative components. - -- **Custom install** -- Takes longer, but allows you to choose exactly which - components and oberservability plugins to install. - -For new users, we recommend the comprehensive install to get you up and running -quickly. - -## Installing Knative with Kourier - -[Installing Knative with Kourier](./knative-with-kourier.md): In this guide, Knative will be installed with Kourier to replace the Istio Service Mesh, providing a more lightweight and simple Ingress controller. Note that Istio is required for the Knative Eventing component. - -### Install guides - -Follow these step-by-step guides for setting up Kubernetes and installing -Knative components. - -**Comprehensive install guides** - -The guides below show you how to create a Kubernetes cluster with the right -specs for Knative on your platform of choice, then walk through installing all -available Knative components and a set of observability plugins. - -- [Knative Install on Azure Kubernetes Service](./Knative-with-AKS.md) -- [Knative Install on Gardener](./Knative-with-Gardener.md) -- [Knative Install on Google Kubernetes Engine](./Knative-with-GKE.md) -- [Knative Install on IBM Cloud Kubernetes Service](./Knative-with-IKS.md) -- [Knative Install on IBM Cloud Private](./Knative-with-ICP.md) -- [Knative Install on Minikube](./Knative-with-Minikube.md) -- [Knative Install on OpenShift Container Platform](https://docs.openshift.com/container-platform/4.1/serverless/installing-openshift-serverless.html) -- [Knative Install on Pivotal Container Service](./Knative-with-PKS.md) - -If you already have a Kubernetes cluster you're comfortable installing _alpha_ -software on, use the following guide to install all Knative components: - -- [Knative Install on any Kubernetes](./Knative-with-any-k8s.md) - -**Limited install guides** - -The guides below install some of the available Knative components, without all -available observability plugins, to minimize the disk space used for install. - -- [Knative Install on Docker for Mac](./Knative-with-Docker-for-Mac.md) - -**Custom install guide** - -To choose which components and observability plugins to install, follow the -custom install guide: - -- [Performing a Custom Knative Installation](./Knative-custom-install.md) - -> **Note**: If need to set up a Kubernetes cluster with the correct -> specifications to run Knative, you can follow any of the install instructions -> through the creation of the cluster, then follow the -> [Performing a Custom Knative Installation](./Knative-custom-install.md) guide. - -**Observability install guide** - -Follow this guide to install and set up the available observability plugins on a -Knative cluster. - -- [Monitoring, Logging and Tracing Installation](../serving/installing-logging-metrics-traces.md) - -## Deploying an app - -Now you're ready to deploy an app: - -- Follow the step-by-step - [Getting Started with Knative App Deployment](../serving/getting-started-knative-app.md) - guide. - -- View the available [sample apps](../serving/samples) and deploy one of your - choosing. - -- Walk through the Google codelab, - [Using Knative to deploy serverless applications to Kubernetes](https://codelabs.developers.google.com/codelabs/knative-intro/#0). - -## Configuring Knative Serving - -After your Knative installation is running, you can set up a custom domain with -a static IP address to be able to use Knative for publicly available services, -and set up TLS certificates to use HTTPS: - -- [Assign a static IP address](../serving/gke-assigning-static-ip-address.md) -- [Configure a custom domain](../serving/using-a-custom-domain.md) -- [Configuring HTTPS with a custom certificate](../serving/using-a-tls-cert.md) - -## Checking the version of your Knative Serving installation - -- [Checking the version of your Knative Serving installation](./check-install-version.md) +To install the Knative CLI, follow our [installation guide](./install-kn.md). diff --git a/docs/install/Knative-with-any-k8s.md b/docs/install/knative-with-any-k8s.md similarity index 86% rename from docs/install/Knative-with-any-k8s.md rename to docs/install/knative-with-any-k8s.md index 3a5cc04fc..237efd287 100644 --- a/docs/install/Knative-with-any-k8s.md +++ b/docs/install/knative-with-any-k8s.md @@ -1,7 +1,20 @@ --- title: "Installing Knative" -weight: 15 +weight: 06 type: "docs" +aliases: + - /docs/install/knative-with-aks + - /docs/install/knative-with-ambassador + - /docs/install/knative-with-contour + - /docs/install/knative-with-docker-for-mac + - /docs/install/knative-with-gke + - /docs/install/knative-with-gardener + - /docs/install/knative-with-gloo + - /docs/install/knative-with-icp + - /docs/install/knative-with-iks + - /docs/install/knative-with-microk8s + - /docs/install/knative-with-minikube + - /docs/install/knative-with-pks --- This guide walks you through the installation of the latest version of Knative. @@ -344,6 +357,9 @@ The following command installs an implementation of Channel that runs in-memory. {{< /tab >}} + + + {{< /tabs >}} @@ -384,8 +400,6 @@ data: {{< /tab >}} - - {{< /tabs >}} 1. Monitor the Knative components until all of the components show a `STATUS` of @@ -411,6 +425,55 @@ The following command enables the default Broker on a namespace (here `default`) {{< /tab >}} +{{% tab name="Github Source" %}} +The following command installs the Github Source: + + ```bash + kubectl apply --filename https://github.com/knative/eventing-contrib/releases/download/{{< version >}}/github.yaml + ``` + +To learn more about the Github source, try [our sample](../eventing/samples/github-source/README.md) + +{{< /tab >}} + +{{% tab name="Camel Source" %}} +The following command installs the Camel Source: + + ```bash + kubectl apply --filename https://github.com/knative/eventing-contrib/releases/download/{{< version >}}/camel.yaml + ``` + +To learn more about the Camel source, try [our sample](../eventing/samples/apache-camel-source/README.md) + +{{< /tab >}} + +{{% tab name="Kafka Source" %}} +The following command installs the Kafka Source: + + ```bash + kubectl apply --filename https://github.com/knative/eventing-contrib/releases/download/{{< version >}}/kafka-source.yaml + ``` + +To learn more about the Kafka source, try [our sample](../eventing/samples/kafka/source/README.md) + +{{< /tab >}} + +{{% tab name="GCP Pub/Sub Source" %}} +The following command installs the GCP Pub/Sub Source: + + ```bash + # This installs both the Source and the Channel. + kubectl apply --filename https://github.com/google/knative-gcp/releases/download/{{< version >}}/cloud-run-events.yaml + ``` + +To learn more about the GCP Pub/Sub source, try [our sample](../eventing/samples/gcp-pubsub-source/README.md) + +{{< /tab >}} + + + + + {{< /tabs >}} @@ -425,19 +488,19 @@ You can find a number of sample on how to get started with Knative Eventing [her Knative provides a bundle of monitoring components that can be used to make the Serving and Eventing components more observable. -- Install Prometheus and Grafana for metrics: +- Install [Prometheus](https://prometheus.io/) and [Grafana](https://grafana.com/) for metrics: ```bash kubectl apply --filename https://github.com/knative/serving/releases/download/{{< version >}}/monitoring-metrics-prometheus.yaml ``` -- Install the ELK stack (Elasticsearch, Logstash and Kibana) for logs: +- Install the [ELK stack](https://www.elastic.co/what-is/elk-stack) (Elasticsearch, Logstash and Kibana) for logs: ```bash kubectl apply --filename https://github.com/knative/serving/releases/download/{{< version >}}/monitoring-logs-elasticsearch.yaml ``` -- Install Jaeger for distributed tracing +- Install [Jaeger](https://jaegertracing.io/) for distributed tracing {{< tabs name="jaeger" default="In-Memory (standalone)" >}} @@ -458,7 +521,7 @@ kubectl apply --filename https://github.com/knative/serving/releases/download/{{ {{< /tab >}} {{< /tabs >}} -- Install Zipkin for distributed tracing +- Install [Zipkin](https://zipkin.io/) for distributed tracing {{< tabs name="zipkin" default="In-Memory (standalone)" >}} diff --git a/docs/install/knative-with-kourier.md b/docs/install/knative-with-kourier.md deleted file mode 100644 index 3ccd724e0..000000000 --- a/docs/install/knative-with-kourier.md +++ /dev/null @@ -1,162 +0,0 @@ ---- -title: "Installing Knative with Kourier" -linkTitle: "Kourier Ingress and Knative" -weight: 15 -type: "docs" ---- - -[Kourier](https://github.com/3scale/kourier) is an open-source lightweight Knative Ingress based on Envoy. It's been designed for Knative, without requiring any additional custom resource definitions (CRDs). - -This guide walks you through the installation of the latest version of Knative -with Kourier as the ingress. - -## Before you Begin - -Knative requires a Kubernetes cluster v1.14 or newer, as well as a compatible `kubectl`. This guide assumes that you have already [created a Kubernetes cluster](https://kubernetes.io/docs/setup/) and are using -bash in a Mac or Linux environment. - -## Install Knative - -Let's do a core install of Knative Serving with the released yaml templates: - -1. To install Knative, first install the CRDs by running the following `kubectl apply` - command. This prevents race conditions during the install, which cause intermittent errors: - - kubectl apply --filename https://github.com/knative/serving/releases/download/{{< version >}}/serving-crds.yaml - -1. To complete the install of Knative and its dependencies, next run the - following `kubectl apply` command: - - kubectl apply --filename https://github.com/knative/serving/releases/download/{{< version >}}/serving-core.yaml - -1. Monitor the Knative Serving namespace and wait until all of the pods come up with a - `STATUS` of `Running`: - - ``` - kubectl get pods -w -n knative-serving - ``` - - -## Install Kourier - -Knative default installation uses Istio to handle internal and external traffic. If you are just interested in exposing Knative applications to the external network, a service mesh adds overhead and increases the system complexity. Kourier provides a way to expose your Knative application in a more simple and lightweight way. - -You can install Kourier with `kubectl`: - -``` -kubectl apply \ - --filename https://raw.githubusercontent.com/knative/serving/{{< version >}}/third_party/kourier-latest/kourier.yaml -``` - -## Configuring the Knative ingress class - -Kourier only exposes ingresses that have the "kourier" ingress class. By default Knative annotates all the ingresses for Istio but you can change that by patching the "config-network" configmap as follows: - -``` -kubectl patch configmap/config-network \ - -n knative-serving \ - --type merge \ - -p '{"data":{"ingress.class":"kourier.ingress.networking.knative.dev"}}' -``` - -## Configuring DNS - -Installing Kourier will create a Kubernetes Service with type `LoadBalancer`. -This may take some time to get an IP address assigned, during this process, it -will appear as ``. You must wait for this IP address to be assigned -before DNS may be set up. - -To get the external IP address, use the following command: - -``` -kubectl get svc kourier -n kourier-system - -NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE -kourier LoadBalancer 10.43.242.100 172.22.0.2 80:31828/TCP 19m - -``` - -This external IP can be used with your DNS provider with a wildcard `A` record; -however, for a basic functioning DNS setup (not suitable for production!) this -external IP address can be added to the `config-domain` ConfigMap in -`knative-serving`. You can edit this with the following command: - -``` -kubectl edit cm config-domain --namespace knative-serving -``` - -Given the external IP above, change the content to: - -``` -apiVersion: v1 -kind: ConfigMap -metadata: - name: config-domain - namespace: knative-serving -data: - # xip.io is a "magic" DNS provider, which resolves all DNS lookups for: - # *.{ip}.xip.io to {ip}. - 172.22.0.2.xip.io: "" -``` - -## Deploying an Application - -Now that Kourier is running and Knative is configured properly, you can go ahead and create your first Knative application: - -1. Create a `Knative Service` - - For this demo, a simple helloworld application written in go will be used. - Copy the YAML below to a file called `helloworld-go.yaml` and apply it with - `kubectl` - - ```yaml - apiVersion: serving.knative.dev/v1 - kind: Service - metadata: - name: helloworld-go - namespace: default - spec: - template: - spec: - containers: - - image: gcr.io/knative-samples/helloworld-go - env: - - name: TARGET - value: Go Sample v1 - ``` - - ``` - kubectl apply -f helloworld-go.yaml - ``` - -1. Send a request - - `Knative Service`s are exposed via a `Host` header assigned by Knative. By - default, Knative will assign the `Host`: - `{service-name}.{namespace}.{the domain we have setup above}`. You can see this - with: - - ``` - $ kubectl get ksvc helloworld-go - NAME URL LATESTCREATED LATESTREADY READY REASON - helloworld-go http://helloworld-go.default.172.22.0.2.xip.io helloworld-go-ps7lp helloworld-go-ps7lp True - ``` - - You can send a request to the `helloworld-go` service with curl - using the `URL` given above: - - ``` - $ curl http://helloworld-go.default.172.22.0.2.xip.io - - Hello Go Sample v1! - ``` - -Congratulations! You have successfully installed Knative with Kourier to manage and route your serverless applications! - -## What's next - -- Try the - [Getting Started with App Deployment guide](../serving/getting-started-knative-app.md) - for Knative serving. -- Get started with Knative Eventing by walking through one of the - [Eventing Samples](../eventing/samples/).