mirror of https://github.com/knative/docs.git
Format markdown (#1600)
* Format markdown Produced via: `prettier --write --prose-wrap=always $(find -name '*.md' | grep -v vendor | grep -v .github)` /assign @samodell * Remove backticks The indentation and backticks are redundant, so the backticks show up in the `<pre>` block.
This commit is contained in:
parent
e850446660
commit
14cb5fb401
|
@ -35,7 +35,8 @@ to run multiple installation commands.
|
||||||
|
|
||||||
## Installing Istio
|
## Installing Istio
|
||||||
|
|
||||||
> Note: [Ambassador](https://www.getambassador.io/) and [Gloo](https://gloo.solo.io/) are available as an alternative to Istio.
|
> Note: [Ambassador](https://www.getambassador.io/) and
|
||||||
|
> [Gloo](https://gloo.solo.io/) are available as an alternative to Istio.
|
||||||
> [Click here](./Knative-with-Ambassador.md) to install Knative with Ambassador.
|
> [Click here](./Knative-with-Ambassador.md) to install Knative with Ambassador.
|
||||||
> [Click here](./Knative-with-Gloo.md) to install Knative with Gloo.
|
> [Click here](./Knative-with-Gloo.md) to install Knative with Gloo.
|
||||||
|
|
||||||
|
|
|
@ -133,7 +133,8 @@ recommended configuration for a cluster is:
|
||||||
|
|
||||||
## Installing Istio
|
## Installing Istio
|
||||||
|
|
||||||
> Note: [Ambassador](https://www.getambassador.io/) and [Gloo](https://gloo.solo.io/) are available as an alternative to Istio.
|
> Note: [Ambassador](https://www.getambassador.io/) and
|
||||||
|
> [Gloo](https://gloo.solo.io/) are available as an alternative to Istio.
|
||||||
> [Click here](./Knative-with-Ambassador.md) to install Knative with Ambassador.
|
> [Click here](./Knative-with-Ambassador.md) to install Knative with Ambassador.
|
||||||
> [Click here](./Knative-with-Gloo.md) to install Knative with Gloo.
|
> [Click here](./Knative-with-Gloo.md) to install Knative with Gloo.
|
||||||
|
|
||||||
|
|
|
@ -6,31 +6,31 @@ type: "docs"
|
||||||
---
|
---
|
||||||
|
|
||||||
[Ambassador](https://www.getambassador.io/) is a popular Kubernetes-native,
|
[Ambassador](https://www.getambassador.io/) is a popular Kubernetes-native,
|
||||||
open-source API gateway built on
|
open-source API gateway built on [Envoy Proxy](https://www.envoyproxy.io/).
|
||||||
[Envoy Proxy](https://www.envoyproxy.io/).
|
|
||||||
|
|
||||||
This guide walks you through the installation of the latest version of Knative
|
This guide walks you through the installation of the latest version of Knative
|
||||||
using pre-built images.
|
using pre-built images.
|
||||||
|
|
||||||
## Before you Begin
|
## Before you Begin
|
||||||
|
|
||||||
Knative requires a Kubernetes cluster v1.11 or newer with the
|
Knative requires a Kubernetes cluster v1.11 or newer with the
|
||||||
[MutatingAdmissionWebhook admission controller](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#how-do-i-turn-on-an-admission-controller)
|
[MutatingAdmissionWebhook admission controller](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#how-do-i-turn-on-an-admission-controller)
|
||||||
enabled.
|
enabled.
|
||||||
|
|
||||||
`kubectl` v1.10 is also required.
|
`kubectl` v1.10 is also required.
|
||||||
|
|
||||||
This guide assumes that you have already
|
This guide assumes that you have already
|
||||||
[created a Kubernetes cluster](https://kubernetes.io/docs/setup/) and are using
|
[created a Kubernetes cluster](https://kubernetes.io/docs/setup/) and are using
|
||||||
bash in a Mac or Linux environment.
|
bash in a Mac or Linux environment.
|
||||||
|
|
||||||
## Install Ambassador
|
## Install Ambassador
|
||||||
|
|
||||||
Knative was originally built using Istio to handle cluster networking. While
|
Knative was originally built using Istio to handle cluster networking. While the
|
||||||
the Istio gateway provides the functionality needed to serve requests to your
|
Istio gateway provides the functionality needed to serve requests to your
|
||||||
application, installing a service mesh to handle north-south traffic carries
|
application, installing a service mesh to handle north-south traffic carries
|
||||||
some operational overhead with it. Ambassador provides a way to get traffic to
|
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.
|
your Knative application without the overhead or complexity of a full service
|
||||||
|
mesh.
|
||||||
|
|
||||||
You can install Ambassador with `kubectl`:
|
You can install Ambassador with `kubectl`:
|
||||||
|
|
||||||
|
@ -39,8 +39,8 @@ kubectl apply -f https://getambassador.io/yaml/ambassador/ambassador-knative.yam
|
||||||
kubectl apply -f https://getambassador.io/yaml/ambassador/ambassador-service.yaml
|
kubectl apply -f https://getambassador.io/yaml/ambassador/ambassador-service.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
Ambassador will watch for and create routes based off of Knative
|
Ambassador will watch for and create routes based off of Knative
|
||||||
`ClusterIngress` resources. These will then be accessible over the external IP
|
`ClusterIngress` resources. These will then be accessible over the external IP
|
||||||
address of the Ambassador service you just created.
|
address of the Ambassador service you just created.
|
||||||
|
|
||||||
Get this external IP address and save it in a variable named `AMBASSADOR_IP`
|
Get this external IP address and save it in a variable named `AMBASSADOR_IP`
|
||||||
|
@ -56,45 +56,43 @@ $ AMBASSADOR_IP=35.229.120.99
|
||||||
|
|
||||||
## Install Knative
|
## Install Knative
|
||||||
|
|
||||||
Now that Ambassador is installed to handle ingress to your serverless
|
Now that Ambassador is installed to handle ingress to your serverless
|
||||||
applications, you need to install Knative to manage them.
|
applications, you need to install Knative to manage them.
|
||||||
|
|
||||||
The following commands install all available Knative components as well as the
|
The following commands install all available Knative components as well as the
|
||||||
standard set of observability plugins. To customize your Knative installation,
|
standard set of observability plugins. To customize your Knative installation,
|
||||||
see Performing a Custom Knative Installation.
|
see Performing a Custom Knative Installation.
|
||||||
|
|
||||||
1. To install Knative, first install the CRDs by running the `kubectl apply`
|
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
|
command once with the `-l knative.dev/crd-install=true` flag. This prevents
|
||||||
race conditions during the install, which cause intermittent errors:
|
race conditions during the install, which cause intermittent errors:
|
||||||
|
|
||||||
```
|
kubectl apply -l knative.dev/crd-install=true \
|
||||||
kubectl apply -l knative.dev/crd-install=true \
|
--filename https://github.com/knative/serving/releases/download/v0.7.1/serving.yaml \
|
||||||
--filename https://github.com/knative/serving/releases/download/v0.7.1/serving.yaml \
|
--filename https://github.com/knative/build/releases/download/v0.7.1/build.yaml \
|
||||||
--filename https://github.com/knative/build/releases/download/v0.7.1/build.yaml \
|
--filename https://github.com/knative/serving/releases/download/v0.7.1/monitoring.yaml
|
||||||
--filename https://github.com/knative/serving/releases/download/v0.7.1/monitoring.yaml
|
|
||||||
```
|
|
||||||
2. To complete the install of Knative and it's dependencies, run the
|
|
||||||
`kubectl apply` command again, this time without the
|
|
||||||
`-l knative.dev/crd-install=true`:
|
|
||||||
|
|
||||||
```
|
2. To complete the install of Knative and it's dependencies, run the
|
||||||
kubectl apply --filename https://github.com/knative/serving/releases/download/v0.7.1 serving.yaml --selector networking.knative.dev/certificate-provider!=cert-manager \
|
`kubectl apply` command again, this time without the
|
||||||
--filename https://github.com/knative/build/releases/download/v0.7.1/build.yaml \
|
`-l knative.dev/crd-install=true`:
|
||||||
--filename https://github.com/knative/serving/releases/download/v0.7.1/monitoring.yaml
|
|
||||||
```
|
|
||||||
> **Notes**:
|
|
||||||
>
|
|
||||||
> - By default, the Knative Serving component installation (`serving.yaml`)
|
|
||||||
> includes a controller for
|
|
||||||
> [enabling automatic TLS certificate provisioning](../serving/using-auto-tls.md).
|
|
||||||
> If you do intend on immediately enabling auto certificates in Knative,
|
|
||||||
> you can remove the
|
|
||||||
> `--selector networking.knative.dev/certificate-provider!=cert-manager`
|
|
||||||
> statement to install the controller. Otherwise, you can choose to install
|
|
||||||
> the auto certificates feature and controller at a later time.
|
|
||||||
|
|
||||||
3. Monitor the Knative namespaces and wait until all of the pods come up with
|
kubectl apply --filename https://github.com/knative/serving/releases/download/v0.7.1 serving.yaml --selector networking.knative.dev/certificate-provider!=cert-manager \
|
||||||
a `STATUS` of `Running`:
|
--filename https://github.com/knative/build/releases/download/v0.7.1/build.yaml \
|
||||||
|
--filename https://github.com/knative/serving/releases/download/v0.7.1/monitoring.yaml
|
||||||
|
|
||||||
|
> **Notes**:
|
||||||
|
>
|
||||||
|
> - By default, the Knative Serving component installation (`serving.yaml`)
|
||||||
|
> includes a controller for
|
||||||
|
> [enabling automatic TLS certificate provisioning](../serving/using-auto-tls.md).
|
||||||
|
> If you do intend on immediately enabling auto certificates in Knative,
|
||||||
|
> you can remove the
|
||||||
|
> `--selector networking.knative.dev/certificate-provider!=cert-manager`
|
||||||
|
> statement to install the controller. Otherwise, you can choose to
|
||||||
|
> install the auto certificates feature and controller at a later time.
|
||||||
|
|
||||||
|
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
|
kubectl get pods -w --all-namespaces
|
||||||
|
@ -102,60 +100,60 @@ race conditions during the install, which cause intermittent errors:
|
||||||
|
|
||||||
## Deploying an Application
|
## Deploying an Application
|
||||||
|
|
||||||
Now that Knative and Ambassador are running, you can use them to manage and
|
Now that Knative and Ambassador are running, you can use them to manage and
|
||||||
route traffic to a serverless application.
|
route traffic to a serverless application.
|
||||||
|
|
||||||
1. Create a `Knative Service`
|
1. Create a `Knative Service`
|
||||||
|
|
||||||
For this demo, a simple helloworld application written in go will be used.
|
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
|
Copy the YAML below to a file called `helloworld-go.yaml` and apply it with
|
||||||
with `kubectl`
|
`kubectl`
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
apiVersion: serving.knative.dev/v1alpha1
|
apiVersion: serving.knative.dev/v1alpha1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: helloworld-go
|
name: helloworld-go
|
||||||
namespace: default
|
namespace: default
|
||||||
spec:
|
spec:
|
||||||
template:
|
template:
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- image: gcr.io/knative-samples/helloworld-go
|
- image: gcr.io/knative-samples/helloworld-go
|
||||||
env:
|
env:
|
||||||
- name: TARGET
|
- name: TARGET
|
||||||
value: Go Sample v1
|
value: Go Sample v1
|
||||||
```
|
```
|
||||||
|
|
||||||
```
|
```
|
||||||
kubectl apply -f helloworld-go.yaml
|
kubectl apply -f helloworld-go.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Send a request
|
2. Send a request
|
||||||
|
|
||||||
`Knative Service`s are exposed via a `Host` header assigned by Knative.
|
`Knative Service`s are exposed via a `Host` header assigned by Knative. By
|
||||||
By default, Knative will assign the
|
default, Knative will assign the `Host`:
|
||||||
`Host`: `{service-name}.{namespace}.example.com`. You can verify this by
|
`{service-name}.{namespace}.example.com`. You can verify this by checking the
|
||||||
checking the `EXTERNAL-IP` of the `helloworld-go` service created above.
|
`EXTERNAL-IP` of the `helloworld-go` service created above.
|
||||||
|
|
||||||
```
|
```
|
||||||
$ kubectl get service helloworld-go
|
$ kubectl get service helloworld-go
|
||||||
|
|
||||||
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
|
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
|
||||||
helloworld-go ExternalName <none> helloworld-go.default.example.com <none> 32m
|
helloworld-go ExternalName <none> helloworld-go.default.example.com <none> 32m
|
||||||
```
|
```
|
||||||
|
|
||||||
Ambassador will use this `Host` header to route requests to the correct
|
Ambassador will use this `Host` header to route requests to the correct
|
||||||
service. You can send a request to the `helloworld-go` service with curl
|
service. You can send a request to the `helloworld-go` service with curl
|
||||||
using the `Host` and `AMBASSADOR_IP` from above:
|
using the `Host` and `AMBASSADOR_IP` from above:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ curl -H "Host: helloworld-go.default.example.com" $AMBASSADOR_IP
|
$ curl -H "Host: helloworld-go.default.example.com" $AMBASSADOR_IP
|
||||||
|
|
||||||
Hello Go Sample v1!
|
Hello Go Sample v1!
|
||||||
```
|
```
|
||||||
|
|
||||||
Congratulations! You have successfully installed Knative with Ambassador to
|
Congratulations! You have successfully installed Knative with Ambassador to
|
||||||
manage and route to serverless applications!
|
manage and route to serverless applications!
|
||||||
|
|
||||||
## What's next
|
## What's next
|
||||||
|
@ -163,7 +161,5 @@ manage and route to serverless applications!
|
||||||
- Try the
|
- Try the
|
||||||
[Getting Started with App Deployment guide](./getting-started-knative-app/)
|
[Getting Started with App Deployment guide](./getting-started-knative-app/)
|
||||||
for Knative serving.
|
for Knative serving.
|
||||||
- Take a look at the rest of what
|
- Take a look at the rest of what
|
||||||
[Knative has to offer](https://knative.dev/docs/index.html)
|
[Knative has to offer](https://knative.dev/docs/index.html)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -118,7 +118,7 @@ the recommended configuration for a cluster is:
|
||||||
1. Create a Kubernetes cluster on GKE with the required specifications:
|
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.
|
> Note: If this setup is for development, or a non-Istio networking layer (e.g.
|
||||||
> [Ambassador](./Knative-with-Ambassador.md) or [Gloo](./Knative-with-Gloo.md))
|
> [Ambassador](./Knative-with-Ambassador.md) or [Gloo](./Knative-with-Gloo.md))
|
||||||
> will be used, then you can remove the `--addons` line below.
|
> 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
|
> Note: If you want to use [Auto TLS feature](../serving/using-auto-tls.md), you
|
||||||
|
|
|
@ -58,7 +58,8 @@ minikube start --memory=8192 --cpus=6 \
|
||||||
|
|
||||||
## Installing Istio
|
## Installing Istio
|
||||||
|
|
||||||
> Note: [Ambassador](https://www.getambassador.io/) and [Gloo](https://gloo.solo.io/) are available as an alternative to Istio.
|
> Note: [Ambassador](https://www.getambassador.io/) and
|
||||||
|
> [Gloo](https://gloo.solo.io/) are available as an alternative to Istio.
|
||||||
> [Click here](./Knative-with-Ambassador.md) to install Knative with Ambassador.
|
> [Click here](./Knative-with-Ambassador.md) to install Knative with Ambassador.
|
||||||
> [Click here](./Knative-with-Gloo.md) to install Knative with Gloo.
|
> [Click here](./Knative-with-Gloo.md) to install Knative with Gloo.
|
||||||
|
|
||||||
|
|
|
@ -29,9 +29,9 @@ Currently, three options exist which provide this functionality:
|
||||||
## Installing Knative with Ambassador
|
## Installing Knative with Ambassador
|
||||||
|
|
||||||
[Installing with Ambassador](./Knative-with-Ambassador.md) gives us an
|
[Installing with Ambassador](./Knative-with-Ambassador.md) gives us an
|
||||||
alternative to installing a service mesh for routing to applications
|
alternative to installing a service mesh for routing to applications with the
|
||||||
with the Knative Serving component. Note that Istio is required for the
|
Knative Serving component. Note that Istio is required for the Knative Eventing
|
||||||
Knative Eventing component.
|
component.
|
||||||
|
|
||||||
## Installing Knative with Gloo
|
## Installing Knative with Gloo
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue