Format markdown (#620)

Produced via: `prettier --write --proseWrap=always $(find -name '*.md' | grep -v vendor)`
This commit is contained in:
mattmoor-sockpuppet 2018-12-03 13:54:25 -08:00 committed by Knative Prow Robot
parent b83769e72d
commit 41462c69e1
83 changed files with 3472 additions and 3252 deletions

View File

@ -1,9 +1,7 @@
## Expected Behavior ## Expected Behavior
## Actual Behavior ## Actual Behavior
## Steps to Reproduce the Problem ## Steps to Reproduce the Problem
1. 1.

View File

@ -2,6 +2,6 @@ Fixes #(issue-number)
## Proposed Changes ## Proposed Changes
* -
* -
* -

View File

@ -9,11 +9,11 @@ Each of the components under the Knative project attempt to identify common patt
codify the best practices that are shared by successful real-world Kubernetes-based frameworks and codify the best practices that are shared by successful real-world Kubernetes-based frameworks and
applications. Knative components focus on solving many mundane but difficult tasks such as: applications. Knative components focus on solving many mundane but difficult tasks such as:
* [Deploying a container](./install/getting-started-knative-app.md) - [Deploying a container](./install/getting-started-knative-app.md)
* [Orchestrating source-to-URL workflows on Kubernetes](./serving/samples/source-to-url-go/) - [Orchestrating source-to-URL workflows on Kubernetes](./serving/samples/source-to-url-go/)
* [Routing and managing traffic with blue/green deployment](./serving/samples/blue-green-deployment.md) - [Routing and managing traffic with blue/green deployment](./serving/samples/blue-green-deployment.md)
* [Automatic scaling and sizing workloads based on demand](./serving/samples/autoscale-go) - [Automatic scaling and sizing workloads based on demand](./serving/samples/autoscale-go)
* [Binding running services to eventing ecosystems](./eventing/samples/kubernetes-event-source) - [Binding running services to eventing ecosystems](./eventing/samples/kubernetes-event-source)
Developers on Knative can use familiar idioms, languages, and frameworks to deploy any workload: Developers on Knative can use familiar idioms, languages, and frameworks to deploy any workload:
functions, applications, or containers. functions, applications, or containers.
@ -22,9 +22,9 @@ functions, applications, or containers.
The following Knative components are currently available: The following Knative components are currently available:
* [Build](https://github.com/knative/build) - Source-to-container build orchestration - [Build](https://github.com/knative/build) - Source-to-container build orchestration
* [Eventing](https://github.com/knative/eventing) - Management and delivery of events - [Eventing](https://github.com/knative/eventing) - Management and delivery of events
* [Serving](https://github.com/knative/serving) - Request-driven compute that can scale to zero - [Serving](https://github.com/knative/serving) - Request-driven compute that can scale to zero
## Audience ## Audience
@ -71,41 +71,41 @@ Follow the links in this section to learn more about Knative.
### Getting started ### Getting started
* [Installing Knative](./install/README.md) - [Installing Knative](./install/README.md)
* [Getting started with app deployment](./install/getting-started-knative-app.md) - [Getting started with app deployment](./install/getting-started-knative-app.md)
* [Getting started with serving](./serving) - [Getting started with serving](./serving)
* [Getting started with builds](./build) - [Getting started with builds](./build)
* [Getting started with eventing](./eventing) - [Getting started with eventing](./eventing)
### Configuration and networking ### Configuration and networking
* [Configuring outbound network access](./serving/outbound-network-access.md) - [Configuring outbound network access](./serving/outbound-network-access.md)
* [Using a custom domain](./serving/using-a-custom-domain.md) - [Using a custom domain](./serving/using-a-custom-domain.md)
* [Assigning a static IP address for Knative on Google Kubernetes Engine](./serving/gke-assigning-static-ip-address.md) - [Assigning a static IP address for Knative on Google Kubernetes Engine](./serving/gke-assigning-static-ip-address.md)
* [Configuring HTTPS with a custom certificate](./serving/using-an-ssl-cert.md) - [Configuring HTTPS with a custom certificate](./serving/using-an-ssl-cert.md)
### Samples and demos ### Samples and demos
* [Autoscaling](./serving/samples/autoscale-go/README.md) - [Autoscaling](./serving/samples/autoscale-go/README.md)
* [Source-to-URL deployment](./serving/samples/source-to-url-go/README.md) - [Source-to-URL deployment](./serving/samples/source-to-url-go/README.md)
* [Binding running services to eventing ecosystems](./eventing/samples/event-flow/README.md) - [Binding running services to eventing ecosystems](./eventing/samples/event-flow/README.md)
* [Telemetry](./serving/samples/telemetry-go/README.md) - [Telemetry](./serving/samples/telemetry-go/README.md)
* [REST API sample](./serving/samples/rest-api-go/README.md) - [REST API sample](./serving/samples/rest-api-go/README.md)
* [All samples for serving](./serving/samples/) - [All samples for serving](./serving/samples/)
* [All samples for eventing](./eventing/samples/) - [All samples for eventing](./eventing/samples/)
### Logging and metrics ### Logging and metrics
* [Installing logging, metrics and traces](./serving/installing-logging-metrics-traces.md) - [Installing logging, metrics and traces](./serving/installing-logging-metrics-traces.md)
* [Accessing logs](./serving/accessing-logs.md) - [Accessing logs](./serving/accessing-logs.md)
* [Accessing metrics](./serving/accessing-metrics.md) - [Accessing metrics](./serving/accessing-metrics.md)
* [Accessing traces](./serving/accessing-traces.md) - [Accessing traces](./serving/accessing-traces.md)
* [Setting up a logging plugin](./serving/setting-up-a-logging-plugin.md) - [Setting up a logging plugin](./serving/setting-up-a-logging-plugin.md)
### Debugging ### Debugging
* [Debugging application issues](./serving/debugging-application-issues.md) - [Debugging application issues](./serving/debugging-application-issues.md)
* [Debugging performance issues](./serving/debugging-performance-issues.md) - [Debugging performance issues](./serving/debugging-performance-issues.md)
--- ---

View File

@ -19,27 +19,27 @@ More information about this use case is demonstrated in
## Key features of Knative Builds ## Key features of Knative Builds
* A `Build` can include multiple `steps` where each step specifies a `Builder`. - A `Build` can include multiple `steps` where each step specifies a `Builder`.
* A `Builder` is a type of container image that you create to accomplish any - A `Builder` is a type of container image that you create to accomplish any
task, whether that's a single step in a process, or the whole process itself. task, whether that's a single step in a process, or the whole process itself.
* The `steps` in a `Build` can push to a repository. - The `steps` in a `Build` can push to a repository.
* A `BuildTemplate` can be used to defined reusable templates. - A `BuildTemplate` can be used to defined reusable templates.
* The `source` in a `Build` can be defined to mount data to a Kubernetes - The `source` in a `Build` can be defined to mount data to a Kubernetes
Volume, and supports: Volume, and supports:
* `git` repositories - `git` repositories
* Google Cloud Storage - Google Cloud Storage
* An arbitrary container image - An arbitrary container image
* Authenticate with `ServiceAccount` using Kubernetes Secrets. - Authenticate with `ServiceAccount` using Kubernetes Secrets.
### Learn more ### Learn more
See the following reference topics for information about each of the build See the following reference topics for information about each of the build
components: components:
* [`Build`](https://github.com/knative/docs/blob/master/build/builds.md) - [`Build`](https://github.com/knative/docs/blob/master/build/builds.md)
* [`BuildTemplate`](https://github.com/knative/docs/blob/master/build/build-templates.md) - [`BuildTemplate`](https://github.com/knative/docs/blob/master/build/build-templates.md)
* [ `Builder`](https://github.com/knative/docs/blob/master/build/builder-contract.md) - [ `Builder`](https://github.com/knative/docs/blob/master/build/builder-contract.md)
* [`ServiceAccount`](https://github.com/knative/docs/blob/master/build/auth.md) - [`ServiceAccount`](https://github.com/knative/docs/blob/master/build/auth.md)
## Install the Knative Build component ## Install the Knative Build component
@ -49,10 +49,10 @@ install. Knative Serving is not required to create and run builds.
Before you can run a Knative Build, you must install the Knative Build Before you can run a Knative Build, you must install the Knative Build
component in your Kubernetes cluster: component in your Kubernetes cluster:
* For details about installing a new instance of Knative in your Kubernetes - For details about installing a new instance of Knative in your Kubernetes
cluster, see [Installing Knative](../install/README.md). cluster, see [Installing Knative](../install/README.md).
* If you have a component of Knative installed and running, you can - If you have a component of Knative installed and running, you can
[add and install the Knative Build component](installing-build-component.md). [add and install the Knative Build component](installing-build-component.md).
## Configuration syntax example ## Configuration syntax example
@ -86,7 +86,6 @@ spec:
args: ['echo', 'hello-example', 'build'] args: ['echo', 'hello-example', 'build']
``` ```
## Get started with Knative Build samples ## Get started with Knative Build samples
Use the following samples to learn how to configure your Knative Builds to Use the following samples to learn how to configure your Knative Builds to
@ -96,16 +95,15 @@ Tip: Review and reference multiple samples to piece together more complex builds
#### Simple build samples #### Simple build samples
* [Collection of simple test builds](https://github.com/knative/build/tree/master/test). - [Collection of simple test builds](https://github.com/knative/build/tree/master/test).
#### Build templates #### Build templates
* [Repository of sample build templates](https://github.com/knative/build-templates). - [Repository of sample build templates](https://github.com/knative/build-templates).
#### Complex samples #### Complex samples
* [Use Knative to build apps from source code and then run those containers](https://github.com/knative/docs/blob/master/serving/samples/source-to-url-go). - [Use Knative to build apps from source code and then run those containers](https://github.com/knative/docs/blob/master/serving/samples/source-to-url-go).
## Related info ## Related info

View File

@ -6,8 +6,8 @@ of a build.
The build system supports two types of authentication, using Kubernetes' The build system supports two types of authentication, using Kubernetes'
first-class `Secret` types: first-class `Secret` types:
* `kubernetes.io/basic-auth` - `kubernetes.io/basic-auth`
* `kubernetes.io/ssh-auth` - `kubernetes.io/ssh-auth`
Secrets of these types can be made available to the `Build` by attaching them Secrets of these types can be made available to the `Build` by attaching them
to the `ServiceAccount` as which it runs. to the `ServiceAccount` as which it runs.
@ -264,6 +264,7 @@ are ignored.
Given URLs, usernames, and passwords of the form: `https://url{n}.com`, Given URLs, usernames, and passwords of the form: `https://url{n}.com`,
`user{n}`, and `pass{n}`, generate the following for Git: `user{n}`, and `pass{n}`, generate the following for Git:
``` ```
=== ~/.gitconfig === === ~/.gitconfig ===
[credential] [credential]
@ -283,6 +284,7 @@ https://user2:pass2@url2.com
Given hostnames, private keys, and `known_hosts` of the form: `url{n}.com`, Given hostnames, private keys, and `known_hosts` of the form: `url{n}.com`,
`key{n}`, and `known_hosts{n}`, generate the following for Git: `key{n}`, and `known_hosts{n}`, generate the following for Git:
``` ```
=== ~/.ssh/id_key1 === === ~/.ssh/id_key1 ===
{contents of key1} {contents of key1}

View File

@ -38,10 +38,16 @@ spec:
- name: dockerfile-build - name: dockerfile-build
image: gcr.io/cloud-builders/docker image: gcr.io/cloud-builders/docker
workingDir: "${DIRECTORY}" workingDir: "${DIRECTORY}"
args: ["build", "--no-cache", args:
"--tag", "${IMAGE}", [
"--file", "${DOCKERFILE_NAME}", "build",
"."] "--no-cache",
"--tag",
"${IMAGE}",
"--file",
"${DOCKERFILE_NAME}",
".",
]
volumeMounts: volumeMounts:
- name: docker-socket - name: docker-socket
mountPath: /var/run/docker.sock mountPath: /var/run/docker.sock
@ -80,6 +86,7 @@ For the sake of illustrating re-use, here are several example Builds
instantiating the `BuildTemplate` above (`dockerfile-build-and-push`). instantiating the `BuildTemplate` above (`dockerfile-build-and-push`).
Build `mchmarny/rester-tester`: Build `mchmarny/rester-tester`:
```yaml ```yaml
spec: spec:
source: source:
@ -94,6 +101,7 @@ spec:
``` ```
Build `googlecloudplatform/cloud-builder`'s `wget` builder: Build `googlecloudplatform/cloud-builder`'s `wget` builder:
```yaml ```yaml
spec: spec:
source: source:
@ -111,6 +119,7 @@ spec:
``` ```
Build `googlecloudplatform/cloud-builder`'s `docker` builder with `17.06.1`: Build `googlecloudplatform/cloud-builder`'s `docker` builder with `17.06.1`:
```yaml ```yaml
spec: spec:
source: source:

View File

@ -41,29 +41,28 @@ overriding `command:` and `args:` for example:
```yaml ```yaml
steps: steps:
- image: ubuntu - image: ubuntu
command: ['/bin/bash'] command: ["/bin/bash"]
args: ['-c', 'echo hello $FOO'] args: ["-c", "echo hello $FOO"]
env: env:
- name: 'FOO' - name: "FOO"
value: 'world' value: "world"
``` ```
### Specialized Builders ### Specialized Builders
It is also possible for advanced users to create purpose-built builders. It is also possible for advanced users to create purpose-built builders.
One example of this are the ["FTL" builders]( One example of this are the ["FTL" builders](https://github.com/GoogleCloudPlatform/runtimes-common/tree/master/ftl#ftl).
https://github.com/GoogleCloudPlatform/runtimes-common/tree/master/ftl#ftl).
## What are the Builder conventions? ## What are the Builder conventions?
Builders should expect a Build to implement the following conventions: Builders should expect a Build to implement the following conventions:
* `/workspace`: The default working directory will be `/workspace`, which is
- `/workspace`: The default working directory will be `/workspace`, which is
a volume that is filled by the `source:` step and shared across build `steps:`. a volume that is filled by the `source:` step and shared across build `steps:`.
* `/builder/home`: This volume is exposed to steps via `$HOME`. - `/builder/home`: This volume is exposed to steps via `$HOME`.
* Credentials attached to the Build's service account may be exposed as Git or - Credentials attached to the Build's service account may be exposed as Git or
Docker credentials as outlined [here](./auth.md). Docker credentials as outlined [here](./auth.md).
--- ---

View File

@ -11,14 +11,14 @@ A build runs until all `steps` have completed or until a failure occurs.
--- ---
* [Syntax](#syntax) - [Syntax](#syntax)
* [Steps](#steps) - [Steps](#steps)
* [Template](#template) - [Template](#template)
* [Source](#source) - [Source](#source)
* [Service Account](#service-account) - [Service Account](#service-account)
* [Volumes](#volumes) - [Volumes](#volumes)
* [Timeout](#timeout) - [Timeout](#timeout)
* [Examples](#examples) - [Examples](#examples)
--- ---
@ -27,28 +27,28 @@ A build runs until all `steps` have completed or until a failure occurs.
To define a configuration file for a `Build` resource, you can specify the To define a configuration file for a `Build` resource, you can specify the
following fields: following fields:
* Required: - Required:
* [`apiVersion`][kubernetes-overview] - Specifies the API version, for example - [`apiVersion`][kubernetes-overview] - Specifies the API version, for example
`build.knative.dev/v1alpha1`. `build.knative.dev/v1alpha1`.
* [`kind`][kubernetes-overview] - Specify the `Build` resource object. - [`kind`][kubernetes-overview] - Specify the `Build` resource object.
* [`metadata`][kubernetes-overview] - Specifies data to uniquely identify the - [`metadata`][kubernetes-overview] - Specifies data to uniquely identify the
`Build` resource object, for example a `name`. `Build` resource object, for example a `name`.
* [`spec`][kubernetes-overview] - Specifies the configuration information for - [`spec`][kubernetes-overview] - Specifies the configuration information for
your `Build` resource object. Build steps must be defined through either of your `Build` resource object. Build steps must be defined through either of
the following fields: the following fields:
* [`steps`](#steps) - Specifies one or more container images that you want - [`steps`](#steps) - Specifies one or more container images that you want
to run in your build. to run in your build.
* [`template`](#template) - Specifies a reusable build template that - [`template`](#template) - Specifies a reusable build template that
includes one or more `steps`. includes one or more `steps`.
* Optional: - Optional:
* [`source`](#source) - Specifies a container image that provides information - [`source`](#source) - Specifies a container image that provides information
to your build. to your build.
* [`serviceAccountName`](#service-account) - Specifies a `ServiceAccount` - [`serviceAccountName`](#service-account) - Specifies a `ServiceAccount`
resource object that enables your build to run with the defined resource object that enables your build to run with the defined
authentication information. authentication information.
* [`volumes`](#volumes) - Specifies one or more volumes that you want to make - [`volumes`](#volumes) - Specifies one or more volumes that you want to make
available to your build. available to your build.
* [`timeout`](#timeout) - Specifies timeout after which the build will fail. - [`timeout`](#timeout) - Specifies timeout after which the build will fail.
[kubernetes-overview]: https://kubernetes.io/docs/concepts/overview/working-with-objects/kubernetes-objects/#required-fields [kubernetes-overview]: https://kubernetes.io/docs/concepts/overview/working-with-objects/kubernetes-objects/#required-fields
@ -94,15 +94,14 @@ Each `steps` in a build must specify a `Builder`, or type of container image tha
adheres to the [Knative builder contract](./builder-contract.md). For each of adheres to the [Knative builder contract](./builder-contract.md). For each of
the `steps` fields, or container images that you define: the `steps` fields, or container images that you define:
* The `Builder`-type container images are run and evaluated in order, starting - The `Builder`-type container images are run and evaluated in order, starting
from the top of the configuration file. from the top of the configuration file.
* Each container image runs until completion or until the first failure is - Each container image runs until completion or until the first failure is
detected. detected.
For details about how to ensure that you implement each step to align with the For details about how to ensure that you implement each step to align with the
"builder contract", see the [`Builder`](./builder-contract.md) reference topic. "builder contract", see the [`Builder`](./builder-contract.md) reference topic.
#### Template #### Template
The `template` field is a required if no `steps` are defined. Specifies a The `template` field is a required if no `steps` are defined. Specifies a
@ -112,7 +111,6 @@ repeatable or sharable build `steps`.
For examples and more information about build templates, see the For examples and more information about build templates, see the
[`BuildTemplate`](./build-templates.md) reference topic. [`BuildTemplate`](./build-templates.md) reference topic.
#### Source #### Source
Optional. Specifies a container image. Use the `source` field to provide your Optional. Specifies a container image. Use the `source` field to provide your
@ -123,15 +121,14 @@ to all `steps` of your build.
The currently supported types of sources include: The currently supported types of sources include:
* `git` - A Git based repository. Specify the `url` field to define the - `git` - A Git based repository. Specify the `url` field to define the
location of the container image. Specify a `revision` field to define a location of the container image. Specify a `revision` field to define a
branch name, tag name, commit SHA, or any ref. [Learn more about revisions in branch name, tag name, commit SHA, or any ref. [Learn more about revisions in
Git](https://git-scm.com/docs/gitrevisions#_specifying_revisions). Git](https://git-scm.com/docs/gitrevisions#_specifying_revisions).
* `gcs` - An archive that is located in Google Cloud Storage. - `gcs` - An archive that is located in Google Cloud Storage.
* `custom` - An arbitrary container image.
- `custom` - An arbitrary container image.
#### Service Account #### Service Account
@ -147,7 +144,6 @@ of the `Build` resource object.
For examples and more information about specifying service accounts, For examples and more information about specifying service accounts,
see the [`ServiceAccount`](./auth.md) reference topic. see the [`ServiceAccount`](./auth.md) reference topic.
#### Volumes #### Volumes
Optional. Specifies one or more Optional. Specifies one or more
@ -158,20 +154,20 @@ complement the volumes that are implicitly
For example, use volumes to accomplish one of the following common tasks: For example, use volumes to accomplish one of the following common tasks:
* [Mount a Kubernetes secret](./auth.md). - [Mount a Kubernetes secret](./auth.md).
* Create an `emptyDir` volume to act as a cache for use across multiple build - Create an `emptyDir` volume to act as a cache for use across multiple build
steps. Consider using a persistent volume for inter-build caching. steps. Consider using a persistent volume for inter-build caching.
* Mount a host's Docker socket to use a `Dockerfile` for container image - Mount a host's Docker socket to use a `Dockerfile` for container image
builds. builds.
#### Timeout #### Timeout
Optional. Specifies timeout for the build. Includes time required for allocating resources and execution of build. Optional. Specifies timeout for the build. Includes time required for allocating resources and execution of build.
* Defaults to 10 minutes. - Defaults to 10 minutes.
* Refer to [Go's ParseDuration documentation](https://golang.org/pkg/time/#ParseDuration) for expected format. - Refer to [Go's ParseDuration documentation](https://golang.org/pkg/time/#ParseDuration) for expected format.
### Examples ### Examples
@ -181,13 +177,13 @@ Tip: See the collection of simple
[test builds](https://github.com/knative/build/tree/master/test) for [test builds](https://github.com/knative/build/tree/master/test) for
additional code samples, including working copies of the following snippets: additional code samples, including working copies of the following snippets:
* [`git` as `source`](#using-git) - [`git` as `source`](#using-git)
* [`gcs` as `source`](#using-gcs) - [`gcs` as `source`](#using-gcs)
* [`custom` as `source`](#using-custom) - [`custom` as `source`](#using-custom)
* [Mounting extra volumes](#using-an-extra-volume) - [Mounting extra volumes](#using-an-extra-volume)
* [Pushing an image](#using-steps-to-push-images) - [Pushing an image](#using-steps-to-push-images)
* [Authenticating with `ServiceAccount`](#using-a-serviceaccount) - [Authenticating with `ServiceAccount`](#using-a-serviceaccount)
* [Timeout](#using-timeout) - [Timeout](#using-timeout)
#### Using `git` #### Using `git`

View File

@ -7,7 +7,7 @@ deploy that build to Knative, and then test that the build completes.
The following demonstrates the process of deploying and then testing that The following demonstrates the process of deploying and then testing that
the build completed successfully. This sample build uses a hello-world-type app the build completed successfully. This sample build uses a hello-world-type app
that uses [busybox](https://docs.docker.com/samples/library/busybox/) to simply that uses [busybox](https://docs.docker.com/samples/library/busybox/) to simply
print "*hello build*". print "_hello build_".
Tip: See the Tip: See the
[build code samples](builds.md#get-started-with-knative-build-samples) [build code samples](builds.md#get-started-with-knative-build-samples)
@ -19,10 +19,10 @@ images, authentication, and include multiple steps.
Before you can run a Knative Build, you must have Knative installed in your Before you can run a Knative Build, you must have Knative installed in your
Kubernetes cluster, and it must include the Knative Build component: Kubernetes cluster, and it must include the Knative Build component:
* For details about installing a new instance of Knative in your Kubernetes - For details about installing a new instance of Knative in your Kubernetes
cluster, see [Installing Knative](../install/README.md). cluster, see [Installing Knative](../install/README.md).
* If you have a component of Knative installed and running, you must [ensure - If you have a component of Knative installed and running, you must [ensure
that the Knative Build component is also installed](installing-build-component.md). that the Knative Build component is also installed](installing-build-component.md).
## Creating and running a build ## Creating and running a build
@ -31,7 +31,7 @@ Kubernetes cluster, and it must include the Knative Build component:
code. code.
This `Build` resource definition includes a single "[step](builds.md#steps)" This `Build` resource definition includes a single "[step](builds.md#steps)"
that performs the task of simply printing "*hello build*": that performs the task of simply printing "_hello build_":
```yaml ```yaml
apiVersion: build.knative.dev/v1alpha1 apiVersion: build.knative.dev/v1alpha1
@ -42,7 +42,7 @@ Kubernetes cluster, and it must include the Knative Build component:
steps: steps:
- name: hello - name: hello
image: busybox image: busybox
args: ['echo', 'hello', 'build'] args: ["echo", "hello", "build"]
``` ```
Notice that this definition specifies `kind` as a `Build`, and that Notice that this definition specifies `kind` as a `Build`, and that
@ -60,6 +60,7 @@ Kubernetes cluster, and it must include the Knative Build component:
``` ```
Response: Response:
```shell ```shell
build "hello-build" created build "hello-build" created
``` ```
@ -73,6 +74,7 @@ Kubernetes cluster, and it must include the Knative Build component:
``` ```
Response: Response:
```shell ```shell
NAME AGE NAME AGE
hello-build 4s hello-build 4s
@ -88,6 +90,7 @@ Kubernetes cluster, and it must include the Knative Build component:
``` ```
Response: Response:
```shell ```shell
apiVersion: build.knative.dev/v1alpha1 apiVersion: build.knative.dev/v1alpha1
kind: Build kind: Build
@ -127,6 +130,7 @@ Kubernetes cluster, and it must include the Knative Build component:
```shell ```shell
kubectl get pod hello-build-[ID] --output yaml kubectl get pod hello-build-[ID] --output yaml
``` ```
where `[ID]` is the suffix of your pod name, for example where `[ID]` is the suffix of your pod name, for example
`hello-build-jx4ql`. `hello-build-jx4ql`.
@ -138,7 +142,7 @@ Kubernetes cluster, and it must include the Knative Build component:
example `build-step-[ID]`. example `build-step-[ID]`.
1. To verify that your build performed the single task of printing 1. To verify that your build performed the single task of printing
"*hello build*", you can run the "_hello build_", you can run the
[`kubectl logs`](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#logs) [`kubectl logs`](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#logs)
command to retrieve the log files from the `build-step-hello` Init container command to retrieve the log files from the `build-step-hello` Init container
in the `hello-build-[ID]` pod: in the `hello-build-[ID]` pod:
@ -148,6 +152,7 @@ Kubernetes cluster, and it must include the Knative Build component:
``` ```
Response: Response:
```shell ```shell
hello build hello build
``` ```
@ -156,9 +161,9 @@ Kubernetes cluster, and it must include the Knative Build component:
To learn more about the objects and commands used in this topic, see: To learn more about the objects and commands used in this topic, see:
* [Knative `Build` resources](builds.md) - [Knative `Build` resources](builds.md)
* [Kubernetes Init containers](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/) - [Kubernetes Init containers](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/)
* [Kubernetes kubectl CLI](https://kubernetes.io/docs/reference/kubectl/kubectl/) - [Kubernetes kubectl CLI](https://kubernetes.io/docs/reference/kubectl/kubectl/)
For information about contributing to the Knative Build project, see the For information about contributing to the Knative Build project, see the
[Knative Build code repo](https://github.com/knative/build/). [Knative Build code repo](https://github.com/knative/build/).

View File

@ -28,6 +28,7 @@ To add only the Knative Build component to an existing installation:
[`kubectl get`](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#get) [`kubectl get`](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#get)
command to monitor the Knative Build components until all of the components command to monitor the Knative Build components until all of the components
show a `STATUS` of `Running`: show a `STATUS` of `Running`:
```bash ```bash
kubectl get pods --namespace knative-build kubectl get pods --namespace knative-build
``` ```

View File

@ -1,10 +1,9 @@
# Knative Personas # Knative Personas
When discussing user actions, it is often helpful to [define specific When discussing user actions, it is often helpful to [define specific
user roles](https://en.wikipedia.org/wiki/Persona_(user_experience)) who user roles](<https://en.wikipedia.org/wiki/Persona_(user_experience)>) who
might want to do the action. might want to do the action.
## Knative Build ## Knative Build
We expect the build components of Knative to be useful on their own, We expect the build components of Knative to be useful on their own,
@ -19,8 +18,9 @@ tooling for managing dependencies and even detecting language and
runtime dependencies. runtime dependencies.
User stories: User stories:
* Start a build
* Read build logs - Start a build
- Read build logs
### Language operator / contributor ### Language operator / contributor
@ -30,9 +30,9 @@ within a particular organization, or on behalf of a particular
language runtime. language runtime.
User stories: User stories:
* Create a build image / build pack
* Enable build signing / provenance
- Create a build image / build pack
- Enable build signing / provenance
## Contributors ## Contributors
@ -41,17 +41,19 @@ always consider how infrastructure changes encourage and enable
contributors to the project, as well as the impact on users. contributors to the project, as well as the impact on users.
Types of users: Types of users:
* Hobbyist or newcomer
* Motivated user - Hobbyist or newcomer
* Corporate (employed) maintainer - Motivated user
* Consultant - Corporate (employed) maintainer
- Consultant
User stories: User stories:
* Check out the code
* Build and run the code - Check out the code
* Run tests - Build and run the code
* View test status - Run tests
* Run performance tests - View test status
- Run performance tests
--- ---

View File

@ -14,21 +14,21 @@ race, religion, or sexual identity and orientation.
Examples of behavior that contributes to creating a positive environment Examples of behavior that contributes to creating a positive environment
include: include:
* Using welcoming and inclusive language - Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences - Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism - Gracefully accepting constructive criticism
* Focusing on what is best for the community - Focusing on what is best for the community
* Showing empathy towards other community members - Showing empathy towards other community members
Examples of unacceptable behavior by participants include: Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or - The use of sexualized language or imagery and unwelcome sexual attention or
advances advances
* Trolling, insulting/derogatory comments, and personal or political attacks - Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment - Public or private harassment
* Publishing others' private information, such as a physical or electronic - Publishing others' private information, such as a physical or electronic
address, without explicit permission address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a - Other conduct which could reasonably be considered inappropriate in a
professional setting professional setting
## Our Responsibilities ## Our Responsibilities

View File

@ -7,15 +7,15 @@ repositories go through. All changes, regardless of whether they are from
newcomers to the community or from the core team follow the same process and newcomers to the community or from the core team follow the same process and
are given the same level of review. are given the same level of review.
* [Working groups](#working-groups) - [Working groups](#working-groups)
* [Code of conduct](#code-of-conduct) - [Code of conduct](#code-of-conduct)
* [Team values](#team-values) - [Team values](#team-values)
* [Contributor license agreements](#contributor-license-agreements) - [Contributor license agreements](#contributor-license-agreements)
* [Design documents](#design-documents) - [Design documents](#design-documents)
* [Contributing a feature](#contributing-a-feature) - [Contributing a feature](#contributing-a-feature)
* [Setting up to contribute to Knative](#setting-up-to-contribute-to-knative) - [Setting up to contribute to Knative](#setting-up-to-contribute-to-knative)
* [Pull requests](#pull-requests) - [Pull requests](#pull-requests)
* [Issues](#issues) - [Issues](#issues)
## Working groups ## Working groups
@ -74,40 +74,40 @@ later join knative-dev if you want immediate access).
In order to contribute a feature to Knative you'll need to go through the In order to contribute a feature to Knative you'll need to go through the
following steps: following steps:
* Discuss your idea with the appropriate [working groups](WORKING-GROUPS.md) - Discuss your idea with the appropriate [working groups](WORKING-GROUPS.md)
on the working group's mailing list. on the working group's mailing list.
* Once there is general agreement that the feature is useful, [create a GitHub - Once there is general agreement that the feature is useful, [create a GitHub
issue](https://github.com/knative/docs/issues/new) to track the discussion. issue](https://github.com/knative/docs/issues/new) to track the discussion.
The issue should include information about the requirements and use cases The issue should include information about the requirements and use cases
that it is trying to address. Include a discussion of the proposed design that it is trying to address. Include a discussion of the proposed design
and technical details of the implementation in the issue. and technical details of the implementation in the issue.
* If the feature is substantial enough: - If the feature is substantial enough:
* Working group leads will ask for a design document as outlined in - Working group leads will ask for a design document as outlined in
[design documents](#design-documents). Create the design document and [design documents](#design-documents). Create the design document and
add a link to it in the GitHub issue. Don't forget to send a note to the add a link to it in the GitHub issue. Don't forget to send a note to the
working group to let everyone know your document is ready for review. working group to let everyone know your document is ready for review.
* Depending on the breadth of the design and how contentious it is, the - Depending on the breadth of the design and how contentious it is, the
working group leads may decide the feature needs to be discussed in one working group leads may decide the feature needs to be discussed in one
or more working group meetings before being approved. or more working group meetings before being approved.
* Once the major technical issues are resolved and agreed upon, post a - Once the major technical issues are resolved and agreed upon, post a
note with the design decision and the general execution plan to the note with the design decision and the general execution plan to the
working group's mailing list and on the feature's issue. working group's mailing list and on the feature's issue.
* Submit PRs to [knative/serving](https://github.com/knative/serving/pulls) - Submit PRs to [knative/serving](https://github.com/knative/serving/pulls)
with your code changes. with your code changes.
* Submit PRs to knative/serving with user documentation for your feature, - Submit PRs to knative/serving with user documentation for your feature,
including usage examples when possible. Add documentation to including usage examples when possible. Add documentation to
[knative/docs/serving](https://github.com/knative/docs/tree/master/serving). [knative/docs/serving](https://github.com/knative/docs/tree/master/serving).
*Note that we prefer bite-sized PRs instead of giant monster PRs. It's therefore _Note that we prefer bite-sized PRs instead of giant monster PRs. It's therefore
preferable if you can introduce large features in small, individually-reviewable preferable if you can introduce large features in small, individually-reviewable
PRs that build on top of one another.* PRs that build on top of one another._
If you would like to skip the process of submitting an issue and instead would If you would like to skip the process of submitting an issue and instead would
prefer to just submit a pull request with your desired code changes then that's prefer to just submit a pull request with your desired code changes then that's
@ -135,14 +135,14 @@ active, and hopefully prevents duplicated efforts.
To submit a proposed change: To submit a proposed change:
* Fork the affected repository. - Fork the affected repository.
* Create a new branch for your changes. - Create a new branch for your changes.
* Develop the code/fix. - Develop the code/fix.
* Add new test cases. In the case of a bug fix, the tests should fail without - Add new test cases. In the case of a bug fix, the tests should fail without
your code changes. For new features try to cover as many variants as your code changes. For new features try to cover as many variants as
reasonably possible. reasonably possible.
* Modify the documentation as necessary. - Modify the documentation as necessary.
* Verify all CI status checks pass, and work to make them pass if failing. - Verify all CI status checks pass, and work to make them pass if failing.
The general rule is that all PRs should be 100% complete - meaning they should The general rule is that all PRs should be 100% complete - meaning they should
include all test cases and documentation changes related to the change. A include all test cases and documentation changes related to the change. A
@ -165,36 +165,40 @@ GitHub issues can be used to report bugs or submit feature requests.
When reporting a bug please include the following key pieces of information: When reporting a bug please include the following key pieces of information:
* The version of the project you were using (version number, git commit, etc) - The version of the project you were using (version number, git commit, etc)
* Operating system you are using - Operating system you are using
* The exact, minimal, steps needed to reproduce the issue. Submitting a 5 line - The exact, minimal, steps needed to reproduce the issue. Submitting a 5 line
script will get a much faster response from the team than one that's script will get a much faster response from the team than one that's
hundreds of lines long. hundreds of lines long.
## Third-party code ## Third-party code
* All third-party code must be placed in `vendor/` or `third_party/` folders.
* `vendor/` folder is managed by [dep](https://github.com/golang/dep) and stores - All third-party code must be placed in `vendor/` or `third_party/` folders.
- `vendor/` folder is managed by [dep](https://github.com/golang/dep) and stores
the source code of third-party Go dependencies. `vendor/` folder should not be the source code of third-party Go dependencies. `vendor/` folder should not be
modified manually. modified manually.
* Other third-party code belongs in `third_party/` folder. - Other third-party code belongs in `third_party/` folder.
* Third-party code must include licenses. - Third-party code must include licenses.
A non-exclusive list of code that must be places in `vendor/` and `third_party/`: A non-exclusive list of code that must be places in `vendor/` and `third_party/`:
* Open source, free software, or commercially-licensed code.
* Tools or libraries or protocols that are open source, free software, or commercially licensed. - Open source, free software, or commercially-licensed code.
* Derivative works of third-party code. - Tools or libraries or protocols that are open source, free software, or commercially licensed.
* Excerpts from third-party code. - Derivative works of third-party code.
- Excerpts from third-party code.
### Adding a new third-party dependency to `third_party/` folder ### Adding a new third-party dependency to `third_party/` folder
* Create a sub-folder under `third_party/` for each component.
* In each sub-folder, make sure there is a file called LICENSE which contains the appropriate - Create a sub-folder under `third_party/` for each component.
- In each sub-folder, make sure there is a file called LICENSE which contains the appropriate
license text for the dependency. If one doesn't exist then create it. More details on this below. license text for the dependency. If one doesn't exist then create it. More details on this below.
* Check in a pristine copy of the code with LICENSE and METADATA files. - Check in a pristine copy of the code with LICENSE and METADATA files.
You do not have to include unused files, and you can move or rename files if necessary, You do not have to include unused files, and you can move or rename files if necessary,
but do not modify the contents of any files yet. but do not modify the contents of any files yet.
* Once the pristine copy is merged into master, you may modify the code. - Once the pristine copy is merged into master, you may modify the code.
### LICENSE ### LICENSE
The license for the code must be in a file named LICENSE. If it was distributed like that, The license for the code must be in a file named LICENSE. If it was distributed like that,
you're good. If not, you need to make LICENSE be a file containing the full text of the license. you're good. If not, you need to make LICENSE be a file containing the full text of the license.
If there's another file in the distribution with the license in it, rename it to LICENSE If there's another file in the distribution with the license in it, rename it to LICENSE

View File

@ -1,6 +1,6 @@
# Knative Community # Knative Community
*Important*. Before proceeding, please review the Knative community [Code of _Important_. Before proceeding, please review the Knative community [Code of
Conduct](CODE-OF-CONDUCT.md). Conduct](CODE-OF-CONDUCT.md).
If you any have questions or concerns, please contact the authors at If you any have questions or concerns, please contact the authors at
@ -13,28 +13,28 @@ Welcome to the Knative community!
This is the starting point for becoming a contributor - improving code, This is the starting point for becoming a contributor - improving code,
improving docs, giving talks, etc. improving docs, giving talks, etc.
* [Introduction](#introduction) - [Introduction](#introduction)
* [Knative authors](#knative-authors) - [Knative authors](#knative-authors)
* [Meetings and work groups](#meetings-and-work-groups) - [Meetings and work groups](#meetings-and-work-groups)
* [How can I help?](#how-can-i-help) - [How can I help?](#how-can-i-help)
* [Questions and issues](#questions-and-issues) - [Questions and issues](#questions-and-issues)
Other Documents Other Documents
* [Code of Conduct](CODE-OF-CONDUCT.md) - all contributors must abide by the - [Code of Conduct](CODE-OF-CONDUCT.md) - all contributors must abide by the
code of conduct code of conduct
* [Contributing to Knative](CONTRIBUTING.md) - guidelines and advice on - [Contributing to Knative](CONTRIBUTING.md) - guidelines and advice on
becoming a contributor becoming a contributor
* [Working Groups](WORKING-GROUPS.md) - describes our various working groups - [Working Groups](WORKING-GROUPS.md) - describes our various working groups
* [Working Group Processes](WORKING-GROUP-PROCESSES.md) - describes how - [Working Group Processes](WORKING-GROUP-PROCESSES.md) - describes how
working groups operate working groups operate
* [Technical Oversight Committee](TECH-OVERSIGHT-COMMITTEE.md) - describes our - [Technical Oversight Committee](TECH-OVERSIGHT-COMMITTEE.md) - describes our
technical oversight committee technical oversight committee
* [Steering Committee](STEERING-COMMITTEE.md) - describes our steering - [Steering Committee](STEERING-COMMITTEE.md) - describes our steering
committee committee
* [Community Roles](ROLES.md) - describes the roles individuals can assume - [Community Roles](ROLES.md) - describes the roles individuals can assume
within the Knative community within the Knative community
* [Reviewing and Merging Pull Requests](REVIEWING.md) - how we manage pull - [Reviewing and Merging Pull Requests](REVIEWING.md) - how we manage pull
requests requests
## Introduction ## Introduction
@ -61,8 +61,8 @@ monitoring the overall project.
If you're looking for something to do to get your feet wet working on Knative, If you're looking for something to do to get your feet wet working on Knative,
look for GitHub issues marked with the Help Wanted label: look for GitHub issues marked with the Help Wanted label:
* [Serving issues](https://github.com/knative/serving/issues?q=is%3Aopen+is%3Aissue+label%3A%22community%2Fhelp+wanted%22) - [Serving issues](https://github.com/knative/serving/issues?q=is%3Aopen+is%3Aissue+label%3A%22community%2Fhelp+wanted%22)
* [Documentation repo](https://github.com/knative/docs/issues?q=is%3Aopen+is%3Aissue+label%3A%22community%2Fhelp+wanted%22) - [Documentation repo](https://github.com/knative/docs/issues?q=is%3Aopen+is%3Aissue+label%3A%22community%2Fhelp+wanted%22)
Even if there's not an issue opened for it, we can always use more Even if there's not an issue opened for it, we can always use more
testing throughout the platform. Similarly, we can always use more docs, richer testing throughout the platform. Similarly, we can always use more docs, richer
@ -74,8 +74,8 @@ we could use your help in spiffing up our public-facing web site.
If you're a developer, operator, or contributor trying to use Knative, the If you're a developer, operator, or contributor trying to use Knative, the
following resources are available for you: following resources are available for you:
* [Knative Users](https://groups.google.com/forum/#!forum/knative-users) - [Knative Users](https://groups.google.com/forum/#!forum/knative-users)
* [Knative Developers](https://groups.google.com/forum/#!forum/knative-dev) - [Knative Developers](https://groups.google.com/forum/#!forum/knative-dev)
For contributors to Knative, we also have [Knative Slack](SLACK-GUIDELINES.md). For contributors to Knative, we also have [Knative Slack](SLACK-GUIDELINES.md).

View File

@ -7,13 +7,13 @@ in turn produces high quality software.
This document provides guidelines for how the project's This document provides guidelines for how the project's
[Members](ROLES.md#member) review issues and merge pull requests (PRs). [Members](ROLES.md#member) review issues and merge pull requests (PRs).
* [Pull requests welcome](#pull-requests-welcome) - [Pull requests welcome](#pull-requests-welcome)
* [Code of Conduct](#code-of-conduct) - [Code of Conduct](#code-of-conduct)
* [Code reviewers](#code-reviewers) - [Code reviewers](#code-reviewers)
* [Reviewing changes](#reviewing-changes) - [Reviewing changes](#reviewing-changes)
* [Holds](#holds) - [Holds](#holds)
* [Approvers](#approvers) - [Approvers](#approvers)
* [Merging PRs](#merging-prs) - [Merging PRs](#merging-prs)
## Pull requests welcome ## Pull requests welcome
@ -55,9 +55,9 @@ are not in favor of the change. If a PR gets a "request changes" vote, the
group discusses the issue to resolve their differences. group discusses the issue to resolve their differences.
Reviewers are expected to respond in a timely fashion to PRs that are assigned Reviewers are expected to respond in a timely fashion to PRs that are assigned
to them. Reviewers are expected to respond to *active* PRs with reasonable to them. Reviewers are expected to respond to _active_ PRs with reasonable
latency. If reviewers fail to respond, those PRs may be assigned to other latency. If reviewers fail to respond, those PRs may be assigned to other
reviewers. *Active* PRs are those that have a proper CLA (`cla:yes`) label, are reviewers. _Active_ PRs are those that have a proper CLA (`cla:yes`) label, are
not works in progress (WIP), are passing tests, and do not need rebase to be not works in progress (WIP), are passing tests, and do not need rebase to be
merged. PRs that do not have a proper CLA, are WIP, do not pass tests, or merged. PRs that do not have a proper CLA, are WIP, do not pass tests, or
require a rebase are not considered active PRs. require a rebase are not considered active PRs.

View File

@ -4,21 +4,21 @@ This document describes the set of roles individuals may have within the Knative
community, the requirements of each role, and the privileges that each role community, the requirements of each role, and the privileges that each role
grants. grants.
* [Role Summary](#role-summary) - [Role Summary](#role-summary)
* [Collaborator](#collaborator) - [Collaborator](#collaborator)
* [Member](#member) - [Member](#member)
* [Approver](#approver) - [Approver](#approver)
* [Lead](#lead) - [Lead](#lead)
* [Administrator](#administrator) - [Administrator](#administrator)
## Role Summary ## Role Summary
The following table lists the roles we use within the Knative community. The The following table lists the roles we use within the Knative community. The
table describes: table describes:
* General responsibilities expected by individuals in each role - General responsibilities expected by individuals in each role
* Requirements necessary to join or stay in a given role - Requirements necessary to join or stay in a given role
* How the role manifests in terms of permissions and privileges. - How the role manifests in terms of permissions and privileges.
<table> <table>
<thead> <thead>
@ -112,10 +112,10 @@ the PR bot.
### Requirements ### Requirements
* Working on some contribution to the project that would benefit from the - Working on some contribution to the project that would benefit from the
ability to have PRs or Issues to be assigned to the contributor ability to have PRs or Issues to be assigned to the contributor
* Join [knative-users@](https://groups.google.com/forum/#!forum/knative-users) - Join [knative-users@](https://groups.google.com/forum/#!forum/knative-users)
unrestricted join permissions; this grants read access to documents in the unrestricted join permissions; this grants read access to documents in the
Team Drive Team Drive
@ -139,36 +139,36 @@ this is not a requirement.
### Requirements ### Requirements
* Has made multiple contributions to the project or community. Contributions - Has made multiple contributions to the project or community. Contributions
may include, but are not limited to: may include, but are not limited to:
* Authoring or reviewing PRs on GitHub - Authoring or reviewing PRs on GitHub
* Filing or commenting on issues on GitHub - Filing or commenting on issues on GitHub
* Contributing to working group or community discussions - Contributing to working group or community discussions
* Subscribed to - Subscribed to
[knative-dev@googlegroups.com](https://groups.google.com/forum/#!forum/knative-dev) [knative-dev@googlegroups.com](https://groups.google.com/forum/#!forum/knative-dev)
* Actively contributing to 1 or more areas. - Actively contributing to 1 or more areas.
* Sponsored by 1 approver. - Sponsored by 1 approver.
* Done by adding GitHub user to Knative organization - Done by adding GitHub user to Knative organization
### Responsibilities and privileges ### Responsibilities and privileges
* Responsive to issues and PRs assigned to them - Responsive to issues and PRs assigned to them
* Active owner of code they have contributed (unless ownership is explicitly - Active owner of code they have contributed (unless ownership is explicitly
transferred) transferred)
* Code is well tested - Code is well tested
* Tests consistently pass - Tests consistently pass
* Addresses bugs or issues discovered after code is accepted - Addresses bugs or issues discovered after code is accepted
Members who frequently contribute code are expected to proactively perform code Members who frequently contribute code are expected to proactively perform code
reviews and work towards becoming an approver for the area that they are active reviews and work towards becoming an approver for the area that they are active
@ -188,40 +188,40 @@ status is scoped to a part of the codebase.
The following apply to the part of the codebase for which one would be an The following apply to the part of the codebase for which one would be an
approver in an OWNERS file: approver in an OWNERS file:
* Reviewer of the codebase for at least 3 months or 50% of project lifetime, - Reviewer of the codebase for at least 3 months or 50% of project lifetime,
whichever is shorter whichever is shorter
* Primary reviewer for at least 10 substantial PRs to the codebase - Primary reviewer for at least 10 substantial PRs to the codebase
* Reviewed or merged at least 30 PRs to the codebase - Reviewed or merged at least 30 PRs to the codebase
* Nominated by an area lead - Nominated by an area lead
* With no objections from other leads - With no objections from other leads
* Done through PR to update an OWNERS file - Done through PR to update an OWNERS file
### Responsibilities and privileges ### Responsibilities and privileges
The following apply to the part of the codebase for which one would be an The following apply to the part of the codebase for which one would be an
approver in an OWNERS file: approver in an OWNERS file:
* Approver status may be a precondition to accepting large code contributions - Approver status may be a precondition to accepting large code contributions
* Demonstrate sound technical judgement - Demonstrate sound technical judgement
* Responsible for project quality control via [code reviews](REVIEWING.md) - Responsible for project quality control via [code reviews](REVIEWING.md)
* Focus on holistic acceptance of contribution such as dependencies with - Focus on holistic acceptance of contribution such as dependencies with
other features, backward / forward compatibility, API and flag other features, backward / forward compatibility, API and flag
definitions, etc definitions, etc
* Expected to be responsive to review requests as per [community - Expected to be responsive to review requests as per [community
expectations](REVIEWING.md) expectations](REVIEWING.md)
* Mentor members and contributors - Mentor members and contributors
* May approve code contributions for acceptance - May approve code contributions for acceptance
## Lead ## Lead
@ -233,53 +233,53 @@ and approve design decisions for their area of ownership.
Getting to be a lead of an existing working group: Getting to be a lead of an existing working group:
* Recognized as having expertise in the groups subject matter - Recognized as having expertise in the groups subject matter
* Approver for some part of the codebase for at least 3 months - Approver for some part of the codebase for at least 3 months
* Member for at least 1 year or 50% of project lifetime, whichever is shorter - Member for at least 1 year or 50% of project lifetime, whichever is shorter
* Primary reviewer for 20 substantial PRs - Primary reviewer for 20 substantial PRs
* Reviewed or merged at least 50 PRs - Reviewed or merged at least 50 PRs
* Sponsored by the technical oversight committee - Sponsored by the technical oversight committee
Additional requirements for leads of a new working group: Additional requirements for leads of a new working group:
* Originally authored or contributed major functionality to the group's area - Originally authored or contributed major functionality to the group's area
* An approver in the OWNERS file for the groups code - An approver in the OWNERS file for the groups code
### Responsibilities and privileges ### Responsibilities and privileges
The following apply to the area / component for which one would be an owner. The following apply to the area / component for which one would be an owner.
* Run their working group as explained in the [Working Group - Run their working group as explained in the [Working Group
Processes](WORKING-GROUP-PROCESSES.md). Processes](WORKING-GROUP-PROCESSES.md).
* Design/proposal approval authority over the area / component, though - Design/proposal approval authority over the area / component, though
escalation to the technical oversight committee is possible. escalation to the technical oversight committee is possible.
* Perform issue triage on GitHub. - Perform issue triage on GitHub.
* Apply/remove/create/delete GitHub labels and milestones - Apply/remove/create/delete GitHub labels and milestones
* Write access to repo (assign issues/PRs, add/remove labels and milestones, - Write access to repo (assign issues/PRs, add/remove labels and milestones,
edit issues and PRs, edit wiki, create/delete labels and milestones) edit issues and PRs, edit wiki, create/delete labels and milestones)
* Capable of directly applying lgtm + approve labels for any PR - Capable of directly applying lgtm + approve labels for any PR
* Expected to respect OWNERS files approvals and use [standard - Expected to respect OWNERS files approvals and use [standard
procedure for merging code](REVIEWING.md#merging-prs). procedure for merging code](REVIEWING.md#merging-prs).
* Expected to work to holistically maintain the health of the project through: - Expected to work to holistically maintain the health of the project through:
* Reviewing PRs - Reviewing PRs
* Fixing bugs - Fixing bugs
* Mentoring and guiding approvers, members, and contributors - Mentoring and guiding approvers, members, and contributors
## Administrator ## Administrator
@ -287,20 +287,20 @@ Administrators are responsible for the bureaucratic aspects of the project.
### Requirements ### Requirements
* Assigned by technical oversight committee. - Assigned by technical oversight committee.
### Responsibilities and privileges ### Responsibilities and privileges
* Manage the Knative GitHub repo, including granting membership and - Manage the Knative GitHub repo, including granting membership and
controlling repo read/write permissions controlling repo read/write permissions
* Manage the Knative Slack team - Manage the Knative Slack team
* Manage the Knative Google group forum - Manage the Knative Google group forum
* Manage any additional Knative technical collaboration assets - Manage any additional Knative technical collaboration assets
* Expected to be responsive to membership and permission change requests - Expected to be responsive to membership and permission change requests
<!-- TODO SLA for admin response --> <!-- TODO SLA for admin response -->
<!-- * TODO Manage the Google Search Console settings for knative.dev --> <!-- * TODO Manage the Google Search Console settings for knative.dev -->

View File

@ -16,14 +16,15 @@ You can join the [Knative Slack](https://slack.knative.dev) instance at
https://slack.knative.dev. https://slack.knative.dev.
## Code of Conduct ## Code of Conduct
The Knative [Code of Conduct](./CODE-OF-CONDUCT.md) applies throughout the The Knative [Code of Conduct](./CODE-OF-CONDUCT.md) applies throughout the
project, and includes all communication mediums. project, and includes all communication mediums.
## Admins ## Admins
* @mchmarny - @mchmarny
* @isdal - @isdal
* @dewitt - @dewitt
Slack admins should make sure to mention this in the “What I do” section of Slack admins should make sure to mention this in the “What I do” section of
their Slack profile, as well as for which time zone. their Slack profile, as well as for which time zone.
@ -34,16 +35,16 @@ of us privately.
### Admin Expectations and Guidelines ### Admin Expectations and Guidelines
* Adhere to Code of Conduct - Adhere to Code of Conduct
* Take care of spam as soon as possible, which may mean taking action by making - Take care of spam as soon as possible, which may mean taking action by making
members inactive members inactive
* Moderating and fostering a safe environment for conversations - Moderating and fostering a safe environment for conversations
* Bring Code of Conduct issues to the Steering Committee - Bring Code of Conduct issues to the Steering Committee
* Create relevant channels and list Code of Conduct in new channel welcome - Create relevant channels and list Code of Conduct in new channel welcome
message message
* Help troubleshoot Slack issues - Help troubleshoot Slack issues
* Review bot, token, and webhook requests - Review bot, token, and webhook requests
* Be helpful! - Be helpful!
## Creating Channels ## Creating Channels
@ -55,10 +56,10 @@ community topics, and related programs/projects.
Channels are not: Channels are not:
* company specific; e.g. a channel named for a cloud provider must be used for - company specific; e.g. a channel named for a cloud provider must be used for
conversation about Knative-related topics on that cloud, and not proprietary conversation about Knative-related topics on that cloud, and not proprietary
information of the provider. information of the provider.
* private unless there is an exception: code of conduct matters, mentoring, - private unless there is an exception: code of conduct matters, mentoring,
security/vulnerabilities, or steering committee. security/vulnerabilities, or steering committee.
All channels need a documented purpose. Use this space to welcome the targeted All channels need a documented purpose. Use this space to welcome the targeted
@ -110,9 +111,9 @@ Due to Slacks framework, it does not allow for an account to be banned or
suspended in the traditional sense. suspended in the traditional sense.
[Read Slacks policy on this.](https://get.Slack.help/hc/en-us/articles/204475027-Deactivate-a-member-s-account) [Read Slacks policy on this.](https://get.Slack.help/hc/en-us/articles/204475027-Deactivate-a-member-s-account)
* Spreading spam content in DMs and/or channels - Spreading spam content in DMs and/or channels
* Not adhering to the code of conduct set forth in DMs and/or channels - Not adhering to the code of conduct set forth in DMs and/or channels
* Overtly selling products, related or unrelated to Knative - Overtly selling products, related or unrelated to Knative
## Specific Channel Rules ## Specific Channel Rules

View File

@ -1,37 +1,37 @@
# Knative Steering Committee # Knative Steering Committee
The Knative Steering Committee (SC) defines, evolves, and defends the vision, The Knative Steering Committee (SC) defines, evolves, and defends the vision,
values, mission, and scope of the project. *The Steering Committee is a values, mission, and scope of the project. _The Steering Committee is a
work-in-progress.* work-in-progress._
* [Charter](#charter) - [Charter](#charter)
* [Committee Mechanics](#committee-mechanics) - [Committee Mechanics](#committee-mechanics)
* [Committee Members](#committee-members) - [Committee Members](#committee-members)
## Charter ## Charter
* Non-technical project oversight - Non-technical project oversight
* Define policy for the creation and administration of community groups, - Define policy for the creation and administration of community groups,
including [Working Groups](WORKING-GROUPS.md) and Committees. including [Working Groups](WORKING-GROUPS.md) and Committees.
* Define and evolve project governance structures and policies, including - Define and evolve project governance structures and policies, including
project role assignment and contributor promotion. project role assignment and contributor promotion.
* Approve members of the Tech Oversight Committee. - Approve members of the Tech Oversight Committee.
* Management of project assets - Management of project assets
* Control access to, establish processes regarding, and provide a final - Control access to, establish processes regarding, and provide a final
escalation path for any Knative repository. escalation path for any Knative repository.
* Guided by the TOC for normal business. - Guided by the TOC for normal business.
* Control and delegate access to and establish processes regarding other - Control and delegate access to and establish processes regarding other
project resources/assets not covered by the above, including web sites project resources/assets not covered by the above, including web sites
and their domains, blogs, social-media accounts, etc. and their domains, blogs, social-media accounts, etc.
* Manage the Knative brand to decide which things can be called “Knative” - Manage the Knative brand to decide which things can be called “Knative”
and how that mark can be used in relation to other efforts or vendors. and how that mark can be used in relation to other efforts or vendors.
## Committee Mechanics ## Committee Mechanics
@ -51,11 +51,11 @@ The members of the Steering Committee are shown below. Membership in the SC is
determined by current level of contribution to the project. Contribution is determined by current level of contribution to the project. Contribution is
periodically reviewed to ensure proper recognition. periodically reviewed to ensure proper recognition.
&nbsp; | Member | Company | Profile | &nbsp; | Member | Company | Profile |
-------------------------------------------------------- | -------------- | ------- | ------- | -------------------------------------------------------- | -------------- | ------- | ---------------------------------------- |
<img width="30px" src="https://github.com/dewitt.png"> | DeWitt Clinton | Google | [@dewitt](https://github.com/dewitt) | <img width="30px" src="https://github.com/dewitt.png"> | DeWitt Clinton | Google | [@dewitt](https://github.com/dewitt) |
<img width="30px" src="https://github.com/mchmarny.png"> | Mark Chmarny | Google | [@mchmarny](https://github.com/mchmarny) | <img width="30px" src="https://github.com/mchmarny.png"> | Mark Chmarny | Google | [@mchmarny](https://github.com/mchmarny) |
<img width="30px" src="https://github.com/isdal.png"> | Tomas Isdal | Google | [@isdal](https://github.com/isdal) | <img width="30px" src="https://github.com/isdal.png"> | Tomas Isdal | Google | [@isdal](https://github.com/isdal) |
--- ---

View File

@ -3,66 +3,66 @@
The Knative Technical Oversight Committee (TOC) is responsible for cross-cutting The Knative Technical Oversight Committee (TOC) is responsible for cross-cutting
product and design decisions. product and design decisions.
* [Charter](#charter) - [Charter](#charter)
* [Committee Mechanics](#committee-mechanics) - [Committee Mechanics](#committee-mechanics)
* [Committee Meeting](#committee-meeting) - [Committee Meeting](#committee-meeting)
* [Committee Members](#committee-members) - [Committee Members](#committee-members)
## Charter ## Charter
* Technical Project Oversight, Direction & Delivery - Technical Project Oversight, Direction & Delivery
* Set the overall technical direction and roadmap of the project. - Set the overall technical direction and roadmap of the project.
* Resolve technical issues, technical disagreements and escalations within - Resolve technical issues, technical disagreements and escalations within
the project. the project.
* Set the priorities of individual releases to ensure coherency and proper - Set the priorities of individual releases to ensure coherency and proper
sequencing. sequencing.
* Approve declaring a new long-term supported (LTS) Knative release. - Approve declaring a new long-term supported (LTS) Knative release.
* Approve the creation and dissolution of working groups and approve - Approve the creation and dissolution of working groups and approve
leadership changes of working groups. leadership changes of working groups.
* Create proposals based on TOC discussions and bring them to the relevant - Create proposals based on TOC discussions and bring them to the relevant
working groups for discussion. working groups for discussion.
* Approve the creation/deletion of GitHub repositories, along with other - Approve the creation/deletion of GitHub repositories, along with other
high-level administrative issues around GitHub and our other tools. high-level administrative issues around GitHub and our other tools.
* Happy Healthy Community - Happy Healthy Community
* Establish and maintain the overall technical governance guidelines for - Establish and maintain the overall technical governance guidelines for
the project. the project.
* Decide which sub-projects are part of the Knative project, including - Decide which sub-projects are part of the Knative project, including
accepting new sub-projects and pruning existing sub-projects to maintain accepting new sub-projects and pruning existing sub-projects to maintain
community focus community focus
* Ensure the team adheres to our [code of - Ensure the team adheres to our [code of
conduct](CONTRIBUTING.md#code-of-conduct) and respects our conduct](CONTRIBUTING.md#code-of-conduct) and respects our
[values](VALUES.md). [values](VALUES.md).
* Foster an environment for a healthy and happy community of developers - Foster an environment for a healthy and happy community of developers
and contributors. and contributors.
## Committee Mechanics ## Committee Mechanics
The TOCs work includes: The TOCs work includes:
* Regular committee meetings to discuss hot topics, resulting in a set of - Regular committee meetings to discuss hot topics, resulting in a set of
published [meeting published [meeting
notes](https://docs.google.com/document/d/1hR5ijJQjz65QkLrgEhWjv3Q86tWVxYj_9xdhQ6Y5D8Q/edit#). notes](https://docs.google.com/document/d/1hR5ijJQjz65QkLrgEhWjv3Q86tWVxYj_9xdhQ6Y5D8Q/edit#).
* Create, review, approve and publish technical project governance documents. - Create, review, approve and publish technical project governance documents.
* Create proposals for consideration by individual working groups to help - Create proposals for consideration by individual working groups to help
steer their work towards a common project-wide objective. steer their work towards a common project-wide objective.
* Review/address/comment on project issues. - Review/address/comment on project issues.
* Act as a high-level sounding board for technical questions or designs - Act as a high-level sounding board for technical questions or designs
bubbled up by the working groups. bubbled up by the working groups.
## Committee Meeting ## Committee Meeting
@ -71,24 +71,24 @@ Community members are encouraged to suggest topics for discussion ahead of the
TOC meetings, and are invited to observe these meetings and engage with the TOC TOC meetings, and are invited to observe these meetings and engage with the TOC
during the community feedback period at the end of each meeting. during the community feedback period at the end of each meeting.
Artifact | Link | Artifact | Link |
-------------------------- | ---- | -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
Google Group | [knative-tech-oversight@googlegroups.com](https://groups.google.com/forum/#!forum/knative-tech-oversight) | Google Group | [knative-tech-oversight@googlegroups.com](https://groups.google.com/forum/#!forum/knative-tech-oversight) |
Community Meeting VC | [meet.google.com/ffc-rypd-kih](https://meet.google.com/ffc-rypd-kih) <br>or dial in:<br>(US) +1 240-630-1102 PIN: 316262# | Community Meeting VC | [meet.google.com/ffc-rypd-kih](https://meet.google.com/ffc-rypd-kih) <br>or dial in:<br>(US) +1 240-630-1102 PIN: 316262# |
Community Meeting Calendar | Thursdays at 11:30a-12p <br>[Calendar](https://calendar.google.com/calendar/embed?src=google.com_18un4fuh6rokqf8hmfftm5oqq4%40group.calendar.google.com) | Community Meeting Calendar | Thursdays at 11:30a-12p <br>[Calendar](https://calendar.google.com/calendar/embed?src=google.com_18un4fuh6rokqf8hmfftm5oqq4%40group.calendar.google.com) |
Meeting Notes | [Notes](https://docs.google.com/document/d/1hR5ijJQjz65QkLrgEhWjv3Q86tWVxYj_9xdhQ6Y5D8Q/edit#heading=h.g47ptr8u5cov) | Meeting Notes | [Notes](https://docs.google.com/document/d/1hR5ijJQjz65QkLrgEhWjv3Q86tWVxYj_9xdhQ6Y5D8Q/edit#heading=h.g47ptr8u5cov) |
Document Folder | [Folder](https://drive.google.com/drive/folders/1_OHttsYLCVtX202aXNmJJrAHJ7BaXcu6) | Document Folder | [Folder](https://drive.google.com/drive/folders/1_OHttsYLCVtX202aXNmJJrAHJ7BaXcu6) |
## Committee Members ## Committee Members
The members of the TOC are shown below. Membership in the TOC is determined by The members of the TOC are shown below. Membership in the TOC is determined by
the [Steering committee](STEERING-COMMITTEE.md). the [Steering committee](STEERING-COMMITTEE.md).
&nbsp; | Member | Company | Profile | &nbsp; | Member | Company | Profile |
------------------------------------------------------------- | ------------- | ------- | ------- | ------------------------------------------------------------- | ------------- | ------- | -------------------------------------------------- |
<img width="30px" src="https://github.com/evankanderson.png"> | Evan Anderson | Google | [@evankanderson](https://github.com/evankanderson) | <img width="30px" src="https://github.com/evankanderson.png"> | Evan Anderson | Google | [@evankanderson](https://github.com/evankanderson) |
<img width="30px" src="https://github.com/mattmoor.png"> | Matt Moore | Google | [@mattmoor](https://github.com/mattmoor) | <img width="30px" src="https://github.com/mattmoor.png"> | Matt Moore | Google | [@mattmoor](https://github.com/mattmoor) |
<img width="30px" src="https://github.com/vaikas-google.png"> | Ville Aikas | Google | [@vaikas-google](https://github.com/vaikas-google) | <img width="30px" src="https://github.com/vaikas-google.png"> | Ville Aikas | Google | [@vaikas-google](https://github.com/vaikas-google) |
--- ---

View File

@ -3,49 +3,49 @@
We want to make sure every member has a shared understanding of the goals and We want to make sure every member has a shared understanding of the goals and
values we hold as a team: values we hold as a team:
* Optimize for the **overall project**, not your own area or feature - Optimize for the **overall project**, not your own area or feature
* A shortcut for one individual can mean a lot of extra work or disruption - A shortcut for one individual can mean a lot of extra work or disruption
for the rest of the team. for the rest of the team.
* Our repos should always be in release shape: **Always Green** - Our repos should always be in release shape: **Always Green**
* This lets us move faster in the mid and long term. - This lets us move faster in the mid and long term.
* This implies investments in build/test infrastructure to have fast, - This implies investments in build/test infrastructure to have fast,
reliable tests to ensure that we can release at any time. reliable tests to ensure that we can release at any time.
* Extra discipline may require more work by individuals to keep the build - Extra discipline may require more work by individuals to keep the build
in good state, but less work overall for the team. in good state, but less work overall for the team.
* Be **specific**, **respectful** and **courteous** - Be **specific**, **respectful** and **courteous**
* Disagreements are welcome and encouraged, but don't use broad - Disagreements are welcome and encouraged, but don't use broad
generalizations, exaggerations, or judgment words that can be taken generalizations, exaggerations, or judgment words that can be taken
personally. Consider other peoples perspective (including the wide personally. Consider other peoples perspective (including the wide
range of applicability of Knative). Empathize with our users. Focus on range of applicability of Knative). Empathize with our users. Focus on
the specific issue at hand, and remember that we all care about the the specific issue at hand, and remember that we all care about the
project, first and foremost. project, first and foremost.
* Emails to the [mailing lists](CONTRIBUTING.md#contributing-a-feature), - Emails to the [mailing lists](CONTRIBUTING.md#contributing-a-feature),
document comments, or meetings are often better and higher bandwidth document comments, or meetings are often better and higher bandwidth
ways to communicate complex and nuanced design issues, as opposed to ways to communicate complex and nuanced design issues, as opposed to
protracted heated live chats. protracted heated live chats.
* Be mindful of the terminology you are using, it may not be the same as - Be mindful of the terminology you are using, it may not be the same as
someone else and cause misunderstanding. To promote clear and precise someone else and cause misunderstanding. To promote clear and precise
communication, define the terms you are using in context. communication, define the terms you are using in context.
* See also the [Code of Conduct](CODE-OF-CONDUCT.md), which everyone must - See also the [Code of Conduct](CODE-OF-CONDUCT.md), which everyone must
abide by. abide by.
* Raising issues is great, suggesting solutions is even better - Raising issues is great, suggesting solutions is even better
* Think of a proposed alternative and improvement rather than just what - Think of a proposed alternative and improvement rather than just what
you perceive as wrong. you perceive as wrong.
* If you have no immediate solution even after thinking about it - if - If you have no immediate solution even after thinking about it - if
something does seem significant, raise it to someone who might be able something does seem significant, raise it to someone who might be able
to also think of solutions or to the group (dont stay frustrated! Feel to also think of solutions or to the group (dont stay frustrated! Feel
safe in bringing up issues. safe in bringing up issues.
* Avoid rehashing old issues that have been resolved/decided - Avoid rehashing old issues that have been resolved/decided
(unless you have new insights or information). (unless you have new insights or information).
* Be productive and **happy**, and most importantly, have *fun* :-) - Be productive and **happy**, and most importantly, have _fun_ :-)
--- ---

View File

@ -4,15 +4,15 @@ This document describes the processes we use to manage the Knative working
groups. This includes how they are formed, how leads are established, how they groups. This includes how they are formed, how leads are established, how they
are run, etc. are run, etc.
* [Why working groups?](#why-working-groups) - [Why working groups?](#why-working-groups)
* [Proposing a new working group](#proposing-a-new-working-group) - [Proposing a new working group](#proposing-a-new-working-group)
* [Setting up a working group](#setting-up-a-working-group) - [Setting up a working group](#setting-up-a-working-group)
* [Dissolving a working group](#dissolving-a-working-group) - [Dissolving a working group](#dissolving-a-working-group)
* [Running a working group](#running-a-working-group) - [Running a working group](#running-a-working-group)
* [Be open](#be-open) - [Be open](#be-open)
* [Making decisions](#making-decisions) - [Making decisions](#making-decisions)
* [Subgroups](#subgroups) - [Subgroups](#subgroups)
* [Escalations](#escalations) - [Escalations](#escalations)
## Why working groups? ## Why working groups?
@ -39,24 +39,24 @@ If youve identified a substantial architectural area which would benefit from
long-lived, concerted and focused design, then you should consider creating a long-lived, concerted and focused design, then you should consider creating a
new working group. To do so, you need to: new working group. To do so, you need to:
* **Create a charter**. This should be a few paragraphs explaining: - **Create a charter**. This should be a few paragraphs explaining:
* The mission of the working group - The mission of the working group
* The goals of the working group (problems being solved) - The goals of the working group (problems being solved)
* The scope of the working group (topics, subsystems, code repos, areas of - The scope of the working group (topics, subsystems, code repos, areas of
responsibility) responsibility)
* **Nominate an initial set of leads**. The leads set the agenda for the - **Nominate an initial set of leads**. The leads set the agenda for the
working group and serve as final arbiters on any technical decision. See working group and serve as final arbiters on any technical decision. See
[below](#leads) for information on the responsibilities of leads and [below](#leads) for information on the responsibilities of leads and
requirements for nominating them. requirements for nominating them.
* **Prepare a Roadmap**. Create a preliminary 3 month roadmap for what the - **Prepare a Roadmap**. Create a preliminary 3 month roadmap for what the
working group would focus on. working group would focus on.
* **Send an Email**. Write up an email with your charter, nominated leads, and - **Send an Email**. Write up an email with your charter, nominated leads, and
roadmap, and send it to roadmap, and send it to
[knative-tech-oversight@](mailto:knative-tech-oversight@googlegroups.com). [knative-tech-oversight@](mailto:knative-tech-oversight@googlegroups.com).
The technical oversight committee will evaluate the request and decide The technical oversight committee will evaluate the request and decide
@ -70,38 +70,38 @@ Once approval has been granted by the technical oversight committee to form a
working group, the working group leads need to take a few steps to establish the working group, the working group leads need to take a few steps to establish the
working group: working group:
* **Create a Google Drive Folder**. Create a folder to hold your - **Create a Google Drive Folder**. Create a folder to hold your
working group documents within this parent working group documents within this parent
[folder](https://drive.google.com/corp/drive/folders/0APnJ_hRs30R2Uk9PVA). Call [folder](https://drive.google.com/corp/drive/folders/0APnJ_hRs30R2Uk9PVA). Call
your folder "GROUP_NAME". your folder "GROUP_NAME".
* **Create a Meeting Notes Document**. Create a blank document in the above - **Create a Meeting Notes Document**. Create a blank document in the above
folder and call it "GROUP_NAME Group Meeting Notes". folder and call it "GROUP_NAME Group Meeting Notes".
* **Create a Roadmap Document**. Create a document in the above folder and - **Create a Roadmap Document**. Create a document in the above folder and
call it "GROUP_NAME Group Roadmap". Put your initial roadmap in the call it "GROUP_NAME Group Roadmap". Put your initial roadmap in the
document. document.
* **Create a Wiki**. Create a wiki page on - **Create a Wiki**. Create a wiki page on
[GitHub](https://github.com/knative/serving) titled "GROUP_NAME Design [GitHub](https://github.com/knative/serving) titled "GROUP_NAME Design
Decisions". This page will be used to track important design decisions made Decisions". This page will be used to track important design decisions made
by the working group. by the working group.
* **Create a Public Google Group**. Call the group "knative-*group_name*" (all - **Create a Public Google Group**. Call the group "knative-_group_name_" (all
in lowercase, dashes for spaces). This mailing list must be open to all. in lowercase, dashes for spaces). This mailing list must be open to all.
* **Schedule a Recurring Meeting**. Create a recurring meeting (weekly or - **Schedule a Recurring Meeting**. Create a recurring meeting (weekly or
bi-weekly, 30 or 60 minutes) and call the meeting GROUP_NAME Group Sync-Up". bi-weekly, 30 or 60 minutes) and call the meeting GROUP_NAME Group Sync-Up".
Attach the meeting notes document to the calendar event. Generally schedule Attach the meeting notes document to the calendar event. Generally schedule
these meetings between 9:00AM to 2:59PM Pacific Time. Invite the public these meetings between 9:00AM to 2:59PM Pacific Time. Invite the public
Google group to the meeting. Google group to the meeting.
* **Register the Working Group**. Go to - **Register the Working Group**. Go to
[WORKING-GROUPS.md](https://github.com/knative/serving/blob/master/community/WORKING-GROUPS.md) [WORKING-GROUPS.md](https://github.com/knative/serving/blob/master/community/WORKING-GROUPS.md)
and add your working group name, the names of the leads, the working group and add your working group name, the names of the leads, the working group
charter, and a link to the meeting you created. charter, and a link to the meeting you created.
* **Announce your Working Group**. Send a note to - **Announce your Working Group**. Send a note to
[knative-dev@](mailto:knative-dev@googlegroups.com) and [knative-dev@](mailto:knative-dev@googlegroups.com) and
[knative-tech-oversight@](mailto:knative-tech-oversight@googlegroups.com) to [knative-tech-oversight@](mailto:knative-tech-oversight@googlegroups.com) to
announce your new working group. Include your charter in the email and announce your new working group. Include your charter in the email and
@ -137,22 +137,22 @@ leads role and requirements.
Leads are responsible for running a working group. Running the group involves a Leads are responsible for running a working group. Running the group involves a
few activities: few activities:
* **Meetings**. Prepare the agenda and run the regular working group meetings. - **Meetings**. Prepare the agenda and run the regular working group meetings.
Ensure the meetings are recorded, and properly archived. Ensure the meetings are recorded, and properly archived.
* **Notes**. Ensure that meeting notes are kept up to date. Provide a link to - **Notes**. Ensure that meeting notes are kept up to date. Provide a link to
the recorded meeting in the notes. The lead may delegate note-taking duties. the recorded meeting in the notes. The lead may delegate note-taking duties.
* **Wiki**. Ensure that significant design decisions are captured in the Wiki. - **Wiki**. Ensure that significant design decisions are captured in the Wiki.
In the Wiki, include links to useful design documents, any interesting In the Wiki, include links to useful design documents, any interesting
GitHub issues or PRs, posts to the mailing lists, etc. The wiki should GitHub issues or PRs, posts to the mailing lists, etc. The wiki should
provide a good feel for where the mind of the working group is at and where provide a good feel for where the mind of the working group is at and where
things are headed. things are headed.
* **Roadmap**. Establish **and maintain** a roadmap for the working group - **Roadmap**. Establish **and maintain** a roadmap for the working group
outlining the areas of focus for the working group over the next 3 months. outlining the areas of focus for the working group over the next 3 months.
* **Report**. Report current status to the main community meeting every 6 - **Report**. Report current status to the main community meeting every 6
weeks. weeks.
### Be open ### Be open

View File

@ -1,6 +1,6 @@
# Knative Working Groups # Knative Working Groups
Most community activity is organized into *working groups*. Most community activity is organized into _working groups_.
Working groups follow the [contributing](CONTRIBUTING.md) guidelines although Working groups follow the [contributing](CONTRIBUTING.md) guidelines although
each of these groups may operate a little differently depending on their needs each of these groups may operate a little differently depending on their needs
@ -27,155 +27,155 @@ meetings.
The current working groups are: The current working groups are:
* [API Core](#api-core) - [API Core](#api-core)
* [Build](#build) - [Build](#build)
* [Documentation](#documentation) - [Documentation](#documentation)
* [Eventing](#eventing) - [Eventing](#eventing)
* [Networking](#networking) - [Networking](#networking)
* [Observability](#observability) - [Observability](#observability)
* [Productivity](#productivity) - [Productivity](#productivity)
* [Scaling](#scaling) - [Scaling](#scaling)
<!-- TODO add charters for each group --> <!-- TODO add charters for each group -->
## API Core ## API Core
API [resources](../pkg/apis/serving), [validation](../pkg/webhook), and [semantics](../pkg/controller). API [resources](../pkg/apis/serving), [validation](../pkg/webhook), and [semantics](../pkg/controller).
Artifact | Link | Artifact | Link |
-------------------------- | ---- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
Forum | [knative-dev@](https://groups.google.com/forum/#!forum/knative-dev) | Forum | [knative-dev@](https://groups.google.com/forum/#!forum/knative-dev) |
Community Meeting VC | [https://meet.google.com/bzx-bjqa-rha](https://meet.google.com/bzx-bjqa-rha) <br>Or dial in:<br>(US) +1 262-448-6367<br>PIN: 923 539# | Community Meeting VC | [https://meet.google.com/bzx-bjqa-rha](https://meet.google.com/bzx-bjqa-rha) <br>Or dial in:<br>(US) +1 262-448-6367<br>PIN: 923 539# |
Community Meeting Calendar | Wednesdays 10:30a-11:00a PST <br>[Calendar](https://calendar.google.com/calendar/embed?src=google.com_18un4fuh6rokqf8hmfftm5oqq4%40group.calendar.google.com) | Community Meeting Calendar | Wednesdays 10:30a-11:00a PST <br>[Calendar](https://calendar.google.com/calendar/embed?src=google.com_18un4fuh6rokqf8hmfftm5oqq4%40group.calendar.google.com) |
Meeting Notes | [Notes](https://docs.google.com/document/d/1NC4klOdNaU-N-PsKLyXBqDKgNSHtxCDep29Ta2b5FK0/edit) | Meeting Notes | [Notes](https://docs.google.com/document/d/1NC4klOdNaU-N-PsKLyXBqDKgNSHtxCDep29Ta2b5FK0/edit) |
Document Folder | [Folder](https://drive.google.com/corp/drive/folders/1fpBW7VyiBISsKuVdgn1MrgFdtx_JGoC5) | Document Folder | [Folder](https://drive.google.com/corp/drive/folders/1fpBW7VyiBISsKuVdgn1MrgFdtx_JGoC5) |
Slack Channel | [#api](https://knative.slack.com/messages/api) | Slack Channel | [#api](https://knative.slack.com/messages/api) |
&nbsp; | Leads | Company | Profile | &nbsp; | Leads | Company | Profile |
-------------------------------------------------------- | ---------- | ------- | ------- | -------------------------------------------------------- | ---------- | ------- | --------------------------------------- |
<img width="30px" src="https://github.com/mattmoor.png"> | Matt Moore | Google | [mattmoor](https://github.com/mattmoor) | <img width="30px" src="https://github.com/mattmoor.png"> | Matt Moore | Google | [mattmoor](https://github.com/mattmoor) |
## Build ## Build
[Build](https://github.com/knative/build), Builders, and Build templates [Build](https://github.com/knative/build), Builders, and Build templates
Artifact | Link | Artifact | Link |
-------------------------- | ---- | -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
Forum | [knative-dev@](https://groups.google.com/forum/#!forum/knative-dev) | Forum | [knative-dev@](https://groups.google.com/forum/#!forum/knative-dev) |
Community Meeting VC | [meet.google.com/hau-nwak-tgm](https://meet.google.com/hau-nwak-tgm) <br>Or dial in:<br>(US) +1 219-778-6103 PIN: 573 000# | Community Meeting VC | [meet.google.com/hau-nwak-tgm](https://meet.google.com/hau-nwak-tgm) <br>Or dial in:<br>(US) +1 219-778-6103 PIN: 573 000# |
Community Meeting Calendar | Wednesdays 10:00a-10:30a PST <br>[Calendar](https://calendar.google.com/event?action=TEMPLATE&tmeid=MTBkb3MwYnVrbDd0djE0a2kzcmpmbjZndm9fMjAxODA5MTJUMTcwMDAwWiBqYXNvbmhhbGxAZ29vZ2xlLmNvbQ&tmsrc=jasonhall%40google.com&scp=ALL) | Community Meeting Calendar | Wednesdays 10:00a-10:30a PST <br>[Calendar](https://calendar.google.com/event?action=TEMPLATE&tmeid=MTBkb3MwYnVrbDd0djE0a2kzcmpmbjZndm9fMjAxODA5MTJUMTcwMDAwWiBqYXNvbmhhbGxAZ29vZ2xlLmNvbQ&tmsrc=jasonhall%40google.com&scp=ALL) |
Meeting Notes | [Notes](https://docs.google.com/document/d/1e7gMVFlJfkFdTcaWj2qETeRD9kSBG2Vh8mASPmQMYC0/edit) | Meeting Notes | [Notes](https://docs.google.com/document/d/1e7gMVFlJfkFdTcaWj2qETeRD9kSBG2Vh8mASPmQMYC0/edit) |
Document Folder | [Folder](https://drive.google.com/corp/drive/folders/1ov16HvPam-v_FXAGEaUdHok6_hUAoIoe) | Document Folder | [Folder](https://drive.google.com/corp/drive/folders/1ov16HvPam-v_FXAGEaUdHok6_hUAoIoe) |
Slack Channel | [#build-crd](https://knative.slack.com/messages/build-crd) | Slack Channel | [#build-crd](https://knative.slack.com/messages/build-crd) |
&nbsp; | Leads | Company | Profile | &nbsp; | Leads | Company | Profile |
-------------------------------------------------------- | ---------- | ------- | ------- | -------------------------------------------------------- | ---------- | ------- | --------------------------------------- |
<img width="30px" src="https://github.com/ImJasonH.png"> | Jason Hall | Google | [ImJasonH](https://github.com/ImJasonH) | <img width="30px" src="https://github.com/ImJasonH.png"> | Jason Hall | Google | [ImJasonH](https://github.com/ImJasonH) |
<img width="30px" src="https://github.com/mattmoor.png"> | Matt Moore | Google | [mattmoor](https://github.com/mattmoor) | <img width="30px" src="https://github.com/mattmoor.png"> | Matt Moore | Google | [mattmoor](https://github.com/mattmoor) |
## Documentation ## Documentation
Knative documentation, especially the [Docs](https://github.com/knative/docs) repo. Knative documentation, especially the [Docs](https://github.com/knative/docs) repo.
Artifact | Link | Artifact | Link |
-------------------------- | ---- | -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
Forum | [knative-docs@](https://groups.google.com/forum/#!forum/knative-docs) | Forum | [knative-docs@](https://groups.google.com/forum/#!forum/knative-docs) |
Community Meeting VC | [meet.google.com/mku-npuv-cjs](https://meet.google.com/mku-npuv-cjs) <br>Or dial in:<br>(US) +1 260-277-0211<br>PIN: 956 724# | Community Meeting VC | [meet.google.com/mku-npuv-cjs](https://meet.google.com/mku-npuv-cjs) <br>Or dial in:<br>(US) +1 260-277-0211<br>PIN: 956 724# |
Community Meeting Calendar | Every other Tuesday, 9:00a-9:30a PST<br>[Calendar](https://calendar.google.com/calendar/embed?src=google.com_18un4fuh6rokqf8hmfftm5oqq4%40group.calendar.google.com) | Community Meeting Calendar | Every other Tuesday, 9:00a-9:30a PST<br>[Calendar](https://calendar.google.com/calendar/embed?src=google.com_18un4fuh6rokqf8hmfftm5oqq4%40group.calendar.google.com) |
Meeting Notes | [Notes](https://docs.google.com/document/d/1Y7rug0XshcQPdKzptdWbQLQjcjgpFdLeEgP1nfkDAe4/edit) | Meeting Notes | [Notes](https://docs.google.com/document/d/1Y7rug0XshcQPdKzptdWbQLQjcjgpFdLeEgP1nfkDAe4/edit) |
Document Folder | [Folder](https://drive.google.com/corp/drive/folders/1K5cM9m-b93ySI5WGKalJKbBq_cfjyi-y) | Document Folder | [Folder](https://drive.google.com/corp/drive/folders/1K5cM9m-b93ySI5WGKalJKbBq_cfjyi-y) |
Slack Channel | [#docs](https://knative.slack.com/messages/docs) | Slack Channel | [#docs](https://knative.slack.com/messages/docs) |
&nbsp; | Leads | Company | Profile | &nbsp; | Leads | Company | Profile |
------------------------------------------------------------- | ----------- | ------- | ------- | -------------------------------------------------------- | ---------- | ------- | --------------------------------------- |
<img width="30px" src="https://github.com/samodell.png"> | Sam O'Dell | Google | [samodell](https://github.com/samodell) | <img width="30px" src="https://github.com/samodell.png"> | Sam O'Dell | Google | [samodell](https://github.com/samodell) |
## Eventing ## Eventing
Event sources, bindings, FaaS framework, and orchestration Event sources, bindings, FaaS framework, and orchestration
Artifact | Link | Artifact | Link |
-------------------------- | ---- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
Forum | [knative-dev@](https://groups.google.com/forum/#!forum/knative-dev) | Forum | [knative-dev@](https://groups.google.com/forum/#!forum/knative-dev) |
Community Meeting VC | [meet.google.com/uea-zcwt-drt](https://meet.google.com/uea-zcwt-drt) <br>Or dial in:<br>(US) +1 919 525 1825<br>PIN: 356 842# | Community Meeting VC | [meet.google.com/uea-zcwt-drt](https://meet.google.com/uea-zcwt-drt) <br>Or dial in:<br>(US) +1 919 525 1825<br>PIN: 356 842# |
Community Meeting Calendar | Wednesdays 9:00a-9:30a PST<br>[Calendar](https://calendar.google.com/calendar/embed?src=google.com_5pce19kpifu8avnj0eo74sg84c%40group.calendar.google.com) | Community Meeting Calendar | Wednesdays 9:00a-9:30a PST<br>[Calendar](https://calendar.google.com/calendar/embed?src=google.com_5pce19kpifu8avnj0eo74sg84c%40group.calendar.google.com) |
Meeting Notes | [Notes](https://docs.google.com/document/d/1uGDehQu493N_XCAT5H4XEw5T9IWlPN1o19ULOWKuPnY/edit) | Meeting Notes | [Notes](https://docs.google.com/document/d/1uGDehQu493N_XCAT5H4XEw5T9IWlPN1o19ULOWKuPnY/edit) |
Document Folder | [Folder](https://drive.google.com/corp/drive/folders/1S22YmGl6B1ppYApwa1j5j9Nc6rEChlPo) | Document Folder | [Folder](https://drive.google.com/corp/drive/folders/1S22YmGl6B1ppYApwa1j5j9Nc6rEChlPo) |
Slack Channel | [#eventing](https://knative.slack.com/messages/eventing) | Slack Channel | [#eventing](https://knative.slack.com/messages/eventing) |
&nbsp; | Leads | Company | Profile | &nbsp; | Leads | Company | Profile |
------------------------------------------------------------- | ----------- | ------- | ------- | ------------------------------------------------------------- | ----------- | ------- | ------------------------------------------------- |
<img width="30px" src="https://github.com/vaikas-google.png"> | Ville Aikas | Google | [vaikas-google](https://github.com/vaikas-google) | <img width="30px" src="https://github.com/vaikas-google.png"> | Ville Aikas | Google | [vaikas-google](https://github.com/vaikas-google) |
## Networking ## Networking
Inbound and outbound network connectivity for [serving](https://github.com/knative/serving) workloads. Inbound and outbound network connectivity for [serving](https://github.com/knative/serving) workloads.
Specific areas of interest include: load balancing, routing, DNS configuration and TLS support. Specific areas of interest include: load balancing, routing, DNS configuration and TLS support.
Artifact | Link | Artifact | Link |
-------------------------- | ---- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
Forum | [knative-dev@](https://groups.google.com/forum/#!forum/knative-dev) | Forum | [knative-dev@](https://groups.google.com/forum/#!forum/knative-dev) |
Community Meeting VC | [meet.google.com/cet-jepr-gtx](https://meet.google.com/cet-jepr-gtx) <br>Or dial in:<br>(US) +1 570-865-1288<br>PIN: 741 211# | Community Meeting VC | [meet.google.com/cet-jepr-gtx](https://meet.google.com/cet-jepr-gtx) <br>Or dial in:<br>(US) +1 570-865-1288<br>PIN: 741 211# |
Community Meeting Calendar | Thursdays at 9:00a-9:30a PST<br>[Calendar](https://calendar.google.com/calendar/embed?src=google.com_18un4fuh6rokqf8hmfftm5oqq4%40group.calendar.google.com) | Community Meeting Calendar | Thursdays at 9:00a-9:30a PST<br>[Calendar](https://calendar.google.com/calendar/embed?src=google.com_18un4fuh6rokqf8hmfftm5oqq4%40group.calendar.google.com) |
Meeting Notes | [Notes](https://drive.google.com/open?id=1EE1t5mTfnTir2lEasdTMRNtuPEYuPqQCZbU3NC9mHOI) | Meeting Notes | [Notes](https://drive.google.com/open?id=1EE1t5mTfnTir2lEasdTMRNtuPEYuPqQCZbU3NC9mHOI) |
Document Folder | [Folder](https://drive.google.com/corp/drive/folders/1oVDYbcEDdQ9EpUmkK6gE4C7aZ8u6ujsN) | Document Folder | [Folder](https://drive.google.com/corp/drive/folders/1oVDYbcEDdQ9EpUmkK6gE4C7aZ8u6ujsN) |
Slack Channel | [#networking](https://knative.slack.com/messages/networking) | Slack Channel | [#networking](https://knative.slack.com/messages/networking) |
&nbsp; | Leads | Company | Profile | &nbsp; | Leads | Company | Profile |
--------------------------------------------------------- | ---------------- | ------- | ------- | --------------------------------------------------------- | ---------------- | ------- | ----------------------------------------- |
<img width="30px" src="https://github.com/tcnghia.png"> | Nghia Tran | Google | [tcnghia](https://github.com/tcnghia) | <img width="30px" src="https://github.com/tcnghia.png"> | Nghia Tran | Google | [tcnghia](https://github.com/tcnghia) |
<img width="30px" src="https://github.com/mdemirhan.png"> | Mustafa Demirhan | Google | [mdemirhan](https://github.com/mdemirhan) | <img width="30px" src="https://github.com/mdemirhan.png"> | Mustafa Demirhan | Google | [mdemirhan](https://github.com/mdemirhan) |
## Observability ## Observability
Logging, monitoring & tracing infrastructure Logging, monitoring & tracing infrastructure
Artifact | Link | Artifact | Link |
-------------------------- | ---- | -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
Forum | [knative-dev@](https://groups.google.com/forum/#!forum/knative-dev) | Forum | [knative-dev@](https://groups.google.com/forum/#!forum/knative-dev) |
Community Meeting VC | meet.google.com/kps-noeu-uzz <br> Or dial in: <br> (US) +1 413-301-9135 <br>PIN: 602 561# | Community Meeting VC | meet.google.com/kps-noeu-uzz <br> Or dial in: <br> (US) +1 413-301-9135 <br>PIN: 602 561# |
Community Meeting Calendar | Every other Thursday, 10:30a-11a PST<br>[Calendar](https://calendar.google.com/calendar/embed?src=google.com_18un4fuh6rokqf8hmfftm5oqq4%40group.calendar.google.com) | Community Meeting Calendar | Every other Thursday, 10:30a-11a PST<br>[Calendar](https://calendar.google.com/calendar/embed?src=google.com_18un4fuh6rokqf8hmfftm5oqq4%40group.calendar.google.com) |
Meeting Notes | [Notes](https://drive.google.com/open?id=1vWEpjf093Jsih3mKkpIvmWWbUQPxFkcyDxzNH15rQgE) | Meeting Notes | [Notes](https://drive.google.com/open?id=1vWEpjf093Jsih3mKkpIvmWWbUQPxFkcyDxzNH15rQgE) |
Document Folder | [Folder](https://drive.google.com/corp/drive/folders/10HcpZlI1PbFyzinO6HjfHbzCkBXrqXMy) | Document Folder | [Folder](https://drive.google.com/corp/drive/folders/10HcpZlI1PbFyzinO6HjfHbzCkBXrqXMy) |
Slack Channel | [#observability](https://knative.slack.com/messages/observability) | Slack Channel | [#observability](https://knative.slack.com/messages/observability) |
&nbsp; | Leads | Company | Profile | &nbsp; | Leads | Company | Profile |
--------------------------------------------------------- | ---------------- | ------- | ------- | --------------------------------------------------------- | ---------------- | ------- | ----------------------------------------- |
<img width="30px" src="https://github.com/mdemirhan.png"> | Mustafa Demirhan | Google | [mdemirhan](https://github.com/mdemirhan) | <img width="30px" src="https://github.com/mdemirhan.png"> | Mustafa Demirhan | Google | [mdemirhan](https://github.com/mdemirhan) |
## Scaling ## Scaling
Autoscaling Autoscaling
Artifact | Link | Artifact | Link |
-------------------------- | ---- | -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
Forum | [knative-dev@](https://groups.google.com/forum/#!forum/knative-dev) | Forum | [knative-dev@](https://groups.google.com/forum/#!forum/knative-dev) |
Community Meeting VC | [Hangouts](https://meet.google.com/ick-mumc-mjv?hs=122) | Community Meeting VC | [Hangouts](https://meet.google.com/ick-mumc-mjv?hs=122) |
Community Meeting Calendar | Wednesdays at 9:30am PST <br>[Calendar](https://calendar.google.com/calendar/embed?src=google.com_18un4fuh6rokqf8hmfftm5oqq4%40group.calendar.google.com) | Community Meeting Calendar | Wednesdays at 9:30am PST <br>[Calendar](https://calendar.google.com/calendar/embed?src=google.com_18un4fuh6rokqf8hmfftm5oqq4%40group.calendar.google.com) |
Meeting Notes | [Notes](https://docs.google.com/document/d/1FoLJqbDJM8_tw7CON-CJZsO2mlF8Ia1cWzCjWX8HDAI/edit#heading=h.c0ufqy5rucfa) | Meeting Notes | [Notes](https://docs.google.com/document/d/1FoLJqbDJM8_tw7CON-CJZsO2mlF8Ia1cWzCjWX8HDAI/edit#heading=h.c0ufqy5rucfa) |
Document Folder | [Folder](https://drive.google.com/corp/drive/folders/1qpGIPXVGoMm6IXb74gPrrHkudV_bjIZ9) | Document Folder | [Folder](https://drive.google.com/corp/drive/folders/1qpGIPXVGoMm6IXb74gPrrHkudV_bjIZ9) |
Slack Channel | [#autoscaling](https://knative.slack.com/messages/autoscaling) | Slack Channel | [#autoscaling](https://knative.slack.com/messages/autoscaling) |
&nbsp; | Leads | Company | Profile | &nbsp; | Leads | Company | Profile |
------------------------------------------------------------- | -------------- | ------- | ------- | ------------------------------------------------------------- | -------------- | ------- | ------------------------------------------------- |
<img width="30px" src="https://github.com/josephburnett.png"> | Joseph Burnett | Google | [josephburnett](https://github.com/josephburnett) | <img width="30px" src="https://github.com/josephburnett.png"> | Joseph Burnett | Google | [josephburnett](https://github.com/josephburnett) |
## Productivity ## Productivity
Project health, test framework, continuous integration & deployment, release, performance/scale/load testing infrastructure Project health, test framework, continuous integration & deployment, release, performance/scale/load testing infrastructure
Artifact | Link | Artifact | Link |
-------------------------- | ---- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
Forum | [knative-dev@](https://groups.google.com/forum/#!forum/knative-dev) | Forum | [knative-dev@](https://groups.google.com/forum/#!forum/knative-dev) |
Community Meeting VC | [Hangouts](https://meet.google.com/sps-vbhg-rfx) | Community Meeting VC | [Hangouts](https://meet.google.com/sps-vbhg-rfx) |
Community Meeting Calendar | Every other Thursday, 2p PST<br>[Calendar](https://calendar.google.com/calendar/embed?src=google.com_18un4fuh6rokqf8hmfftm5oqq4%40group.calendar.google.com) | Community Meeting Calendar | Every other Thursday, 2p PST<br>[Calendar](https://calendar.google.com/calendar/embed?src=google.com_18un4fuh6rokqf8hmfftm5oqq4%40group.calendar.google.com) |
Meeting Notes | [Notes](https://docs.google.com/document/d/1aPRwYGD4XscRIqlBzbNsSB886PJ0G-vZYUAAUjoydko) | Meeting Notes | [Notes](https://docs.google.com/document/d/1aPRwYGD4XscRIqlBzbNsSB886PJ0G-vZYUAAUjoydko) |
Document Folder | [Folder](https://drive.google.com/corp/drive/folders/1oMYB4LQHjySuMChmcWYCyhH7-CSkz2r_) | Document Folder | [Folder](https://drive.google.com/corp/drive/folders/1oMYB4LQHjySuMChmcWYCyhH7-CSkz2r_) |
Slack Channel | [#productivity](https://knative.slack.com/messages/productivity) | Slack Channel | [#productivity](https://knative.slack.com/messages/productivity) |
&nbsp; | Leads | Company | Profile | &nbsp; | Leads | Company | Profile |
--------------------------------------------------------- | -------------- | ------- | ------- | --------------------------------------------------------- | ------------- | ------- | ----------------------------------------- |
<img width="30px" src="https://github.com/jessiezcc.png"> | Jessie Zhu | Google | [jessiezcc](https://github.com/jessiezcc) | <img width="30px" src="https://github.com/jessiezcc.png"> | Jessie Zhu | Google | [jessiezcc](https://github.com/jessiezcc) |
<img width="30px" src="https://github.com/adrcunha.png"> | Adriano Cunha | Google | [adrcunhua](https://github.com/adrcunha) | <img width="30px" src="https://github.com/adrcunha.png"> | Adriano Cunha | Google | [adrcunhua](https://github.com/adrcunha) |
--- ---

View File

@ -155,6 +155,10 @@ not, then you will need to look downstream yourself.
You should see log lines similar to: You should see log lines similar to:
```json ```json
{"ID":"284375451531353","Data":"SGVsbG8gV29ybGQh","Attributes":null,"PublishTime":"2018-10-31T00:00:00.00Z"} {
"ID": "284375451531353",
"Data": "SGVsbG8gV29ybGQh",
"Attributes": null,
"PublishTime": "2018-10-31T00:00:00.00Z"
}
``` ```

View File

@ -44,7 +44,6 @@ spec:
Enter the following command to create the service from `service.yaml`: Enter the following command to create the service from `service.yaml`:
```shell ```shell
kubectl --namespace default apply --filename eventing/samples/github-source/service.yaml kubectl --namespace default apply --filename eventing/samples/github-source/service.yaml
``` ```
@ -54,7 +53,7 @@ kubectl --namespace default apply --filename eventing/samples/github-source/serv
Create a [personal access token](https://github.com/settings/tokens) Create a [personal access token](https://github.com/settings/tokens)
for GitHub that the GitHub source can use to register webhooks with for GitHub that the GitHub source can use to register webhooks with
the GitHub API. Also decide on a secret token that your code will use the GitHub API. Also decide on a secret token that your code will use
to authenticate the incoming webhooks from GitHub (*secretToken*). to authenticate the incoming webhooks from GitHub (_secretToken_).
The token can be named anything you find convenient. The Source The token can be named anything you find convenient. The Source
requires `repo:public_repo` and `admin:repo_hook`, to let it fire requires `repo:public_repo` and `admin:repo_hook`, to let it fire
@ -68,7 +67,7 @@ recommended scopes:
![GitHub UI](personal_access_token.png "GitHub personal access token screenshot") ![GitHub UI](personal_access_token.png "GitHub personal access token screenshot")
Update `githubsecret.yaml` with those values. If your generated access Update `githubsecret.yaml` with those values. If your generated access
token is `'personal_access_token_value'` and you choose your *secretToken* token is `'personal_access_token_value'` and you choose your _secretToken_
as `'asdfasfdsaf'`, you'd modify `githubsecret.yaml` like so: as `'asdfasfdsaf'`, you'd modify `githubsecret.yaml` like so:
```yaml ```yaml
@ -82,7 +81,7 @@ stringData:
secretToken: asdfasfdsaf secretToken: asdfasfdsaf
``` ```
Hint: you can makeup a random *secretToken* with: Hint: you can makeup a random _secretToken_ with:
```shell ```shell
head -c 8 /dev/urandom | base64 head -c 8 /dev/urandom | base64
@ -122,7 +121,6 @@ spec:
apiVersion: serving.knative.dev/v1alpha1 apiVersion: serving.knative.dev/v1alpha1
kind: Service kind: Service
name: github-message-dumper name: github-message-dumper
``` ```
Then, apply that yaml using `kubectl`: Then, apply that yaml using `kubectl`:
@ -146,7 +144,6 @@ Create a pull request in your GitHub repository. We will verify
that the GitHub events were sent into the Knative eventing system that the GitHub events were sent into the Knative eventing system
by looking at our message dumper function logs. by looking at our message dumper function logs.
```shell ```shell
kubectl --namespace default get pods kubectl --namespace default get pods
kubectl --namespace default logs github-message-dumper-XXXX user-container kubectl --namespace default logs github-message-dumper-XXXX user-container

View File

@ -10,7 +10,6 @@ consumption by a function that has been implemented as a Knative Service.
1. Setup [Knative Serving](https://github.com/knative/docs/tree/master/serving). 1. Setup [Knative Serving](https://github.com/knative/docs/tree/master/serving).
1. Setup [Knative Eventing](https://github.com/knative/docs/tree/master/eventing). 1. Setup [Knative Eventing](https://github.com/knative/docs/tree/master/eventing).
### Channel ### Channel
1. Create a `Channel`. You can use your own `Channel` or use the provided sample, which creates a channel called `testchannel`. If you use your own `Channel` with a different name, then you will need to alter other commands later. 1. Create a `Channel`. You can use your own `Channel` or use the provided sample, which creates a channel called `testchannel`. If you use your own `Channel` with a different name, then you will need to alter other commands later.
@ -46,7 +45,6 @@ In order to check the `KubernetesEventSource` is fully working, we will create a
kubectl apply -f eventing/samples/kubernetes-event-source/subscription.yaml kubectl apply -f eventing/samples/kubernetes-event-source/subscription.yaml
``` ```
### Create Events ### Create Events
Create events by launching a pod in the default namespace. Create a busybox container Create events by launching a pod in the default namespace. Create a busybox container
@ -61,7 +59,6 @@ Once the shell comes up, just exit it and kill the pod.
kubectl delete pod busybox kubectl delete pod busybox
``` ```
### Verify ### Verify
We will verify that the kubernetes events were sent into the Knative eventing system by looking at our message dumper function logsIf you deployed the [Subscriber](#subscriber), then continue using this section. If not, then you will need to look downstream yourself. We will verify that the kubernetes events were sent into the Knative eventing system by looking at our message dumper function logsIf you deployed the [Subscriber](#subscriber), then continue using this section. If not, then you will need to look downstream yourself.
@ -72,11 +69,10 @@ kubectl logs -l serving.knative.dev/service=message-dumper -c user-container
``` ```
You should see log lines similar to: You should see log lines similar to:
``` ```
{"metadata":{"name":"busybox.15644359eaa4d8e7","namespace":"default","selfLink":"/api/v1/namespaces/default/events/busybox.15644359eaa4d8e7","uid":"daf8d3ca-e10d-11e8-bf3c-42010a8a017d","resourceVersion":"7840","creationTimestamp":"2018-11-05T15:17:05Z"},"involvedObject":{"kind":"Pod","namespace":"default","name":"busybox","uid":"daf645df-e10d-11e8-bf3c-42010a8a017d","apiVersion":"v1","resourceVersion":"681388"},"reason":"Scheduled","message":"Successfully assigned busybox to gke-knative-eventing-e2e-default-pool-575bcad9-vz55","source":{"component":"default-scheduler"},"firstTimestamp":"2018-11-05T15:17:05Z","lastTimestamp":"2018-11-05T15:17:05Z","count":1,"type":"Normal","eventTime":null,"reportingComponent":"","reportingInstance":""} {"metadata":{"name":"busybox.15644359eaa4d8e7","namespace":"default","selfLink":"/api/v1/namespaces/default/events/busybox.15644359eaa4d8e7","uid":"daf8d3ca-e10d-11e8-bf3c-42010a8a017d","resourceVersion":"7840","creationTimestamp":"2018-11-05T15:17:05Z"},"involvedObject":{"kind":"Pod","namespace":"default","name":"busybox","uid":"daf645df-e10d-11e8-bf3c-42010a8a017d","apiVersion":"v1","resourceVersion":"681388"},"reason":"Scheduled","message":"Successfully assigned busybox to gke-knative-eventing-e2e-default-pool-575bcad9-vz55","source":{"component":"default-scheduler"},"firstTimestamp":"2018-11-05T15:17:05Z","lastTimestamp":"2018-11-05T15:17:05Z","count":1,"type":"Normal","eventTime":null,"reportingComponent":"","reportingInstance":""}
Ce-Source: /apis/v1/namespaces/default/pods/busybox Ce-Source: /apis/v1/namespaces/default/pods/busybox
{"metadata":{"name":"busybox.15644359f59f72f2","namespace":"default","selfLink":"/api/v1/namespaces/default/events/busybox.15644359f59f72f2","uid":"db14ff23-e10d-11e8-bf3c-42010a8a017d","resourceVersion":"7841","creationTimestamp":"2018-11-05T15:17:06Z"},"involvedObject":{"kind":"Pod","namespace":"default","name":"busybox","uid":"daf645df-e10d-11e8-bf3c-42010a8a017d","apiVersion":"v1","resourceVersion":"681389"},"reason":"SuccessfulMountVolume","message":"MountVolume.SetUp succeeded for volume \"default-token-pzr6x\" ","source":{"component":"kubelet","host":"gke-knative-eventing-e2e-default-pool-575bcad9-vz55"},"firstTimestamp":"2018-11-05T15:17:06Z","lastTimestamp":"2018-11-05T15:17:06Z","count":1,"type":"Normal","eventTime":null,"reportingComponent":"","reportingInstance":""} {"metadata":{"name":"busybox.15644359f59f72f2","namespace":"default","selfLink":"/api/v1/namespaces/default/events/busybox.15644359f59f72f2","uid":"db14ff23-e10d-11e8-bf3c-42010a8a017d","resourceVersion":"7841","creationTimestamp":"2018-11-05T15:17:06Z"},"involvedObject":{"kind":"Pod","namespace":"default","name":"busybox","uid":"daf645df-e10d-11e8-bf3c-42010a8a017d","apiVersion":"v1","resourceVersion":"681389"},"reason":"SuccessfulMountVolume","message":"MountVolume.SetUp succeeded for volume \"default-token-pzr6x\" ","source":{"component":"kubelet","host":"gke-knative-eventing-e2e-default-pool-575bcad9-vz55"},"firstTimestamp":"2018-11-05T15:17:06Z","lastTimestamp":"2018-11-05T15:17:06Z","count":1,"type":"Normal","eventTime":null,"reportingComponent":"","reportingInstance":""}
Ce-Source: /apis/v1/namespaces/default/pods/busybox Ce-Source: /apis/v1/namespaces/default/pods/busybox
``` ```

View File

@ -62,12 +62,14 @@ First let's identify your Azure subscription and save it for use later.
```bash ```bash
az account list -o table az account list -o table
``` ```
### Create a Resource Group for AKS ### Create a Resource Group for AKS
To simplify the command lines for this walkthrough, we need to define a few 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. 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: 1. Set `RESOURCE_GROUP` and `LOCATION` variables:
```bash ```bash
export LOCATION=eastus export LOCATION=eastus
export RESOURCE_GROUP=knative-group export RESOURCE_GROUP=knative-group
@ -83,21 +85,17 @@ environment variables. First determine which region you'd like to run AKS in, al
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: 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.10 or later - Kubernetes version 1.10 or later
* Three or more nodes - Three or more nodes
* Standard_DS3_v2 nodes - Standard_DS3_v2 nodes
* RBAC enabled - RBAC enabled
1. Enable AKS in your subscription, use the following command with the az cli: 1. Enable AKS in your subscription, use the following command with the az cli:
```bash `bash az provider register -n Microsoft.ContainerService`
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: You should also ensure that the `Microsoft.Compute` and `Microsoft.Network` providers are registered in your subscription. If you need to enable them:
```bash `bash az provider register -n Microsoft.Compute az provider register -n Microsoft.Network`
az provider register -n Microsoft.Compute
az provider register -n Microsoft.Network
```
1. Create the AKS cluster! 1. Create the AKS cluster!
```bash ```bash
az aks create --resource-group $RESOURCE_GROUP \ az aks create --resource-group $RESOURCE_GROUP \
--name $CLUSTER_NAME \ --name $CLUSTER_NAME \
@ -108,6 +106,7 @@ You should also ensure that the `Microsoft.Compute` and `Microsoft.Network` prov
``` ```
1. Configure kubectl to use the new cluster. 1. Configure kubectl to use the new cluster.
```bash ```bash
az aks get-credentials --resource-group $RESOURCE_GROUP --name $CLUSTER_NAME --admin az aks get-credentials --resource-group $RESOURCE_GROUP --name $CLUSTER_NAME --admin
``` ```
@ -126,21 +125,20 @@ Knative depends on Istio.
kubectl apply --filename https://raw.githubusercontent.com/knative/serving/v0.2.1/third_party/istio-1.0.2/istio.yaml kubectl apply --filename https://raw.githubusercontent.com/knative/serving/v0.2.1/third_party/istio-1.0.2/istio.yaml
``` ```
1. Label the default namespace with `istio-injection=enabled`: 1. Label the default namespace with `istio-injection=enabled`:
```bash ```bash
kubectl label namespace default istio-injection=enabled kubectl label namespace default istio-injection=enabled
``` ```
1. Monitor the Istio components until all of the components show a `STATUS` of 1. Monitor the Istio components until all of the components show a `STATUS` of
`Running` or `Completed`: `Running` or `Completed`:
```bash `bash kubectl get pods --namespace istio-system`
kubectl get pods --namespace istio-system
```
It will take a few minutes for all the components to be up and running; you can 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. rerun the command to see the current status.
> Note: Instead of rerunning the command, you can add `--watch` to the above > 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. > command to view the component's status updates in real time. Use CTRL + C to exit watch mode.
## Installing Knative components ## Installing Knative components
@ -170,14 +168,15 @@ You can install the Knative Serving and Build components together, or Build on i
`STATUS` of `Running`: `STATUS` of `Running`:
```bash ```bash
kubectl get pods --namespace knative-build kubectl get pods --namespace knative-build
```
Just as with the Istio components, it will take a few seconds for the Knative 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 `kubectl get` command to see components to be up and running; you can rerun the `kubectl get` command to see
the current status. the current status.
> Note: Instead of rerunning the command, you can add `--watch` to the above > 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 > command to view the component's status updates in real time. Use CTRL + C to
exit watch mode. > exit watch mode.
You are now ready to deploy an app or create a build in your new Knative You are now ready to deploy an app or create a build in your new Knative
cluster. cluster.
@ -188,11 +187,11 @@ Now that your cluster has Knative installed, you're ready to deploy an app.
You have two options for deploying your first app: You have two options for deploying your first app:
* You can follow the step-by-step - You can follow the step-by-step
[Getting Started with Knative App Deployment](getting-started-knative-app.md) [Getting Started with Knative App Deployment](getting-started-knative-app.md)
guide. guide.
* You can view the available [sample apps](../serving/samples/README.md) and - You can view the available [sample apps](../serving/samples/README.md) and
deploy one of your choosing. deploy one of your choosing.
## Cleaning up ## Cleaning up
@ -202,6 +201,7 @@ you're not using it. Deleting the cluster will also remove Knative, Istio,
and any apps you've deployed. and any apps you've deployed.
To delete the cluster, enter the following command: To delete the cluster, enter the following command:
```bash ```bash
az aks delete --resource-group $RESOURCE_GROUP --name $CLUSTER_NAME --yes --no-wait az aks delete --resource-group $RESOURCE_GROUP --name $CLUSTER_NAME --yes --no-wait
``` ```

View File

@ -18,7 +18,9 @@ commands will need to be adjusted for use in a Windows environment.
1. If you already have `gcloud` installed with `kubectl` version 1.10 or newer, 1. If you already have `gcloud` installed with `kubectl` version 1.10 or newer,
you can skip these steps. you can skip these steps.
> Tip: To check which version of `kubectl` you have installed, enter: > Tip: To check which version of `kubectl` you have installed, enter:
``` ```
kubectl version kubectl version
``` ```
@ -64,6 +66,7 @@ You need a Google Cloud Platform (GCP) project to create a Google Kubernetes En
export PROJECT=my-knative-project export PROJECT=my-knative-project
``` ```
1. If you don't have a GCP project, create and set it as your `gcloud` default: 1. If you don't have a GCP project, create and set it as your `gcloud` default:
```bash ```bash
gcloud projects create $PROJECT --set-as-default gcloud projects create $PROJECT --set-as-default
``` ```
@ -72,11 +75,13 @@ You need a Google Cloud Platform (GCP) project to create a Google Kubernetes En
for your new project. for your new project.
1. If you already have a GCP project, make sure your project is set as your `gcloud` default: 1. If you already have a GCP project, make sure your project is set as your `gcloud` default:
```bash ```bash
gcloud config set core/project $PROJECT gcloud config set core/project $PROJECT
``` ```
> Tip: Enter `gcloud config get-value project` to view the ID of your default GCP project. > Tip: Enter `gcloud config get-value project` to view the ID of your default GCP project.
1. Enable the necessary APIs: 1. Enable the necessary APIs:
```bash ```bash
gcloud services enable \ gcloud services enable \
@ -90,10 +95,10 @@ You need a Google Cloud Platform (GCP) project to create a Google Kubernetes En
To make sure the cluster is large enough to host all the Knative and To make sure the cluster is large enough to host all the Knative and
Istio components, the recommended configuration for a cluster is: Istio components, the recommended configuration for a cluster is:
* Kubernetes version 1.10 or later - Kubernetes version 1.10 or later
* 4 vCPU nodes (`n1-standard-4`) - 4 vCPU nodes (`n1-standard-4`)
* Node autoscaling, up to 10 nodes - Node autoscaling, up to 10 nodes
* API scopes for `cloud-platform`, `logging-write`, `monitoring-write`, and - API scopes for `cloud-platform`, `logging-write`, `monitoring-write`, and
`pubsub` (if those features will be used) `pubsub` (if those features will be used)
1. Create a Kubernetes cluster on GKE with the required specifications: 1. Create a Kubernetes cluster on GKE with the required specifications:
@ -131,15 +136,13 @@ Knative depends on Istio.
``` ```
1. Monitor the Istio components until all of the components show a `STATUS` of 1. Monitor the Istio components until all of the components show a `STATUS` of
`Running` or `Completed`: `Running` or `Completed`:
```bash `bash kubectl get pods --namespace istio-system`
kubectl get pods --namespace istio-system
```
It will take a few minutes for all the components to be up and running; you can 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. rerun the command to see the current status.
> Note: Instead of rerunning the command, you can add `--watch` to the above > 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. > command to view the component's status updates in real time. Use CTRL + C to exit watch mode.
## Installing Knative components ## Installing Knative components
@ -169,14 +172,15 @@ You can install the Knative Serving and Build components together, or Build on i
`STATUS` of `Running`: `STATUS` of `Running`:
```bash ```bash
kubectl get pods --namespace knative-build kubectl get pods --namespace knative-build
```
Just as with the Istio components, it will take a few seconds for the Knative 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 `kubectl get` command to see components to be up and running; you can rerun the `kubectl get` command to see
the current status. the current status.
> Note: Instead of rerunning the command, you can add `--watch` to the above > 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 > command to view the component's status updates in real time. Use CTRL + C to
exit watch mode. > exit watch mode.
You are now ready to deploy an app or create a build in your new Knative You are now ready to deploy an app or create a build in your new Knative
cluster. cluster.
@ -189,14 +193,14 @@ create a build.
Depending on which Knative component you have installed, there are a few options Depending on which Knative component you have installed, there are a few options
for getting started: for getting started:
* You can follow the step-by-step - You can follow the step-by-step
[Getting Started with Knative App Deployment](getting-started-knative-app.md) [Getting Started with Knative App Deployment](getting-started-knative-app.md)
guide. guide.
* You can view the available [sample apps](../serving/samples/README.md) and - You can view the available [sample apps](../serving/samples/README.md) and
deploy one of your choosing. deploy one of your choosing.
* You can follow the step-by-step - You can follow the step-by-step
[Creating a simple Knative Build](../build/creating-builds.md) guide. [Creating a simple Knative Build](../build/creating-builds.md) guide.
## Cleaning up ## Cleaning up
@ -217,4 +221,3 @@ Except as otherwise noted, the content of this page is licensed under the
[Creative Commons Attribution 4.0 License](https://creativecommons.org/licenses/by/4.0/), [Creative Commons Attribution 4.0 License](https://creativecommons.org/licenses/by/4.0/),
and code samples are licensed under the and code samples are licensed under the
[Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0). [Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0).

View File

@ -115,14 +115,15 @@ You can install the Knative Serving and Build components together, or Build on i
`STATUS` of `Running`: `STATUS` of `Running`:
```bash ```bash
kubectl get pods --namespace knative-build kubectl get pods --namespace knative-build
```
Just as with the Istio components, it will take a few seconds for the Knative 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 `kubectl get` command to see components to be up and running; you can rerun the `kubectl get` command to see
the current status. the current status.
> Note: Instead of rerunning the command, you can add `--watch` to the above > 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 > command to view the component's status updates in real time. Use CTRL + C to
exit watch mode. > exit watch mode.
You are now ready to deploy an app or create a build in your new Knative You are now ready to deploy an app or create a build in your new Knative
cluster. cluster.

View File

@ -183,14 +183,15 @@ You can install the Knative Serving and Build components together, or Build on i
`STATUS` of `Running`: `STATUS` of `Running`:
```bash ```bash
kubectl get pods --namespace knative-build kubectl get pods --namespace knative-build
```
Just as with the Istio components, it will take a few seconds for the Knative 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 `kubectl get` command to see components to be up and running; you can rerun the `kubectl get` command to see
the current status. the current status.
> Note: Instead of rerunning the command, you can add `--watch` to the above > 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 > command to view the component's status updates in real time. Use CTRL + C to
exit watch mode. > exit watch mode.
You are now ready to deploy an app or create a build in your new Knative You are now ready to deploy an app or create a build in your new Knative
cluster. cluster.

View File

@ -74,7 +74,7 @@ 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. rerun the command to see the current status.
> Note: Instead of rerunning the command, you can add `--watch` to the above > 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. > command to view the component's status updates in real time. Use CTRL+C to exit watch mode.
## Installing Knative Serving ## Installing Knative Serving
@ -102,7 +102,7 @@ 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. 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 > 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. > 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. Now you can deploy an app to your newly created Knative cluster.
@ -119,9 +119,10 @@ 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. 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 > Note: When looking up the IP address to use for accessing your app, you need to look up
the NodePort for the `knative-ingressgateway` as well as the IP address used for Minikube. > the NodePort for the `knative-ingressgateway` as 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 > You can use the following command to look up the value to use for the {IP_ADDRESS} placeholder
used in the samples: > used in the samples:
```shell ```shell
echo $(minikube ip):$(kubectl get svc knative-ingressgateway --namespace istio-system --output 'jsonpath={.spec.ports[?(@.port==80)].nodePort}') echo $(minikube ip):$(kubectl get svc knative-ingressgateway --namespace istio-system --output 'jsonpath={.spec.ports[?(@.port==80)].nodePort}')
``` ```

View File

@ -73,6 +73,7 @@ minishift oc-env
## Preparing Knative Deployment ## Preparing Knative Deployment
### Enable Admission Controller Webhook ### Enable Admission Controller Webhook
To be able to deploy and run serverless Knative applications, its required that you must enable the [Admission Controller Webhook](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/). To be able to deploy and run serverless Knative applications, its required that you must enable the [Admission Controller Webhook](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/).
Run the following command to make OpenShift (run via minishift) to be configured for [Admission Controller Webhook](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/): Run the following command to make OpenShift (run via minishift) to be configured for [Admission Controller Webhook](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/):
@ -115,6 +116,7 @@ until oc login -u admin -p admin; do sleep 5; done;
oc adm policy add-scc-to-user privileged -z default oc adm policy add-scc-to-user privileged -z default
oc label namespace myproject istio-injection=enabled oc label namespace myproject istio-injection=enabled
``` ```
The `oc adm policy` adds the **privileged** [Security Context Constraints(SCCs)](https://docs.okd.io/3.10/admin_guide/manage_scc.html) to the **default** Service Account. The SCCs are the precursor to the PSP (Pod Security Policy) mechanism in Kubernetes, as isito-sidecars required to be run with **privileged** permissions you need set that here. The `oc adm policy` adds the **privileged** [Security Context Constraints(SCCs)](https://docs.okd.io/3.10/admin_guide/manage_scc.html) to the **default** Service Account. The SCCs are the precursor to the PSP (Pod Security Policy) mechanism in Kubernetes, as isito-sidecars required to be run with **privileged** permissions you need set that here.
Its is also ensured that the project myproject is labelled for Istio automatic sidecar injection, with this `istio-injection=enabled` label to **myproject** each of the Knative applications that will be deployed in **myproject** will have Istio sidecars injected automatically. Its is also ensured that the project myproject is labelled for Istio automatic sidecar injection, with this `istio-injection=enabled` label to **myproject** each of the Knative applications that will be deployed in **myproject** will have Istio sidecars injected automatically.
@ -134,16 +136,15 @@ curl -s https://raw.githubusercontent.com/knative/docs/master/install/scripts/is
```shell ```shell
oc apply -f https://storage.googleapis.com/knative-releases/serving/latest/istio.yaml oc apply -f https://storage.googleapis.com/knative-releases/serving/latest/istio.yaml
``` ```
> **NOTE:** If you get a lot of errors after running the above command like: __unable to recognize "STDIN": no matches for kind "Gateway" in version "networking.istio.io/v1alpha3"__, just run the command above again, it's idempotent and hence objects will be created only once.
> **NOTE:** If you get a lot of errors after running the above command like: **unable to recognize "STDIN": no matches for kind "Gateway" in version "networking.istio.io/v1alpha3"**, just run the command above again, it's idempotent and hence objects will be created only once.
2. Ensure the istio-sidecar-injector pods runs as provileged: 2. Ensure the istio-sidecar-injector pods runs as provileged:
```shell ```shell
oc get cm istio-sidecar-injector -n istio-system -oyaml | sed -e 's/securityContext:/securityContext:\\n privileged: true/' | oc replace -f - oc get cm istio-sidecar-injector -n istio-system -oyaml | sed -e 's/securityContext:/securityContext:\\n privileged: true/' | oc replace -f -
``` ```
3. Monitor the Istio components until all of the components show a `STATUS` of `Running` or `Completed`: 3. Monitor the Istio components until all of the components show a `STATUS` of `Running` or `Completed`:
```shell `shell while oc get pods -n istio-system | grep -v -E "(Running|Completed|STATUS)"; do sleep 5; done`
while oc get pods -n istio-system | grep -v -E "(Running|Completed|STATUS)"; do sleep 5; done
```
> **NOTE:** It will take a few minutes for all the components to be up and running. > **NOTE:** It will take a few minutes for all the components to be up and running.
## Install Knative Serving ## Install Knative Serving
@ -157,6 +158,7 @@ curl -s https://raw.githubusercontent.com/knative/docs/master/install/scripts/kn
``` ```
> You can safely ignore the warnings: > You can safely ignore the warnings:
- Warning: ServiceAccount 'build-controller' not found cluster role "cluster-admin" added: "build-controller" - Warning: ServiceAccount 'build-controller' not found cluster role "cluster-admin" added: "build-controller"
- Warning: ServiceAccount 'controller' not found cluster role "cluster-admin" added: "controller" - Warning: ServiceAccount 'controller' not found cluster role "cluster-admin" added: "controller"
@ -172,6 +174,7 @@ curl -s https://raw.githubusercontent.com/knative/docs/master/install/scripts/kn
while oc get pods -n knative-build | grep -v -E "(Running|Completed|STATUS)"; do sleep 5; done while oc get pods -n knative-build | grep -v -E "(Running|Completed|STATUS)"; do sleep 5; done
while oc get pods -n knative-serving | grep -v -E "(Running|Completed|STATUS)"; do sleep 5; done while oc get pods -n knative-serving | grep -v -E "(Running|Completed|STATUS)"; do sleep 5; done
``` ```
The first command watches for all pod status in `knative-build` and the second command will watch for all pod status in `knative-serving`. The first command watches for all pod status in `knative-build` and the second command will watch for all pod status in `knative-serving`.
> **NOTE:** It will take a few minutes for all the components to be up and running. > **NOTE:** It will take a few minutes for all the components to be up and running.
@ -241,6 +244,7 @@ There are two ways to clean up, either deleting the entire minishift profile or
minishift stop minishift stop
minishift profile delete knative minishift profile delete knative
``` ```
--- ---
Except as otherwise noted, the content of this page is licensed under the Except as otherwise noted, the content of this page is licensed under the

View File

@ -131,7 +131,7 @@ 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. rerun the command to see the current status.
> Note: Instead of rerunning the command, you can add `--watch` to the above > 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. > command to view the component's status updates in real time. Use CTRL+C to exit watch mode.
Set `priviledged` to `true` for the `istio-sidecar-injector`: Set `priviledged` to `true` for the `istio-sidecar-injector`:
@ -190,7 +190,7 @@ 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. 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 > 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. > 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. Now you can deploy an app to your newly created Knative cluster.
@ -207,9 +207,9 @@ 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. 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 > Note: When looking up the IP address to use for accessing your app, you need to look up
the NodePort for the `knative-ingressgateway` as well as the IP address used for OpenShift. > the NodePort for the `knative-ingressgateway` as well as the IP address used for OpenShift.
You can use the following command to look up the value to use for the {IP_ADDRESS} placeholder > You can use the following command to look up the value to use for the {IP_ADDRESS} placeholder
used in the samples: > used in the samples:
```shell ```shell
export IP_ADDRESS=$(oc get node -o 'jsonpath={.items[0].status.addresses[0].address}'):$(oc get svc knative-ingressgateway -n istio-system -o 'jsonpath={.spec.ports[?(@.port==80)].nodePort}') export IP_ADDRESS=$(oc get node -o 'jsonpath={.items[0].status.addresses[0].address}'):$(oc get svc knative-ingressgateway -n istio-system -o 'jsonpath={.spec.ports[?(@.port==80)].nodePort}')

View File

@ -27,8 +27,8 @@ To enable privileged mode and create a cluster:
1. Enable privileged mode: 1. Enable privileged mode:
1. Open the Pivotal Container Service tile in PCF Ops Manager. 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: 1. In the plan configuration that you want to use, enable both of the following:
* Enable Privileged Containers - Use with caution - Enable Privileged Containers - Use with caution
* Disable DenyEscalatingExec - Disable DenyEscalatingExec
1. Save your changes. 1. Save your changes.
1. In the PCF Ops Manager, review and then apply 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). 1. [Create a cluster](https://docs.pivotal.io/runtimes/pks/1-1/create-cluster.html).
@ -51,15 +51,13 @@ Knative depends on Istio. Istio workloads require privileged mode for Init Conta
``` ```
1. Monitor the Istio components until all of the components show a `STATUS` of 1. Monitor the Istio components until all of the components show a `STATUS` of
`Running` or `Completed`: `Running` or `Completed`:
```bash `bash kubectl get pods --namespace istio-system`
kubectl get pods --namespace istio-system
```
It will take a few minutes for all the components to be up and running; you can 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. rerun the command to see the current status.
> Note: Instead of rerunning the command, you can add `--watch` to the above > 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. > command to view the component's status updates in real time. Use CTRL + C to exit watch mode.
## Installing Knative components ## Installing Knative components
@ -89,14 +87,15 @@ You can install the Knative Serving and Build components together, or Build on i
`STATUS` of `Running`: `STATUS` of `Running`:
```bash ```bash
kubectl get pods --namespace knative-build kubectl get pods --namespace knative-build
```
Just as with the Istio components, it will take a few seconds for the Knative 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 `kubectl get` command to see components to be up and running; you can rerun the `kubectl get` command to see
the current status. the current status.
> Note: Instead of rerunning the command, you can add `--watch` to the above > 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 > command to view the component's status updates in real time. Use CTRL + C to
exit watch mode. > exit watch mode.
You are now ready to deploy an app or create a build in your new Knative You are now ready to deploy an app or create a build in your new Knative
cluster. cluster.
@ -107,11 +106,11 @@ Now that your cluster has Knative installed, you're ready to deploy an app.
You have two options for deploying your first app: You have two options for deploying your first app:
* You can follow the step-by-step - You can follow the step-by-step
[Getting Started with Knative App Deployment](getting-started-knative-app.md) [Getting Started with Knative App Deployment](getting-started-knative-app.md)
guide. guide.
* You can view the available [sample apps](../serving/samples/README.md) and - You can view the available [sample apps](../serving/samples/README.md) and
deploy one of your choosing. deploy one of your choosing.
## Cleaning up ## Cleaning up

View File

@ -67,14 +67,15 @@ You can install the Knative Serving and Build components together, or Build on i
`STATUS` of `Running`: `STATUS` of `Running`:
```bash ```bash
kubectl get pods --namespace knative-build kubectl get pods --namespace knative-build
```
Just as with the Istio components, it will take a few seconds for the Knative 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 `kubectl get` command to see components to be up and running; you can rerun the `kubectl get` command to see
the current status. the current status.
> Note: Instead of rerunning the command, you can add `--watch` to the above > 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 > command to view the component's status updates in real time. Use CTRL + C to
exit watch mode. > exit watch mode.
You are now ready to deploy an app or create a build in your new Knative You are now ready to deploy an app or create a build in your new Knative
cluster. cluster.

View File

@ -16,29 +16,29 @@ We provide information for installing Knative on
Follow these step-by-step guides for setting up Kubernetes and installing Follow these step-by-step guides for setting up Kubernetes and installing
Knative components on the following platforms: Knative components on the following platforms:
* [Knative Install on Azure Kubernetes Service](Knative-with-AKS.md) - [Knative Install on Azure Kubernetes Service](Knative-with-AKS.md)
* [Knative Install on Gardener](Knative-with-Gardener.md) - [Knative Install on Gardener](Knative-with-Gardener.md)
* [Knative Install on Google Kubernetes Engine](Knative-with-GKE.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 Kubernetes Service](Knative-with-IKS.md)
* [Knative Install on Minikube](Knative-with-Minikube.md) - [Knative Install on Minikube](Knative-with-Minikube.md)
* [Knative Install on OpenShift](Knative-with-OpenShift.md) - [Knative Install on OpenShift](Knative-with-OpenShift.md)
* [Knative Install on Minishift](Knative-with-Minishift.md) - [Knative Install on Minishift](Knative-with-Minishift.md)
* [Knative Install on Pivotal Container Service](Knative-with-PKS.md) - [Knative Install on Pivotal Container Service](Knative-with-PKS.md)
If you already have a Kubernetes cluster you're comfortable installing If you already have a Kubernetes cluster you're comfortable installing
*alpha* software on, use the following instructions: _alpha_ software on, use the following instructions:
* [Knative Install on any Kubernetes](Knative-with-any-k8s.md) - [Knative Install on any Kubernetes](Knative-with-any-k8s.md)
## Deploying an app ## Deploying an app
Now you're ready to deploy an app: Now you're ready to deploy an app:
* Follow the step-by-step - Follow the step-by-step
[Getting Started with Knative App Deployment](getting-started-knative-app.md) [Getting Started with Knative App Deployment](getting-started-knative-app.md)
guide. guide.
* View the available [sample apps](../serving/samples) and deploy one of your - View the available [sample apps](../serving/samples) and deploy one of your
choosing. choosing.
## Configuring Knative Serving ## Configuring Knative Serving
@ -47,14 +47,14 @@ 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 a static IP address to be able to use Knative for publicly available services
and set up an Istio IP range for outbound network access: and set up an Istio IP range for outbound network access:
* [Assign a static IP address](../serving/gke-assigning-static-ip-address.md) - [Assign a static IP address](../serving/gke-assigning-static-ip-address.md)
* [Configure a custom domain](../serving/using-a-custom-domain.md) - [Configure a custom domain](../serving/using-a-custom-domain.md)
* [Configure outbound network access](../serving/outbound-network-access.md) - [Configure outbound network access](../serving/outbound-network-access.md)
* [Configuring HTTPS with a custom certificate](../serving/using-an-ssl-cert.md) - [Configuring HTTPS with a custom certificate](../serving/using-an-ssl-cert.md)
## Checking the version of your Knative Serving installation ## Checking the version of your Knative Serving installation
* [Checking the version of your Knative Serving installation](check-install-version.md) - [Checking the version of your Knative Serving installation](check-install-version.md)
--- ---

View File

@ -11,7 +11,8 @@ This will return the description for the `knative-serving` controller; this
information contains the link to the container that was used to install Knative: information contains the link to the container that was used to install Knative:
```yaml ```yaml
...
---
Pod Template: Pod Template:
Labels: app=controller Labels: app=controller
Annotations: sidecar.istio.io/inject=false Annotations: sidecar.istio.io/inject=false
@ -20,7 +21,6 @@ Pod Template:
controller: controller:
# Link to container used for Knative install # Link to container used for Knative install
Image: gcr.io/knative-releases/github.com/knative/serving/cmd/controller@sha256:59abc8765d4396a3fc7cac27a932a9cc151ee66343fa5338fb7146b607c6e306 Image: gcr.io/knative-releases/github.com/knative/serving/cmd/controller@sha256:59abc8765d4396a3fc7cac27a932a9cc151ee66343fa5338fb7146b607c6e306
...
``` ```
Copy the full `gcr.io` link to the container and paste it into your browser. Copy the full `gcr.io` link to the container and paste it into your browser.

View File

@ -6,8 +6,9 @@ using cURL requests.
## Before you begin ## Before you begin
You need: You need:
* A Kubernetes cluster with [Knative installed](./README.md).
* An image of the app that you'd like to deploy available on a - A Kubernetes cluster with [Knative installed](./README.md).
- An image of the app that you'd like to deploy available on a
container registry. The image of the sample app used in container registry. The image of the sample app used in
this guide is available on Google Container Registry. this guide is available on Google Container Registry.
@ -19,7 +20,7 @@ the basic workflow for deploying an app, but these steps can be adapted for your
own application if you have an image of it available on [Docker Hub](https://docs.docker.com/docker-hub/repos/), [Google Container Registry](https://cloud.google.com/container-registry/docs/pushing-and-pulling), or another container image registry. own application if you have an image of it available on [Docker Hub](https://docs.docker.com/docker-hub/repos/), [Google Container Registry](https://cloud.google.com/container-registry/docs/pushing-and-pulling), or another container image registry.
The Hello World sample app reads in an `env` variable, `TARGET`, from the The Hello World sample app reads in an `env` variable, `TARGET`, from the
configuration `.yaml` file, then prints "Hello World: ${TARGET}!". If `TARGET` configuration `.yaml` file, then prints "Hello World: \${TARGET}!". If `TARGET`
isn't defined, it will print "NOT SPECIFIED". isn't defined, it will print "NOT SPECIFIED".
## Configuring your deployment ## Configuring your deployment
@ -61,15 +62,17 @@ the image accordingly.
## Deploying your app ## Deploying your app
From the directory where the new `service.yaml` file was created, apply the configuration: From the directory where the new `service.yaml` file was created, apply the configuration:
```bash ```bash
kubectl apply --filename service.yaml kubectl apply --filename service.yaml
``` ```
Now that your service is created, Knative will perform the following steps: Now that your service is created, Knative will perform the following steps:
* Create a new immutable revision for this version of the app.
* Perform network programming to create a route, ingress, service, and load - Create a new immutable revision for this version of the app.
- Perform network programming to create a route, ingress, service, and load
balancer for your app. balancer for your app.
* Automatically scale your pods up and down based on traffic, including to - Automatically scale your pods up and down based on traffic, including to
zero active pods. zero active pods.
### Interacting with your app ### Interacting with your app
@ -89,6 +92,7 @@ asssigned an external IP address.
knative-ingressgateway LoadBalancer 10.23.247.74 35.203.155.229 80:32380/TCP,443:32390/TCP,32400:32400/TCP 2d knative-ingressgateway LoadBalancer 10.23.247.74 35.203.155.229 80:32380/TCP,443:32390/TCP,32400:32400/TCP 2d
``` ```
Take note of the `EXTERNAL-IP` address. Take note of the `EXTERNAL-IP` address.
You can also export the IP address as a variable with the following command: You can also export the IP address as a variable with the following command:
@ -97,9 +101,11 @@ asssigned an external IP address.
export IP_ADDRESS=$(kubectl get svc knative-ingressgateway --namespace istio-system --output 'jsonpath={.status.loadBalancer.ingress[0].ip}') export IP_ADDRESS=$(kubectl get svc knative-ingressgateway --namespace istio-system --output 'jsonpath={.status.loadBalancer.ingress[0].ip}')
``` ```
> Note: if you use minikube or a baremetal cluster that has no external load balancer, the > Note: if you use minikube or a baremetal cluster that has no external load balancer, the
`EXTERNAL-IP` field is shown as `<pending>`. You need to use `NodeIP` and `NodePort` to > `EXTERNAL-IP` field is shown as `<pending>`. You need to use `NodeIP` and `NodePort` to
interact your app instead. To get your app's `NodeIP` and `NodePort`, enter the following command: > interact your app instead. To get your app's `NodeIP` and `NodePort`, enter the following command:
```shell ```shell
export IP_ADDRESS=$(kubectl get node --output 'jsonpath={.items[0].status.addresses[0].address}'):$(kubectl get svc knative-ingressgateway --namespace istio-system --output 'jsonpath={.spec.ports[?(@.port==80)].nodePort}') export IP_ADDRESS=$(kubectl get node --output 'jsonpath={.items[0].status.addresses[0].address}'):$(kubectl get svc knative-ingressgateway --namespace istio-system --output 'jsonpath={.spec.ports[?(@.port==80)].nodePort}')
``` ```

View File

@ -78,9 +78,7 @@ packages by their [import paths](https://golang.org/doc/code.html#ImportPaths)
(e.g., `github.com/kaniko/serving/cmd/controller`) (e.g., `github.com/kaniko/serving/cmd/controller`)
The typical usage is `ko apply -f config.yaml`, which reads in the config YAML, The typical usage is `ko apply -f config.yaml`, which reads in the config YAML,
and looks for Go import paths representing runnable commands (i.e., `package and looks for Go import paths representing runnable commands (i.e., `package main`). When it finds a matching import path, `ko` builds the package using `go build` then pushes a container image containing that binary on top of a base
main`). When it finds a matching import path, `ko` builds the package using `go
build` then pushes a container image containing that binary on top of a base
image (by default, `gcr.io/distroless/base`) to image (by default, `gcr.io/distroless/base`) to
`$KO_DOCKER_REPO/unique-string`. After pushing those images, `ko` replaces `$KO_DOCKER_REPO/unique-string`. After pushing those images, `ko` replaces
instances of matched import paths with fully-qualified references to the images instances of matched import paths with fully-qualified references to the images
@ -89,17 +87,17 @@ it pushed.
So if `ko apply` was passed this config: So if `ko apply` was passed this config:
```yaml ```yaml
...
---
image: github.com/my/repo/cmd/foo image: github.com/my/repo/cmd/foo
...
``` ```
...it would produce YAML like: ...it would produce YAML like:
```yaml ```yaml
...
---
image: gcr.io/my-docker-repo/foo-zyxwvut@sha256:abcdef # image by digest image: gcr.io/my-docker-repo/foo-zyxwvut@sha256:abcdef # image by digest
...
``` ```
(This assumes that you have set the environment variable (This assumes that you have set the environment variable
@ -108,10 +106,11 @@ image: gcr.io/my-docker-repo/foo-zyxwvut@sha256:abcdef # image by digest
`ko apply` then passes this generated YAML config to `kubectl apply`. `ko apply` then passes this generated YAML config to `kubectl apply`.
`ko` also supports: `ko` also supports:
* `ko publish` to simply push images and not produce configs.
* `ko resolve` to push images and output the generated configs, but not - `ko publish` to simply push images and not produce configs.
- `ko resolve` to push images and output the generated configs, but not
`kubectl apply` them. `kubectl apply` them.
* `ko delete` to simply passthrough to `kubectl delete` for convenience. - `ko delete` to simply passthrough to `kubectl delete` for convenience.
`ko` is used during development and release of Knative components, but is not `ko` is used during development and release of Knative components, but is not
intended to be required for _users_ of Knative -- they should only need to intended to be required for _users_ of Knative -- they should only need to
@ -122,8 +121,7 @@ intended to be required for _users_ of Knative -- they should only need to
`skaffold` is a CLI tool to aid in iterative development for Kubernetes. `skaffold` is a CLI tool to aid in iterative development for Kubernetes.
Typically, you would write a [YAML Typically, you would write a [YAML
config](https://github.com/GoogleContainerTools/skaffold/blob/master/examples/annotated-skaffold.yaml) config](https://github.com/GoogleContainerTools/skaffold/blob/master/examples/annotated-skaffold.yaml)
describing to Skaffold how to build and deploy your app, then run `skaffold describing to Skaffold how to build and deploy your app, then run `skaffold dev`, which will watch your local source tree for changes and continuously
dev`, which will watch your local source tree for changes and continuously
builds and deploys based on your config when changes are detected. builds and deploys based on your config when changes are detected.
Skaffold supports many pluggable implementations for building and deploying. Skaffold supports many pluggable implementations for building and deploying.

View File

@ -1,4 +1,3 @@
# Knative Serving # Knative Serving
Knative Serving builds on Kubernetes and Istio to support deploying and serving Knative Serving builds on Kubernetes and Istio to support deploying and serving
@ -7,10 +6,10 @@ and scales to support advanced scenarios.
The Knative Serving project provides middleware primitives that enable: The Knative Serving project provides middleware primitives that enable:
* Rapid deployment of serverless containers - Rapid deployment of serverless containers
* Automatic scaling up and down to zero - Automatic scaling up and down to zero
* Routing and network programming for Istio components - Routing and network programming for Istio components
* Point-in-time snapshots of deployed code and configurations - Point-in-time snapshots of deployed code and configurations
## Serving resources ## Serving resources
@ -18,22 +17,22 @@ Knative Serving defines a set of objects as Kubernetes
Custom Resource Definitions (CRDs). These objects are used to define and control Custom Resource Definitions (CRDs). These objects are used to define and control
how your serverless workload behaves on the cluster: how your serverless workload behaves on the cluster:
* [Service](https://github.com/knative/serving/blob/master/docs/spec/spec.md#service): - [Service](https://github.com/knative/serving/blob/master/docs/spec/spec.md#service):
The `service.serving.knative.dev` resource automatically manages the whole The `service.serving.knative.dev` resource automatically manages the whole
lifecycle of your workload. It controls the creation of other lifecycle of your workload. It controls the creation of other
objects to ensure that your app has a route, a configuration, and a new revision objects to ensure that your app has a route, a configuration, and a new revision
for each update of the service. Service can be defined to always route traffic to the for each update of the service. Service can be defined to always route traffic to the
latest revision or to a pinned revision. latest revision or to a pinned revision.
* [Route](https://github.com/knative/serving/blob/master/docs/spec/spec.md#route): - [Route](https://github.com/knative/serving/blob/master/docs/spec/spec.md#route):
The `route.serving.knative.dev` resource maps a network endpoint to a one or The `route.serving.knative.dev` resource maps a network endpoint to a one or
more revisions. You can manage the traffic in several ways, including fractional more revisions. You can manage the traffic in several ways, including fractional
traffic and named routes. traffic and named routes.
* [Configuration](https://github.com/knative/serving/blob/master/docs/spec/spec.md#configuration): - [Configuration](https://github.com/knative/serving/blob/master/docs/spec/spec.md#configuration):
The `configuration.serving.knative.dev` resource maintains The `configuration.serving.knative.dev` resource maintains
the desired state for your deployment. It provides a clean separation between the desired state for your deployment. It provides a clean separation between
code and configuration and follows the Twelve-Factor App methodology. Modifying a configuration code and configuration and follows the Twelve-Factor App methodology. Modifying a configuration
creates a new revision. creates a new revision.
* [Revision](https://github.com/knative/serving/blob/master/docs/spec/spec.md#revision): - [Revision](https://github.com/knative/serving/blob/master/docs/spec/spec.md#revision):
The `revision.serving.knative.dev` resource is a point-in-time snapshot The `revision.serving.knative.dev` resource is a point-in-time snapshot
of the code and configuration for each modification made to the workload. Revisions of the code and configuration for each modification made to the workload. Revisions
are immutable objects and can be retained for as long as useful. are immutable objects and can be retained for as long as useful.
@ -55,29 +54,29 @@ in the Knative Serving repository.
## More samples and demos ## More samples and demos
* [Autoscaling with Knative Serving](./samples/autoscale-go/README.md) - [Autoscaling with Knative Serving](./samples/autoscale-go/README.md)
* [Source-to-URL with Knative Serving](./samples/source-to-url-go/README.md) - [Source-to-URL with Knative Serving](./samples/source-to-url-go/README.md)
* [Telemetry with Knative Serving](./samples/telemetry-go/README.md) - [Telemetry with Knative Serving](./samples/telemetry-go/README.md)
* [REST API sample](./samples/rest-api-go/README.md) - [REST API sample](./samples/rest-api-go/README.md)
## Setting up Logging and Metrics ## Setting up Logging and Metrics
* [Installing Logging, Metrics and Traces](./installing-logging-metrics-traces.md) - [Installing Logging, Metrics and Traces](./installing-logging-metrics-traces.md)
* [Accessing Logs](./accessing-logs.md) - [Accessing Logs](./accessing-logs.md)
* [Accessing Metrics](./accessing-metrics.md) - [Accessing Metrics](./accessing-metrics.md)
* [Accessing Traces](./accessing-traces.md) - [Accessing Traces](./accessing-traces.md)
* [Setting up a logging plugin](./setting-up-a-logging-plugin.md) - [Setting up a logging plugin](./setting-up-a-logging-plugin.md)
## Debugging Knative Serving issues ## Debugging Knative Serving issues
* [Debugging Application Issues](./debugging-application-issues.md) - [Debugging Application Issues](./debugging-application-issues.md)
* [Debugging Performance Issues](./debugging-performance-issues.md) - [Debugging Performance Issues](./debugging-performance-issues.md)
## Configuration and Networking ## Configuration and Networking
* [Configuring outbound network access](./outbound-network-access.md) - [Configuring outbound network access](./outbound-network-access.md)
* [Using a custom domain](./using-a-custom-domain.md) - [Using a custom domain](./using-a-custom-domain.md)
* [Assigning a static IP address for Knative on Google Kubernetes Engine](./gke-assigning-static-ip-address.md) - [Assigning a static IP address for Knative on Google Kubernetes Engine](./gke-assigning-static-ip-address.md)
## Known Issues ## Known Issues

View File

@ -6,8 +6,9 @@ necessary components first.
## Kibana and Elasticsearch ## Kibana and Elasticsearch
* To open the Kibana UI (the visualization tool for [Elasticsearch](https://info.elastic.co)), - To open the Kibana UI (the visualization tool for [Elasticsearch](https://info.elastic.co)),
start a local proxy with the following command: start a local proxy with the following command:
```shell ```shell
kubectl proxy kubectl proxy
``` ```
@ -15,9 +16,9 @@ start a local proxy with the following command:
This command starts a local proxy of Kibana on port 8001. For security reasons, This command starts a local proxy of Kibana on port 8001. For security reasons,
the Kibana UI is exposed only within the cluster. the Kibana UI is exposed only within the cluster.
* Navigate to the - Navigate to the
[Kibana UI](http://localhost:8001/api/v1/namespaces/knative-monitoring/services/kibana-logging/proxy/app/kibana). [Kibana UI](http://localhost:8001/api/v1/namespaces/knative-monitoring/services/kibana-logging/proxy/app/kibana).
*It might take a couple of minutes for the proxy to work*. _It might take a couple of minutes for the proxy to work_.
The Discover tab of the Kibana UI looks like this: The Discover tab of the Kibana UI looks like this:
@ -26,7 +27,7 @@ start a local proxy with the following command:
You can change the time frame of logs Kibana displays in the upper right corner You can change the time frame of logs Kibana displays in the upper right corner
of the screen. The main search bar is across the top of the Discover page. of the screen. The main search bar is across the top of the Discover page.
* As more logs are ingested, new fields will be discovered. To have them indexed, - As more logs are ingested, new fields will be discovered. To have them indexed,
go to "Management" > "Index Patterns" > Refresh button (on top right) > "Refresh go to "Management" > "Index Patterns" > Refresh button (on top right) > "Refresh
fields". fields".
@ -36,23 +37,28 @@ fields".
To access the logs for a configuration: To access the logs for a configuration:
* Find the configuration's name with the following command: - Find the configuration's name with the following command:
``` ```
kubectl get configurations kubectl get configurations
``` ```
* Replace `<CONFIGURATION_NAME>` and enter the following search query in Kibana: - Replace `<CONFIGURATION_NAME>` and enter the following search query in Kibana:
``` ```
kubernetes.labels.serving_knative_dev\/configuration: <CONFIGURATION_NAME> kubernetes.labels.serving_knative_dev\/configuration: <CONFIGURATION_NAME>
``` ```
To access logs for a revision: To access logs for a revision:
* Find the revision's name with the following command:
- Find the revision's name with the following command:
``` ```
kubectl get revisions kubectl get revisions
``` ```
* Replace `<REVISION_NAME>` and enter the following search query in Kibana: - Replace `<REVISION_NAME>` and enter the following search query in Kibana:
``` ```
kubernetes.labels.serving_knative_dev\/revision: <REVISION_NAME> kubernetes.labels.serving_knative_dev\/revision: <REVISION_NAME>
``` ```
@ -61,19 +67,23 @@ kubernetes.labels.serving_knative_dev\/revision: <REVISION_NAME>
To access logs for a [Knative Build](../build/README.md): To access logs for a [Knative Build](../build/README.md):
* Find the build's name in the specified in the `.yaml` file: - Find the build's name in the specified in the `.yaml` file:
```yaml ```yaml
apiVersion: build.knative.dev/v1alpha1 apiVersion: build.knative.dev/v1alpha1
kind: Build kind: Build
metadata: metadata:
name: <BUILD_NAME> name: <BUILD_NAME>
``` ```
Or find build names with the following command: Or find build names with the following command:
``` ```
kubectl get builds kubectl get builds
``` ```
* Replace `<BUILD_NAME>` and enter the following search query in Kibana: - Replace `<BUILD_NAME>` and enter the following search query in Kibana:
``` ```
kubernetes.labels.build\-name: <BUILD_NAME> kubernetes.labels.build\-name: <BUILD_NAME>
``` ```

View File

@ -4,11 +4,12 @@ You access metrics through the [Grafana](https://grafana.com/) UI. Grafana is
the visualization tool for [Prometheus](https://prometheus.io/). the visualization tool for [Prometheus](https://prometheus.io/).
1. To open Grafana, enter the following command: 1. To open Grafana, enter the following command:
``` ```
kubectl port-forward --namespace knative-monitoring $(kubectl get pods --namespace knative-monitoring --selector=app=grafana --output=jsonpath="{.items..metadata.name}") 3000 kubectl port-forward --namespace knative-monitoring $(kubectl get pods --namespace knative-monitoring --selector=app=grafana --output=jsonpath="{.items..metadata.name}") 3000
``` ```
* This starts a local proxy of Grafana on port 3000. For security reasons, the Grafana UI is exposed only within the cluster. - This starts a local proxy of Grafana on port 3000. For security reasons, the Grafana UI is exposed only within the cluster.
2. Navigate to the Grafana UI at [http://localhost:3000](http://localhost:3000). 2. Navigate to the Grafana UI at [http://localhost:3000](http://localhost:3000).
@ -17,15 +18,16 @@ kubectl port-forward --namespace knative-monitoring $(kubectl get pods --namespa
The following dashboards are pre-installed with Knative Serving: The following dashboards are pre-installed with Knative Serving:
* **Revision HTTP Requests:** HTTP request count, latency, and size metrics per revision and per configuration - **Revision HTTP Requests:** HTTP request count, latency, and size metrics per revision and per configuration
* **Nodes:** CPU, memory, network, and disk metrics at node level - **Nodes:** CPU, memory, network, and disk metrics at node level
* **Pods:** CPU, memory, and network metrics at pod level - **Pods:** CPU, memory, and network metrics at pod level
* **Deployment:** CPU, memory, and network metrics aggregated at deployment level - **Deployment:** CPU, memory, and network metrics aggregated at deployment level
* **Istio, Mixer and Pilot:** Detailed Istio mesh, Mixer, and Pilot metrics - **Istio, Mixer and Pilot:** Detailed Istio mesh, Mixer, and Pilot metrics
* **Kubernetes:** Dashboards giving insights into cluster health, deployments, and capacity usage - **Kubernetes:** Dashboards giving insights into cluster health, deployments, and capacity usage
4. Set up an administrator account to modify or add dashboards by signing in with username: `admin` and password: `admin`. 4. Set up an administrator account to modify or add dashboards by signing in with username: `admin` and password: `admin`.
* Before you expose the Grafana UI outside the cluster, make sure to change the password.
- Before you expose the Grafana UI outside the cluster, make sure to change the password.
--- ---

View File

@ -71,16 +71,16 @@ conditions:
If you see this condition, check the following to continue debugging: If you see this condition, check the following to continue debugging:
* [Check Pod status](#check-pod-status) - [Check Pod status](#check-pod-status)
* [Check application logs](#check-application-logs) - [Check application logs](#check-application-logs)
If you see other conditions, to debug further: If you see other conditions, to debug further:
* Look up the meaning of the conditions in Knative - Look up the meaning of the conditions in Knative
[Error Conditions and Reporting](https://github.com/knative/serving/blob/master/docs/spec/errors.md). Note: some of them [Error Conditions and Reporting](https://github.com/knative/serving/blob/master/docs/spec/errors.md). Note: some of them
are not implemented yet. An alternative is to are not implemented yet. An alternative is to
[check Pod status](#check-pod-status). [check Pod status](#check-pod-status).
* If you are using `BUILD` to deploy and the `BuildComplete` condition is not - If you are using `BUILD` to deploy and the `BuildComplete` condition is not
`True`, [check BUILD status](#check-build-status). `True`, [check BUILD status](#check-build-status).
## Check Pod status ## Check Pod status
@ -124,9 +124,9 @@ Use any of the following filters within Kibana UI to
see build logs. _(See [telemetry guide](../telemetry.md) for more information on see build logs. _(See [telemetry guide](../telemetry.md) for more information on
logging and monitoring features of Knative Serving.)_ logging and monitoring features of Knative Serving.)_
* All build logs: `_exists_:"kubernetes.labels.build-name"` - All build logs: `_exists_:"kubernetes.labels.build-name"`
* Build logs for a specific build: `kubernetes.labels.build-name:"<BUILD NAME>"` - Build logs for a specific build: `kubernetes.labels.build-name:"<BUILD NAME>"`
* Build logs for a specific build and step: `kubernetes.labels.build-name:"<BUILD NAME>" AND kubernetes.container_name:"build-step-<BUILD STEP NAME>"` - Build logs for a specific build and step: `kubernetes.labels.build-name:"<BUILD NAME>" AND kubernetes.container_name:"build-step-<BUILD STEP NAME>"`
--- ---

View File

@ -19,11 +19,11 @@ Start your investigation with the "Revision - HTTP Requests" dashboard.
This dashboard gives visibility into the following for each revision: This dashboard gives visibility into the following for each revision:
* Request volume - Request volume
* Request volume per HTTP response code - Request volume per HTTP response code
* Response time - Response time
* Response time per HTTP response code - Response time per HTTP response code
* Request and response sizes - Request and response sizes
This dashboard can show traffic volume or latency discrepancies between different revisions. This dashboard can show traffic volume or latency discrepancies between different revisions.
If, for example, a revision's latency is higher than others revisions, then If, for example, a revision's latency is higher than others revisions, then
@ -65,10 +65,10 @@ that most of the time is spent in your own code, look at autoscaler metrics next
This view shows 4 key metrics from the Knative Serving autoscaler: This view shows 4 key metrics from the Knative Serving autoscaler:
* Actual pod count: # of pods that are running a given revision - Actual pod count: # of pods that are running a given revision
* Desired pod count: # of pods that autoscaler thinks should serve the revision - Desired pod count: # of pods that autoscaler thinks should serve the revision
* Requested pod count: # of pods that the autoscaler requested from Kubernetes - Requested pod count: # of pods that the autoscaler requested from Kubernetes
* Panic mode: If 0, the autoscaler is operating in [stable mode](https://github.com/knative/serving/blob/master/docs/scaling/DEVELOPMENT.md#stable-mode). - Panic mode: If 0, the autoscaler is operating in [stable mode](https://github.com/knative/serving/blob/master/docs/scaling/DEVELOPMENT.md#stable-mode).
If 1, the autoscaler is operating in [panic mode](https://github.com/knative/serving/blob/master/docs/scaling/DEVELOPMENT.md#panic-mode). If 1, the autoscaler is operating in [panic mode](https://github.com/knative/serving/blob/master/docs/scaling/DEVELOPMENT.md#panic-mode).
A large gap between the actual pod count and the requested pod count A large gap between the actual pod count and the requested pod count
@ -94,12 +94,12 @@ The first chart shows rate of the CPU usage across all pods serving the revision
The second chart shows total memory consumed across all pods serving the revision. The second chart shows total memory consumed across all pods serving the revision.
Both of these metrics are further divided into per container usage. Both of these metrics are further divided into per container usage.
* user-container: This container runs the user code (application, function, or container). - user-container: This container runs the user code (application, function, or container).
* [istio-proxy](https://github.com/istio/proxy): Sidecar container to form an - [istio-proxy](https://github.com/istio/proxy): Sidecar container to form an
[Istio](https://istio.io/docs/concepts/what-is-istio/overview.html) mesh. [Istio](https://istio.io/docs/concepts/what-is-istio/overview.html) mesh.
* queue-proxy: Knative Serving owned sidecar container to enforce request concurrency limits. - queue-proxy: Knative Serving owned sidecar container to enforce request concurrency limits.
* autoscaler: Knative Serving owned sidecar container to provide autoscaling for the revision. - autoscaler: Knative Serving owned sidecar container to provide autoscaling for the revision.
* fluentd-proxy: Sidecar container to collect logs from /var/log. - fluentd-proxy: Sidecar container to collect logs from /var/log.
## Profiling ## Profiling

View File

@ -9,12 +9,12 @@ configuration to define logging output.
Knative requires the customized Fluentd docker image with the following plugins Knative requires the customized Fluentd docker image with the following plugins
installed: installed:
* [fluentd](https://github.com/fluent/fluentd) >= v0.14.0 - [fluentd](https://github.com/fluent/fluentd) >= v0.14.0
* [fluent-plugin-kubernetes_metadata_filter](https://github.com/fabric8io/fluent-plugin-kubernetes_metadata_filter) >= - [fluent-plugin-kubernetes_metadata_filter](https://github.com/fabric8io/fluent-plugin-kubernetes_metadata_filter) >=
1.0.0 AND < 2.1.0: To enrich log entries with Kubernetes metadata. 1.0.0 AND < 2.1.0: To enrich log entries with Kubernetes metadata.
* [fluent-plugin-detect-exceptions](https://github.com/GoogleCloudPlatform/fluent-plugin-detect-exceptions) >= - [fluent-plugin-detect-exceptions](https://github.com/GoogleCloudPlatform/fluent-plugin-detect-exceptions) >=
0.0.9: To combine multi-line exception stack traces logs into one log entry. 0.0.9: To combine multi-line exception stack traces logs into one log entry.
* [fluent-plugin-multi-format-parser](https://github.com/repeatedly/fluent-plugin-multi-format-parser) >= - [fluent-plugin-multi-format-parser](https://github.com/repeatedly/fluent-plugin-multi-format-parser) >=
1.0.0: To detect log format as Json or plain text. 1.0.0: To detect log format as Json or plain text.
## Sample images ## Sample images

View File

@ -18,6 +18,7 @@ You can reserve a regional static IP address using the Google Cloud SDK or the
Google Cloud Platform console. Google Cloud Platform console.
Using the Google Cloud SDK: Using the Google Cloud SDK:
1. Enter the following command, replacing IP_NAME and REGION with appropriate 1. Enter the following command, replacing IP_NAME and REGION with appropriate
values. For example, select the `us-west1` region if you deployed your values. For example, select the `us-west1` region if you deployed your
cluster to the `us-west1-c` zone: cluster to the `us-west1-c` zone:
@ -34,20 +35,22 @@ Using the Google Cloud SDK:
``` ```
In the [GCP console](https://console.cloud.google.com/networking/addresses/add?_ga=2.97521754.-475089713.1523374982): In the [GCP console](https://console.cloud.google.com/networking/addresses/add?_ga=2.97521754.-475089713.1523374982):
1. Enter a name for your static address. 1. Enter a name for your static address.
1. For **IP version**, choose IPv4. 1. For **IP version**, choose IPv4.
1. For **Type**, choose **Regional**. 1. For **Type**, choose **Regional**.
1. From the **Region** drop-down, choose the region where your Knative cluster is running. 1. From the **Region** drop-down, choose the region where your Knative cluster is running.
For example, select the `us-west1` region if you deployed your cluster to the `us-west1-c` zone. For example, select the `us-west1` region if you deployed your cluster to the `us-west1-c` zone.
1. Leave the **Attached To** field set to `None` since we'll attach the IP address through a config-map later. 1. Leave the **Attached To** field set to `None` since we'll attach the IP address through a config-map later.
1. Copy the **External Address** of the static IP you created. 1. Copy the **External Address** of the static IP you created.
## Step 2: Update the external IP of the `knative-ingressgateway` service ## Step 2: Update the external IP of the `knative-ingressgateway` service
Run following command to configure the external IP of the Run following command to configure the external IP of the
`knative-ingressgateway` service to the static IP that you reserved: `knative-ingressgateway` service to the static IP that you reserved:
```shell ```shell
kubectl patch svc knative-ingressgateway --namespace istio-system --patch '{"spec": { "loadBalancerIP": "<your-reserved-static-ip>" }}' kubectl patch svc knative-ingressgateway --namespace istio-system --patch '{"spec": { "loadBalancerIP": "<your-reserved-static-ip>" }}'
``` ```
@ -55,14 +58,18 @@ kubectl patch svc knative-ingressgateway --namespace istio-system --patch '{"spe
## Step 3: Verify the static IP address of `knative-ingressgateway` service ## Step 3: Verify the static IP address of `knative-ingressgateway` service
Run the following command to ensure that the external IP of the "knative-ingressgateway" service has been updated: Run the following command to ensure that the external IP of the "knative-ingressgateway" service has been updated:
```shell ```shell
kubectl get svc knative-ingressgateway --namespace istio-system kubectl get svc knative-ingressgateway --namespace istio-system
``` ```
The output should show the assigned static IP address under the EXTERNAL-IP column: The output should show the assigned static IP address under the EXTERNAL-IP column:
``` ```
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
knative-ingressgateway LoadBalancer 12.34.567.890 98.765.43.210 80:32380/TCP,443:32390/TCP,32400:32400/TCP 5m knative-ingressgateway LoadBalancer 12.34.567.890 98.765.43.210 80:32380/TCP,443:32390/TCP,32400:32400/TCP 5m
``` ```
> Note: Updating the external IP address can take several minutes. > Note: Updating the external IP address can take several minutes.
--- ---

View File

@ -123,13 +123,12 @@ for request traces.
of the page. Enter `zipkin*` to `Index pattern` and select `timestamp_millis` of the page. Enter `zipkin*` to `Index pattern` and select `timestamp_millis`
from `Time Filter field name` and click on `Create` button. from `Time Filter field name` and click on `Create` button.
## Stackdriver, Prometheus & Grafana Setup ## Stackdriver, Prometheus & Grafana Setup
You must configure and build your own Fluentd image if either of the following are true: You must configure and build your own Fluentd image if either of the following are true:
* Your Knative Serving component is not hosted on a Google Cloud Platform (GCP) based cluster. - Your Knative Serving component is not hosted on a Google Cloud Platform (GCP) based cluster.
* You want to send logs to another GCP project. - You want to send logs to another GCP project.
To configure and setup monitoring: To configure and setup monitoring:

View File

@ -11,19 +11,19 @@ the `config-network` map.
To set the correct scope, you need to determine the IP ranges of your cluster. The scope varies To set the correct scope, you need to determine the IP ranges of your cluster. The scope varies
depending on your platform: depending on your platform:
* For Google Kubernetes Engine (GKE) run the following command to determine the scope. Make sure - For Google Kubernetes Engine (GKE) run the following command to determine the scope. Make sure
to replace the variables or export these values first. to replace the variables or export these values first.
```shell ```shell
gcloud container clusters describe ${CLUSTER_ID} \ gcloud container clusters describe ${CLUSTER_ID} \
--zone=${GCP_ZONE} | grep -e clusterIpv4Cidr -e servicesIpv4Cidr --zone=${GCP_ZONE} | grep -e clusterIpv4Cidr -e servicesIpv4Cidr
``` ```
* For IBM Cloud Private run the following command: - For IBM Cloud Private run the following command:
```shell ```shell
cat cluster/config.yaml | grep service_cluster_ip_range cat cluster/config.yaml | grep service_cluster_ip_range
``` ```
* For IBM Cloud Kubernetes Service use `172.30.0.0/16,172.20.0.0/16,10.10.10.0/24` - For IBM Cloud Kubernetes Service use `172.30.0.0/16,172.20.0.0/16,10.10.10.0/24`
* For Azure Container Service (ACS) use `10.244.0.0/16,10.240.0.0/16` - For Azure Container Service (ACS) use `10.244.0.0/16,10.240.0.0/16`
* For Minikube use `10.0.0.1/24` - For Minikube use `10.0.0.1/24`
## Setting the IP scope ## Setting the IP scope

View File

@ -5,7 +5,7 @@ different use-cases and resources. See [Knative serving](https://github.com/knat
to learn more about Knative Serving resources. to learn more about Knative Serving resources.
| Name | Description | Languages | | Name | Description | Languages |
| ---- | ----------- |:---------:| | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| Hello World | A quick introduction that highlights how to deploy an app using Knative Serving. | [C#](helloworld-csharp/README.md), [Clojure](helloworld-clojure/README.md), [Eclipse Vert.x](helloworld-vertx/README.md), [Go](helloworld-go/README.md), [Java](helloworld-java/README.md), [Kotlin](helloworld-kotlin/README.md), [Node.js](helloworld-nodejs/README.md), [PHP](helloworld-php/README.md), [Python](helloworld-python/README.md), [Ruby](helloworld-ruby/README.md), [Rust](helloworld-rust/README.md) | | Hello World | A quick introduction that highlights how to deploy an app using Knative Serving. | [C#](helloworld-csharp/README.md), [Clojure](helloworld-clojure/README.md), [Eclipse Vert.x](helloworld-vertx/README.md), [Go](helloworld-go/README.md), [Java](helloworld-java/README.md), [Kotlin](helloworld-kotlin/README.md), [Node.js](helloworld-nodejs/README.md), [PHP](helloworld-php/README.md), [Python](helloworld-python/README.md), [Ruby](helloworld-ruby/README.md), [Rust](helloworld-rust/README.md) |
| Advanced Deployment | Simple blue/green-like application deployment pattern illustrating the process of updating a live application without dropping any traffic. | [YAML](blue-green-deployment.md) | | Advanced Deployment | Simple blue/green-like application deployment pattern illustrating the process of updating a live application without dropping any traffic. | [YAML](blue-green-deployment.md) |
| Autoscale | A demonstration of the autoscaling capabilities of Knative. | [Go](autoscale-go/README.md) | | Autoscale | A demonstration of the autoscaling capabilities of Knative. | [Go](autoscale-go/README.md) |

View File

@ -8,6 +8,7 @@ A demonstration of the autoscaling capabilities of a Knative Serving Revision.
1. A [metrics installation](https://github.com/knative/docs/blob/master/serving/installing-logging-metrics-traces.md) for viewing scaling graphs (optional). 1. A [metrics installation](https://github.com/knative/docs/blob/master/serving/installing-logging-metrics-traces.md) for viewing scaling graphs (optional).
1. Install [Docker](https://docs.docker.com/get-started/#prepare-your-docker-environment). 1. Install [Docker](https://docs.docker.com/get-started/#prepare-your-docker-environment).
1. Check out the code: 1. Check out the code:
``` ```
go get -d github.com/knative/docs/serving/samples/autoscale-go go get -d github.com/knative/docs/serving/samples/autoscale-go
``` ```
@ -17,19 +18,23 @@ go get -d github.com/knative/docs/serving/samples/autoscale-go
Build the application container and publish it to a container registry: Build the application container and publish it to a container registry:
1. Move into the sample directory: 1. Move into the sample directory:
``` ```
cd $GOPATH/src/github.com/knative/docs cd $GOPATH/src/github.com/knative/docs
``` ```
1. Set your preferred container registry: 1. Set your preferred container registry:
``` ```
export REPO="gcr.io/<YOUR_PROJECT_ID>" export REPO="gcr.io/<YOUR_PROJECT_ID>"
``` ```
* This example shows how to use Google Container Registry (GCR). You will need a
- This example shows how to use Google Container Registry (GCR). You will need a
Google Cloud Project and to enable the Google Cloud Project and to enable the
[Google Container Registry API](https://console.cloud.google.com/apis/library/containerregistry.googleapis.com). [Google Container Registry API](https://console.cloud.google.com/apis/library/containerregistry.googleapis.com).
1. Use Docker to build your application container: 1. Use Docker to build your application container:
``` ```
docker build \ docker build \
--tag "${REPO}/serving/samples/autoscale-go" \ --tag "${REPO}/serving/samples/autoscale-go" \
@ -37,6 +42,7 @@ Build the application container and publish it to a container registry:
``` ```
1. Push your container to a container registry: 1. Push your container to a container registry:
``` ```
docker push "${REPO}/serving/samples/autoscale-go" docker push "${REPO}/serving/samples/autoscale-go"
``` ```
@ -51,6 +57,7 @@ Build the application container and publish it to a container registry:
## Deploy the Service ## Deploy the Service
1. Deploy the Knative Serving sample: 1. Deploy the Knative Serving sample:
``` ```
kubectl apply --filename serving/samples/autoscale-go/service.yaml kubectl apply --filename serving/samples/autoscale-go/service.yaml
``` ```
@ -63,9 +70,11 @@ Build the application container and publish it to a container registry:
## View the Autoscaling Capabilities ## View the Autoscaling Capabilities
1. Make a request to the autoscale app to see it consume some resources. 1. Make a request to the autoscale app to see it consume some resources.
``` ```
curl --header "Host: autoscale-go.default.example.com" "http://${IP_ADDRESS?}?sleep=100&prime=10000&bloat=5" curl --header "Host: autoscale-go.default.example.com" "http://${IP_ADDRESS?}?sleep=100&prime=10000&bloat=5"
``` ```
``` ```
Allocated 5 Mb of memory. Allocated 5 Mb of memory.
The largest prime less than 10000 is 9973. The largest prime less than 10000 is 9973.
@ -77,6 +86,7 @@ Build the application container and publish it to a container registry:
``` ```
go run serving/samples/autoscale-go/test/test.go -sleep 100 -prime 10000 -bloat 5 -qps 9999 -concurrency 300 go run serving/samples/autoscale-go/test/test.go -sleep 100 -prime 10000 -bloat 5 -qps 9999 -concurrency 300
``` ```
``` ```
REQUEST STATS: REQUEST STATS:
Total: 439 Inflight: 299 Done: 439 Success Rate: 100.00% Avg Latency: 0.4655 sec Total: 439 Inflight: 299 Done: 439 Success Rate: 100.00% Avg Latency: 0.4655 sec
@ -86,6 +96,7 @@ Build the application container and publish it to a container registry:
Total: 2911 Inflight: 300 Done: 577 Success Rate: 100.00% Avg Latency: 0.4401 sec Total: 2911 Inflight: 300 Done: 577 Success Rate: 100.00% Avg Latency: 0.4401 sec
... ...
``` ```
> Note: Use CTRL+C to exit the load test. > Note: Use CTRL+C to exit the load test.
1. Watch the Knative Serving deployment pod count increase. 1. Watch the Knative Serving deployment pod count increase.
@ -127,21 +138,25 @@ kubectl port-forward --namespace knative-monitoring $(kubectl get pods --namespa
### Other Experiments ### Other Experiments
1. Maintain 1000 concurrent requests. 1. Maintain 1000 concurrent requests.
``` ```
go run serving/samples/autoscale-go/test/test.go -qps 9999 -concurrency 1000 go run serving/samples/autoscale-go/test/test.go -qps 9999 -concurrency 1000
``` ```
1. Maintain 100 qps with fast requests. 1. Maintain 100 qps with fast requests.
``` ```
go run serving/samples/autoscale-go/test/test.go -qps 100 -concurrency 9999 go run serving/samples/autoscale-go/test/test.go -qps 100 -concurrency 9999
``` ```
1. Maintain 100 qps with slow requests. 1. Maintain 100 qps with slow requests.
``` ```
go run serving/samples/autoscale-go/test/test.go -qps 100 -concurrency 9999 -sleep 500 go run serving/samples/autoscale-go/test/test.go -qps 100 -concurrency 9999 -sleep 500
``` ```
1. Heavy CPU usage. 1. Heavy CPU usage.
``` ```
go run serving/samples/autoscale-go/test/test.go -qps 9999 -concurrency 10 -prime 40000000 go run serving/samples/autoscale-go/test/test.go -qps 9999 -concurrency 10 -prime 40000000
``` ```

View File

@ -8,8 +8,9 @@ configuration.
## Before you begin ## Before you begin
You need: You need:
* A Kubernetes cluster with [Knative installed](../../install/README.md).
* (Optional) [A custom domain configured](../../serving/using-a-custom-domain.md) for use with Knative. - A Kubernetes cluster with [Knative installed](../../install/README.md).
- (Optional) [A custom domain configured](../../serving/using-a-custom-domain.md) for use with Knative.
## Deploying Revision 1 (Blue) ## Deploying Revision 1 (Blue)
@ -39,6 +40,7 @@ spec:
``` ```
Save the file, then deploy the configuration to your cluster: Save the file, then deploy the configuration to your cluster:
```bash ```bash
kubectl apply --filename blue-green-demo-config.yaml kubectl apply --filename blue-green-demo-config.yaml
@ -62,6 +64,7 @@ spec:
``` ```
Save the file, then apply the route to your cluster: Save the file, then apply the route to your cluster:
```bash ```bash
kubectl apply --filename blue-green-demo-route.yaml kubectl apply --filename blue-green-demo-route.yaml
@ -74,15 +77,15 @@ with the [custom domain](../../serving/using-a-custom-domain.md) you configured
use with Knative. use with Knative.
> Note: If you don't have a custom domain configured for use with Knative, you can interact > Note: If you don't have a custom domain configured for use with Knative, you can interact
with your app using cURL requests if you have the host URL and IP address: > with your app using cURL requests if you have the host URL and IP address:
`curl -H "Host: blue-green-demo.default.example.com" http://IP_ADDRESS` > `curl -H "Host: blue-green-demo.default.example.com" http://IP_ADDRESS`
Knative creates the host URL by combining the name of your Route object, > Knative creates the host URL by combining the name of your Route object,
the namespace, and `example.com`, if you haven't configured a custom domain. > the namespace, and `example.com`, if you haven't configured a custom domain.
For example, `[route-name].[namespace].example.com`. > For example, `[route-name].[namespace].example.com`.
You can get the IP address by entering `kubectl get svc knative-ingressgateway --namespace istio-system` > You can get the IP address by entering `kubectl get svc knative-ingressgateway --namespace istio-system`
and copying the `EXTERNAL-IP` returned by that command. > and copying the `EXTERNAL-IP` returned by that command.
See [Interacting with your app](../../install/getting-started-knative-app.md#interacting-with-your-app) > See [Interacting with your app](../../install/getting-started-knative-app.md#interacting-with-your-app)
for more information. > for more information.
## Deploying Revision 2 (Green) ## Deploying Revision 2 (Green)
@ -111,6 +114,7 @@ spec:
``` ```
Save the file, then apply the updated configuration to your cluster: Save the file, then apply the updated configuration to your cluster:
```bash ```bash
kubectl apply --filename blue-green-demo-config.yaml kubectl apply --filename blue-green-demo-config.yaml
@ -139,6 +143,7 @@ spec:
``` ```
Save the file, then apply the updated route to your cluster: Save the file, then apply the updated route to your cluster:
```bash ```bash
kubectl apply --filename blue-green-demo-route.yaml kubectl apply --filename blue-green-demo-route.yaml
@ -147,8 +152,8 @@ route "blue-green-demo" configured
Revision 2 of the app is staged at this point. That means: Revision 2 of the app is staged at this point. That means:
* No traffic will be routed to revision 2 at the main URL, http://blue-green-demo.default.YOUR_CUSTOM_DOMAIN.com - No traffic will be routed to revision 2 at the main URL, http://blue-green-demo.default.YOUR_CUSTOM_DOMAIN.com
* Knative creates a new route named v2 for testing the newly deployed version at http://v2.blue-green-demo.default.YOUR_CUSTOM_DOMAIN.com - Knative creates a new route named v2 for testing the newly deployed version at http://v2.blue-green-demo.default.YOUR_CUSTOM_DOMAIN.com
This allows you to validate that the new version of the app is behaving as expected before switching This allows you to validate that the new version of the app is behaving as expected before switching
any traffic over to it. any traffic over to it.
@ -174,6 +179,7 @@ spec:
``` ```
Save the file, then apply the updated route to your cluster: Save the file, then apply the updated route to your cluster:
```bash ```bash
kubectl apply --filename blue-green-demo-route.yaml kubectl apply --filename blue-green-demo-route.yaml
@ -184,8 +190,7 @@ Refresh the original route (http://blue-green-demo.default.YOUR_CUSTOM_DOMAIN.co
few times to see that some traffic now goes to version 2 of the app. few times to see that some traffic now goes to version 2 of the app.
> Note: This sample shows a 50/50 split to assure you don't have to refresh too much, > Note: This sample shows a 50/50 split to assure you don't have to refresh too much,
but it's recommended to start with 1-2% of traffic in a production environment > but it's recommended to start with 1-2% of traffic in a production environment
## Rerouting all traffic to the new version ## Rerouting all traffic to the new version
@ -209,6 +214,7 @@ spec:
``` ```
Save the file, then apply the updated route to your cluster: Save the file, then apply the updated route to your cluster:
```bash ```bash
kubectl apply --filename blue-green-demo-route.yaml kubectl apply --filename blue-green-demo-route.yaml

View File

@ -1,14 +1,15 @@
# Deploying to Knative from a Private GitHub Repo # Deploying to Knative from a Private GitHub Repo
This sample demonstrates: This sample demonstrates:
* Pulling source code from a private Github repository using a deploy-key
* Pushing a Docker container to a private DockerHub repository using a username / password - Pulling source code from a private Github repository using a deploy-key
* Deploying to Knative Serving using image pull secrets - Pushing a Docker container to a private DockerHub repository using a username / password
- Deploying to Knative Serving using image pull secrets
## Before you begin ## Before you begin
* [Install Knative Serving](../../../install/README.md) - [Install Knative Serving](../../../install/README.md)
* Create a local folder for this sample and download the files in this directory into it. - Create a local folder for this sample and download the files in this directory into it.
## Setup ## Setup
@ -32,6 +33,7 @@ secrets:
We are going to add to this an image pull Secret. We are going to add to this an image pull Secret.
1. Create your image pull Secret with the following command, replacing values as neccesary: 1. Create your image pull Secret with the following command, replacing values as neccesary:
```shell ```shell
kubectl create secret docker-registry dockerhub-pull-secret \ kubectl create secret docker-registry dockerhub-pull-secret \
--docker-server=https://index.docker.io/v1/ --docker-email=not@val.id \ --docker-server=https://index.docker.io/v1/ --docker-email=not@val.id \
@ -42,6 +44,7 @@ We are going to add to this an image pull Secret.
[Creating a Secret in the cluster that holds your authorization token](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-secret-in-the-cluster-that-holds-your-authorization-token). [Creating a Secret in the cluster that holds your authorization token](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-secret-in-the-cluster-that-holds-your-authorization-token).
2. Add the newly created `imagePullSecret` to your default service account by entering: 2. Add the newly created `imagePullSecret` to your default service account by entering:
```shell ```shell
kubectl edit serviceaccount default kubectl edit serviceaccount default
``` ```
@ -56,7 +59,6 @@ We are going to add to this an image pull Secret.
- name: dockerhub-pull-secret - name: dockerhub-pull-secret
``` ```
### 2. Configuring the build ### 2. Configuring the build
The objects in this section are all defined in `build-bot.yaml`, and the fields that The objects in this section are all defined in `build-bot.yaml`, and the fields that
@ -67,6 +69,7 @@ The following sections explain the different configurations in the `build-bot.ya
as well as the necessary changes for each section. as well as the necessary changes for each section.
#### Setting up our Build service account #### Setting up our Build service account
To separate our Build's credentials from our applications credentials, the To separate our Build's credentials from our applications credentials, the
Build runs as its own service account: Build runs as its own service account:
@ -84,7 +87,7 @@ secrets:
You can set up a deploy key for a private Github repository following You can set up a deploy key for a private Github repository following
[these](https://developer.github.com/v3/guides/managing-deploy-keys/) [these](https://developer.github.com/v3/guides/managing-deploy-keys/)
instructions. The deploy key in the `build-bot.yaml` file in this folder is *real*; instructions. The deploy key in the `build-bot.yaml` file in this folder is _real_;
you do not need to change it for the sample to work. you do not need to change it for the sample to work.
```yaml ```yaml
@ -133,6 +136,7 @@ kubectl create --filename build-bot.yaml
``` ```
### 3. Installing a Build template and updating `manifest.yaml` ### 3. Installing a Build template and updating `manifest.yaml`
1. Install the 1. Install the
[Kaniko build template](https://github.com/knative/build-templates/blob/master/kaniko/kaniko.yaml) [Kaniko build template](https://github.com/knative/build-templates/blob/master/kaniko/kaniko.yaml)
by entering the following command: by entering the following command:
@ -168,8 +172,8 @@ export SERVICE_IP=$(kubectl get svc knative-ingressgateway --namespace istio-sys
``` ```
> Note: If your cluster is running outside a cloud provider (for example, on Minikube), > Note: If your cluster is running outside a cloud provider (for example, on Minikube),
your services will never get an external IP address. In that case, use the Istio > your services will never get an external IP address. In that case, use the Istio
`hostIP` and `nodePort` as the service IP: > `hostIP` and `nodePort` as the service IP:
```shell ```shell
export SERVICE_IP=$(kubectl get po --selector knative=ingressgateway --namespace istio-system \ export SERVICE_IP=$(kubectl get po --selector knative=ingressgateway --namespace istio-system \
@ -183,12 +187,12 @@ Now curl the service IP to make sure the deployment succeeded:
curl -H "Host: $SERVICE_HOST" http://$SERVICE_IP curl -H "Host: $SERVICE_HOST" http://$SERVICE_IP
``` ```
## Appendix: Sample Code ## Appendix: Sample Code
The sample code is in a private Github repository consisting of two files. The sample code is in a private Github repository consisting of two files.
1. `Dockerfile` 1. `Dockerfile`
```Dockerfile ```Dockerfile
# Use golang:alpine to optimize the image size. # Use golang:alpine to optimize the image size.
# See https://hub.docker.com/_/golang/ for more information # See https://hub.docker.com/_/golang/ for more information
@ -210,8 +214,8 @@ The sample code is in a private Github repository consisting of two files.
package main package main
import ( import (
"fmt" "
"net/http" "
) )
const ( const (
@ -219,11 +223,11 @@ The sample code is in a private Github repository consisting of two files.
) )
func helloWorld(w http.ResponseWriter, r *http.Request) { func helloWorld(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Hello World.") )
} }
func main() { func main() {
http.HandleFunc("/", helloWorld) )
http.ListenAndServe(port, nil) )
} }
``` ```

View File

@ -8,7 +8,7 @@ sample app for Cloud Foundry.
## Prerequisites ## Prerequisites
* [Install Knative Serving](../../../install/README.md) - [Install Knative Serving](../../../install/README.md)
## Running ## Running

View File

@ -8,7 +8,7 @@ sample function for riff.
## Prerequisites ## Prerequisites
* [Install Knative Serving](../../../install/README.md) - [Install Knative Serving](../../../install/README.md)
## Running ## Running
@ -53,6 +53,7 @@ items:
Once the `BuildComplete` status is `True`, resource creation begins. Once the `BuildComplete` status is `True`, resource creation begins.
To access this service using `curl`, we first need to determine its ingress address: To access this service using `curl`, we first need to determine its ingress address:
```shell ```shell
watch kubectl get svc knative-ingressgateway --namespace istio-system watch kubectl get svc knative-ingressgateway --namespace istio-system
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE

View File

@ -5,12 +5,12 @@ through a webhook.
## Prerequisites ## Prerequisites
* A Kubernetes cluster with Knative installed. Follow the - A Kubernetes cluster with Knative installed. Follow the
[installation instructions](https://github.com/knative/docs/blob/master/install/README.md) [installation instructions](https://github.com/knative/docs/blob/master/install/README.md)
if you need to create one. if you need to create one.
* [Docker](https://www.docker.com) installed and running on your local machine, - [Docker](https://www.docker.com) installed and running on your local machine,
and a Docker Hub account configured (we'll use it for a container registry). and a Docker Hub account configured (we'll use it for a container registry).
* An account on [GitHub](https://github.com) with read/write access to a - An account on [GitHub](https://github.com) with read/write access to a
repository. repository.
## Build the sample code ## Build the sample code
@ -149,4 +149,3 @@ To clean up the sample service:
```shell ```shell
kubectl delete --filename service.yaml kubectl delete --filename service.yaml
``` ```

View File

@ -1,15 +1,15 @@
# Hello World - Clojure sample # Hello World - Clojure sample
A simple web app written in Clojure that you can use for testing. A simple web app written in Clojure that you can use for testing.
It reads in an env variable `TARGET` and prints "Hello ${TARGET}!". If It reads in an env variable `TARGET` and prints "Hello \${TARGET}!". If
TARGET is not specified, it will use "World" as the TARGET. TARGET is not specified, it will use "World" as the TARGET.
## Prerequisites ## Prerequisites
* A Kubernetes cluster with Knative installed. Follow the - A Kubernetes cluster with Knative installed. Follow the
[installation instructions](https://github.com/knative/docs/blob/master/install/README.md) if you need [installation instructions](https://github.com/knative/docs/blob/master/install/README.md) if you need
to create one. to create one.
* [Docker](https://www.docker.com) installed and running on your local machine, - [Docker](https://www.docker.com) installed and running on your local machine,
and a Docker Hub account configured (we'll use it for a container registry). and a Docker Hub account configured (we'll use it for a container registry).
## Recreating the sample code ## Recreating the sample code
@ -129,9 +129,10 @@ folder) you're ready to build and deploy the sample app.
``` ```
1. Now that your service is created, Knative will perform the following steps: 1. Now that your service is created, Knative will perform the following steps:
* Create a new immutable revision for this version of the app.
* Network programming to create a route, ingress, service, and load balance for your app. - Create a new immutable revision for this version of the app.
* Automatically scale your pods up and down (including to zero active pods). - Network programming to create a route, ingress, service, and load balance for your app.
- Automatically scale your pods up and down (including to zero active pods).
1. To find the IP address for your service, use 1. To find the IP address for your service, use
`kubectl get svc knative-ingressgateway --namespace istio-system` to get the ingress IP for your `kubectl get svc knative-ingressgateway --namespace istio-system` to get the ingress IP for your
@ -147,6 +148,7 @@ folder) you're ready to build and deploy the sample app.
``` ```
1. To find the URL for your service, use 1. To find the URL for your service, use
``` ```
kubectl get ksvc helloworld-clojure --output=custom-columns=NAME:.metadata.name,DOMAIN:.status.domain kubectl get ksvc helloworld-clojure --output=custom-columns=NAME:.metadata.name,DOMAIN:.status.domain
NAME DOMAIN NAME DOMAIN

View File

@ -1,17 +1,17 @@
# Hello World - .NET Core sample # Hello World - .NET Core sample
A simple web app written in C# using .NET Core 2.1 that you can use for testing. A simple web app written in C# using .NET Core 2.1 that you can use for testing.
It reads in an env variable `TARGET` and prints "Hello ${TARGET}!". If It reads in an env variable `TARGET` and prints "Hello \${TARGET}!". If
TARGET is not specified, it will use "World" as the TARGET. TARGET is not specified, it will use "World" as the TARGET.
## Prerequisites ## Prerequisites
* A Kubernetes cluster with Knative installed. Follow the - A Kubernetes cluster with Knative installed. Follow the
[installation instructions](https://github.com/knative/docs/blob/master/install/README.md) if you need [installation instructions](https://github.com/knative/docs/blob/master/install/README.md) if you need
to create one. to create one.
* [Docker](https://www.docker.com) installed and running on your local machine, - [Docker](https://www.docker.com) installed and running on your local machine,
and a Docker Hub account configured (we'll use it for a container registry). and a Docker Hub account configured (we'll use it for a container registry).
* You have installed [.NET Core SDK 2.1](https://www.microsoft.com/net/core). - You have installed [.NET Core SDK 2.1](https://www.microsoft.com/net/core).
## Recreating the sample code ## Recreating the sample code
@ -127,9 +127,10 @@ folder) you're ready to build and deploy the sample app.
``` ```
1. Now that your service is created, Knative will perform the following steps: 1. Now that your service is created, Knative will perform the following steps:
* Create a new immutable revision for this version of the app.
* Network programming to create a route, ingress, service, and load balance for your app. - Create a new immutable revision for this version of the app.
* Automatically scale your pods up and down (including to zero active pods). - Network programming to create a route, ingress, service, and load balance for your app.
- Automatically scale your pods up and down (including to zero active pods).
1. To find the IP address for your service, use 1. To find the IP address for your service, use
`kubectl get svc knative-ingressgateway --namespace istio-system` to get the ingress IP for your `kubectl get svc knative-ingressgateway --namespace istio-system` to get the ingress IP for your
@ -145,6 +146,7 @@ folder) you're ready to build and deploy the sample app.
``` ```
1. To find the URL for your service, use 1. To find the URL for your service, use
``` ```
kubectl get ksvc helloworld-csharp --output=custom-columns=NAME:.metadata.name,DOMAIN:.status.domain kubectl get ksvc helloworld-csharp --output=custom-columns=NAME:.metadata.name,DOMAIN:.status.domain
NAME DOMAIN NAME DOMAIN

View File

@ -6,12 +6,12 @@ that you can use for testing. It reads in the env variable `TARGET` and prints
## Prerequisites ## Prerequisites
* A Kubernetes cluster with Knative installed. Follow the - A Kubernetes cluster with Knative installed. Follow the
[installation instructions](https://github.com/knative/docs/blob/master/install/README.md) [installation instructions](https://github.com/knative/docs/blob/master/install/README.md)
if you need to create one. if you need to create one.
* [Docker](https://www.docker.com) installed and running on your local machine, - [Docker](https://www.docker.com) installed and running on your local machine,
and a Docker Hub account configured (we'll use it for a container registry). and a Docker Hub account configured (we'll use it for a container registry).
* [dart-sdk](https://www.dartlang.org/tools/sdk#install) installed and configured - [dart-sdk](https://www.dartlang.org/tools/sdk#install) installed and configured
if you want to run the program locally. if you want to run the program locally.
## Recreating the sample code ## Recreating the sample code
@ -30,7 +30,7 @@ created using the following instructions.
dependencies: dependencies:
shelf: ^0.7.3 shelf: ^0.7.3
environment: environment:
sdk: '>=2.0.0 <3.0.0' sdk: ">=2.0.0 <3.0.0"
``` ```
2. If you want to run locally, install dependencies. If you only want to run in 2. If you want to run locally, install dependencies. If you only want to run in
@ -128,9 +128,10 @@ folder) you're ready to build and deploy the sample app.
``` ```
1. Now that your service is created, Knative will perform the following steps: 1. Now that your service is created, Knative will perform the following steps:
* Create a new immutable revision for this version of the app.
* Network programming to create a route, ingress, service, and load balance for your app. - Create a new immutable revision for this version of the app.
* Automatically scale your pods up and down (including to zero active pods). - Network programming to create a route, ingress, service, and load balance for your app.
- Automatically scale your pods up and down (including to zero active pods).
1. To find the IP address for your service, use 1. To find the IP address for your service, use
`kubectl get svc knative-ingressgateway --namespace istio-system` to get the ingress IP for your `kubectl get svc knative-ingressgateway --namespace istio-system` to get the ingress IP for your
@ -146,6 +147,7 @@ folder) you're ready to build and deploy the sample app.
``` ```
1. To find the URL for your service, use 1. To find the URL for your service, use
``` ```
kubectl get ksvc helloworld-dart --output=custom-columns=NAME:.metadata.name,DOMAIN:.status.domain kubectl get ksvc helloworld-dart --output=custom-columns=NAME:.metadata.name,DOMAIN:.status.domain
NAME DOMAIN NAME DOMAIN
@ -167,4 +169,3 @@ To remove the sample app from your cluster, delete the service record:
```shell ```shell
kubectl delete --filename service.yaml kubectl delete --filename service.yaml
``` ```

View File

@ -14,9 +14,9 @@ building, running, and packaging Elixir Web applications.
To start your Phoenix server: To start your Phoenix server:
* Install dependencies with `mix deps.get` - Install dependencies with `mix deps.get`
* Install Node.js dependencies with `cd assets && npm install` - Install Node.js dependencies with `cd assets && npm install`
* Start Phoenix endpoint with `mix phx.server` - Start Phoenix endpoint with `mix phx.server`
Now you can visit [`localhost:4000`](http://localhost:4000) from your browser. Now you can visit [`localhost:4000`](http://localhost:4000) from your browser.
@ -152,9 +152,10 @@ directions above.
``` ```
1. Now that your service is created, Knative will perform the following steps: 1. Now that your service is created, Knative will perform the following steps:
* Create a new immutable revision for this version of the app.
* Network programming to create a route, ingress, service, and load balance for your app. - Create a new immutable revision for this version of the app.
* Automatically scale your pods up and down (including to zero active pods). - Network programming to create a route, ingress, service, and load balance for your app.
- Automatically scale your pods up and down (including to zero active pods).
1. To find the IP address for your service, use 1. To find the IP address for your service, use
`kubectl get svc knative-ingressgateway --namespace istio-system` to get the ingress IP for your `kubectl get svc knative-ingressgateway --namespace istio-system` to get the ingress IP for your
@ -165,6 +166,7 @@ directions above.
kubectl get svc knative-ingressgateway --namespace istio-system kubectl get svc knative-ingressgateway --namespace istio-system
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
knative-ingressgateway LoadBalancer 10.35.254.218 35.225.171.32 80:32380/TCP,443:32390/TCP,32400:32400/TCP 1h knative-ingressgateway LoadBalancer 10.35.254.218 35.225.171.32 80:32380/TCP,443:32390/TCP,32400:32400/TCP 1h
``` ```
@ -202,6 +204,7 @@ knative-ingressgateway LoadBalancer 10.35.254.218 35.225.171.32 80:32380
<title>Hello Knative</title> <title>Hello Knative</title>
<link rel="stylesheet" type="text/css" href="/css/app-833cc7e8eeed7a7953c5a02e28130dbd.css?vsn=d"> <link rel="stylesheet" type="text/css" href="/css/app-833cc7e8eeed7a7953c5a02e28130dbd.css?vsn=d">
</head> </head>
```
<body> <body>
<div class="container"> <div class="container">
@ -215,6 +218,7 @@ knative-ingressgateway LoadBalancer 10.35.254.218 35.225.171.32 80:32380
<p class="alert alert-danger" role="alert"></p> <p class="alert alert-danger" role="alert"></p>
<main role="main"> <main role="main">
<div class="jumbotron"> <div class="jumbotron">
<h2>Welcome to Knative and Elixir</h2> <h2>Welcome to Knative and Elixir</h2>
@ -291,6 +295,7 @@ knative-ingressgateway LoadBalancer 10.35.254.218 35.225.171.32 80:32380
</div> <!-- /container --> </div> <!-- /container -->
<script src="/js/app-930ab1950e10d7b5ab5083423c28f06e.js?vsn=d"></script> <script src="/js/app-930ab1950e10d7b5ab5083423c28f06e.js?vsn=d"></script>
</body> </body>
</html> </html>
``` ```

View File

@ -6,10 +6,10 @@ It reads in an env variable `TARGET` and prints `Hello ${TARGET}!`. If
## Prerequisites ## Prerequisites
* A Kubernetes cluster with Knative installed. Follow the - A Kubernetes cluster with Knative installed. Follow the
[installation instructions](https://github.com/knative/docs/blob/master/install/README.md) if you need [installation instructions](https://github.com/knative/docs/blob/master/install/README.md) if you need
to create one. to create one.
* [Docker](https://www.docker.com) installed and running on your local machine, - [Docker](https://www.docker.com) installed and running on your local machine,
and a Docker Hub account configured (we'll use it for a container registry). and a Docker Hub account configured (we'll use it for a container registry).
## Recreating the sample code ## Recreating the sample code
@ -135,9 +135,10 @@ folder) you're ready to build and deploy the sample app.
``` ```
1. Now that your service is created, Knative will perform the following steps: 1. Now that your service is created, Knative will perform the following steps:
* Create a new immutable revision for this version of the app.
* Network programming to create a route, ingress, service, and load balance for your app. - Create a new immutable revision for this version of the app.
* Automatically scale your pods up and down (including to zero active pods). - Network programming to create a route, ingress, service, and load balance for your app.
- Automatically scale your pods up and down (including to zero active pods).
1. Run the following command to find the external IP address for your service. The ingress IP for your 1. Run the following command to find the external IP address for your service. The ingress IP for your
cluster is returned. If you just created your cluster, you might need to wait and rerun the command until cluster is returned. If you just created your cluster, you might need to wait and rerun the command until
@ -148,6 +149,7 @@ folder) you're ready to build and deploy the sample app.
``` ```
Example: Example:
```shell ```shell
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
knative-ingressgateway LoadBalancer 10.23.247.74 35.203.155.229 80:32380/TCP,443:32390/TCP,32400:32400/TCP 2d knative-ingressgateway LoadBalancer 10.23.247.74 35.203.155.229 80:32380/TCP,443:32390/TCP,32400:32400/TCP 2d
@ -155,11 +157,13 @@ folder) you're ready to build and deploy the sample app.
``` ```
1. Run the following command to find the domain URL for your service: 1. Run the following command to find the domain URL for your service:
```shell ```shell
kubectl get ksvc helloworld-go --output=custom-columns=NAME:.metadata.name,DOMAIN:.status.domain kubectl get ksvc helloworld-go --output=custom-columns=NAME:.metadata.name,DOMAIN:.status.domain
``` ```
Example: Example:
```shell ```shell
NAME DOMAIN NAME DOMAIN
helloworld-go helloworld-go.default.example.com helloworld-go helloworld-go.default.example.com
@ -174,6 +178,7 @@ folder) you're ready to build and deploy the sample app.
``` ```
Example: Example:
```shell ```shell
curl -H "Host: helloworld-go.default.example.com" http://35.203.155.229 curl -H "Host: helloworld-go.default.example.com" http://35.203.155.229
Hello World: Go Sample v1! Hello World: Go Sample v1!

View File

@ -1,15 +1,15 @@
# Hello World - Haskell sample # Hello World - Haskell sample
A simple web app written in Haskell that you can use for testing. A simple web app written in Haskell that you can use for testing.
It reads in an env variable `TARGET` and prints "Hello ${TARGET}!". If It reads in an env variable `TARGET` and prints "Hello \${TARGET}!". If
TARGET is not specified, it will use "World" as the TARGET. TARGET is not specified, it will use "World" as the TARGET.
## Prerequisites ## Prerequisites
* A Kubernetes cluster with Knative installed. Follow the - A Kubernetes cluster with Knative installed. Follow the
[installation instructions](https://github.com/knative/docs/blob/master/install/README.md) if you need [installation instructions](https://github.com/knative/docs/blob/master/install/README.md) if you need
to create one. to create one.
* [Docker](https://www.docker.com) installed and running on your local machine, - [Docker](https://www.docker.com) installed and running on your local machine,
and a Docker Hub account configured (we'll use it for a container registry). and a Docker Hub account configured (we'll use it for a container registry).
## Recreating the sample code ## Recreating the sample code
@ -27,6 +27,7 @@ following instructions recreate the source files from this folder.
extra-deps: [] extra-deps: []
resolver: lts-10.7 resolver: lts-10.7
``` ```
1. Create a new file named `package.yaml` and paste the following code 1. Create a new file named `package.yaml` and paste the following code
```yaml ```yaml
@ -52,28 +53,28 @@ following instructions recreate the source files from this folder.
listens on port 8080: listens on port 8080:
```haskell ```haskell
{-# LANGUAGE OverloadedStrings #-} }
import Data.Maybe e
import Data.Monoid ((<>)) )
import Data.Text.Lazy (Text) )
import Data.Text.Lazy y
import System.Environment (lookupEnv) )
import Web.Scotty (ActionM, ScottyM, scotty) )
import Web.Scotty.Trans s
main :: IO () )
main = do o
t <- fromMaybe "World" <$> lookupEnv "TARGET" "
pStr <- fromMaybe "8080" <$> lookupEnv "PORT" "
let p = read pStr :: Int t
scotty p (route t) )
route :: String -> ScottyM() )
route t = get "/" $ hello t t
hello :: String -> ActionM() )
hello t = text $ pack ("Hello " ++ t) )
``` ```
1. In your project directory, create a file named `Dockerfile` and copy the code 1. In your project directory, create a file named `Dockerfile` and copy the code
@ -156,9 +157,10 @@ folder) you're ready to build and deploy the sample app.
``` ```
1. Now that your service is created, Knative will perform the following steps: 1. Now that your service is created, Knative will perform the following steps:
* Create a new immutable revision for this version of the app.
* Network programming to create a route, ingress, service, and load balance for your app. - Create a new immutable revision for this version of the app.
* Automatically scale your pods up and down (including to zero active pods). - Network programming to create a route, ingress, service, and load balance for your app.
- Automatically scale your pods up and down (including to zero active pods).
1. To find the IP address for your service, enter 1. To find the IP address for your service, enter
`kubectl get svc knative-ingressgateway --namespace istio-system` to get the ingress IP for your `kubectl get svc knative-ingressgateway --namespace istio-system` to get the ingress IP for your
@ -181,6 +183,7 @@ folder) you're ready to build and deploy the sample app.
``` ```
1. To find the URL for your service, enter: 1. To find the URL for your service, enter:
``` ```
kubectl get ksvc helloworld-haskell --output=custom-columns=NAME:.metadata.name,DOMAIN:.status.domain kubectl get ksvc helloworld-haskell --output=custom-columns=NAME:.metadata.name,DOMAIN:.status.domain
NAME DOMAIN NAME DOMAIN
@ -202,4 +205,3 @@ To remove the sample app from your cluster, delete the service record:
```shell ```shell
kubectl delete --filename service.yaml kubectl delete --filename service.yaml
``` ```

View File

@ -1,17 +1,17 @@
# Hello World - Spring Boot Java sample # Hello World - Spring Boot Java sample
A simple web app written in Java using Spring Boot 2.0 that you can use for testing. A simple web app written in Java using Spring Boot 2.0 that you can use for testing.
It reads in an env variable `TARGET` and prints "Hello ${TARGET}!". If It reads in an env variable `TARGET` and prints "Hello \${TARGET}!". If
TARGET is not specified, it will use "World" as the TARGET. TARGET is not specified, it will use "World" as the TARGET.
## Prerequisites ## Prerequisites
* A Kubernetes cluster with Knative installed. Follow the - A Kubernetes cluster with Knative installed. Follow the
[installation instructions](https://github.com/knative/docs/blob/master/install/README.md) if you need [installation instructions](https://github.com/knative/docs/blob/master/install/README.md) if you need
to create one. to create one.
* [Docker](https://www.docker.com) installed and running on your local machine, - [Docker](https://www.docker.com) installed and running on your local machine,
and a Docker Hub account configured (we'll use it for a container registry). and a Docker Hub account configured (we'll use it for a container registry).
* You have installed [Java SE 8 or later JDK](http://www.oracle.com/technetwork/java/javase/downloads/index.html). - You have installed [Java SE 8 or later JDK](http://www.oracle.com/technetwork/java/javase/downloads/index.html).
## Recreating the sample code ## Recreating the sample code
@ -68,6 +68,7 @@ recreate the source files from this folder.
} }
} }
``` ```
1. Run the application locally: 1. Run the application locally:
```shell ```shell
@ -159,9 +160,10 @@ folder) you're ready to build and deploy the sample app.
``` ```
1. Now that your service is created, Knative will perform the following steps: 1. Now that your service is created, Knative will perform the following steps:
* Create a new immutable revision for this version of the app.
* Network programming to create a route, ingress, service, and load balancer for your app. - Create a new immutable revision for this version of the app.
* Automatically scale your pods up and down (including to zero active pods). - Network programming to create a route, ingress, service, and load balancer for your app.
- Automatically scale your pods up and down (including to zero active pods).
1. To find the IP address for your service, use. If your cluster is new, it may take sometime for the service to get asssigned 1. To find the IP address for your service, use. If your cluster is new, it may take sometime for the service to get asssigned
an external IP address. an external IP address.

View File

@ -1,15 +1,15 @@
# Hello World - Kotlin sample # Hello World - Kotlin sample
A simple web app written in Kotlin using [Ktor](https://ktor.io/) that you can use for testing. A simple web app written in Kotlin using [Ktor](https://ktor.io/) that you can use for testing.
It reads in an env variable `TARGET` and prints "Hello ${TARGET}". If It reads in an env variable `TARGET` and prints "Hello \${TARGET}". If
TARGET is not specified, it will use "World" as the TARGET. TARGET is not specified, it will use "World" as the TARGET.
## Prerequisites ## Prerequisites
* A Kubernetes cluster with Knative installed. Follow the - A Kubernetes cluster with Knative installed. Follow the
[installation instructions](https://github.com/knative/docs/blob/master/install/README.md) if you need [installation instructions](https://github.com/knative/docs/blob/master/install/README.md) if you need
to create one. to create one.
* [Docker](https://www.docker.com) installed and running on your local machine, - [Docker](https://www.docker.com) installed and running on your local machine,
and a Docker Hub account configured (we'll use it for a container registry). and a Docker Hub account configured (we'll use it for a container registry).
## Steps to recreate the sample code ## Steps to recreate the sample code
@ -24,6 +24,7 @@ The following instructions recreate the source files from this folder.
mkdir hello mkdir hello
cd hello cd hello
``` ```
2. Create a file named `Main.kt` at `src/main/kotlin/com/example/hello` and copy the code block below into it: 2. Create a file named `Main.kt` at `src/main/kotlin/com/example/hello` and copy the code block below into it:
```shell ```shell
@ -52,6 +53,7 @@ The following instructions recreate the source files from this folder.
}.start(wait = true) }.start(wait = true)
} }
``` ```
3. Switch back to `hello` directory 3. Switch back to `hello` directory
4. Create a new file, `build.gradle` and copy the following setting 4. Create a new file, `build.gradle` and copy the following setting
@ -181,9 +183,10 @@ folder) you're ready to build and deploy the sample app.
``` ```
3. Now that your service is created, Knative will perform the following steps: 3. Now that your service is created, Knative will perform the following steps:
* Create a new immutable revision for this version of the app.
* Network programming to create a route, ingress, service, and load balance for your app. - Create a new immutable revision for this version of the app.
* Automatically scale your pods up and down (including to zero active pods). - Network programming to create a route, ingress, service, and load balance for your app.
- Automatically scale your pods up and down (including to zero active pods).
4. To find the IP address for your service, use 4. To find the IP address for your service, use
`kubectl get service knative-ingressgateway --namespace istio-system` to get the ingress IP for your `kubectl get service knative-ingressgateway --namespace istio-system` to get the ingress IP for your
@ -193,15 +196,18 @@ folder) you're ready to build and deploy the sample app.
```shell ```shell
kubectl get service knative-ingressgateway --namespace istio-system kubectl get service knative-ingressgateway --namespace istio-system
``` ```
```shell ```shell
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
knative-ingressgateway LoadBalancer 10.23.247.74 35.203.155.229 80:32380/TCP,443:32390/TCP,32400:32400/TCP 2d knative-ingressgateway LoadBalancer 10.23.247.74 35.203.155.229 80:32380/TCP,443:32390/TCP,32400:32400/TCP 2d
``` ```
5. To find the URL for your service, use 5. To find the URL for your service, use
```shell ```shell
kubectl get ksvc helloworld-kotlin --output=custom-columns=NAME:.metadata.name,DOMAIN:.status.domain kubectl get ksvc helloworld-kotlin --output=custom-columns=NAME:.metadata.name,DOMAIN:.status.domain
``` ```
```shell ```shell
NAME DOMAIN NAME DOMAIN
helloworld-kotlin helloworld-kotlin.default.example.com helloworld-kotlin helloworld-kotlin.default.example.com
@ -213,6 +219,7 @@ folder) you're ready to build and deploy the sample app.
```shell ```shell
curl -H "Host: helloworld-kotlin.default.example.com" http://{IP_ADDRESS} curl -H "Host: helloworld-kotlin.default.example.com" http://{IP_ADDRESS}
``` ```
```shell ```shell
Hello Kotlin Sample v1 Hello Kotlin Sample v1
``` ```

View File

@ -1,17 +1,17 @@
# Hello World - Node.js sample # Hello World - Node.js sample
A simple web app written in Node.js that you can use for testing. A simple web app written in Node.js that you can use for testing.
It reads in an env variable `TARGET` and prints "Hello ${TARGET}!". If It reads in an env variable `TARGET` and prints "Hello \${TARGET}!". If
TARGET is not specified, it will use "World" as the TARGET. TARGET is not specified, it will use "World" as the TARGET.
## Prerequisites ## Prerequisites
* A Kubernetes cluster with Knative installed. Follow the - A Kubernetes cluster with Knative installed. Follow the
[installation instructions](https://github.com/knative/docs/blob/master/install/README.md) if you need [installation instructions](https://github.com/knative/docs/blob/master/install/README.md) if you need
to create one. to create one.
* [Docker](https://www.docker.com) installed and running on your local machine, - [Docker](https://www.docker.com) installed and running on your local machine,
and a Docker Hub account configured (we'll use it for a container registry). and a Docker Hub account configured (we'll use it for a container registry).
* [Node.js](https://nodejs.org/en/) installed and configured. - [Node.js](https://nodejs.org/en/) installed and configured.
## Recreating the sample code ## Recreating the sample code
@ -46,19 +46,19 @@ recreate the source files from this folder.
1. Create a new file named `app.js` and paste the following code: 1. Create a new file named `app.js` and paste the following code:
```js ```js
const express = require('express'); const express = require("express");
const app = express(); const app = express();
app.get('/', function (req, res) { app.get("/", function(req, res) {
console.log('Hello world received a request.'); console.log("Hello world received a request.");
const target = process.env.TARGET || 'World'; const target = process.env.TARGET || "World";
res.send('Hello ' + target + '!'); res.send("Hello " + target + "!");
}); });
const port = process.env.PORT || 8080; const port = process.env.PORT || 8080;
app.listen(port, function() { app.listen(port, function() {
console.log('Hello world listening on port', port); console.log("Hello world listening on port", port);
}); });
``` ```
@ -157,9 +157,10 @@ folder) you're ready to build and deploy the sample app.
``` ```
1. Now that your service is created, Knative will perform the following steps: 1. Now that your service is created, Knative will perform the following steps:
* Create a new immutable revision for this version of the app.
* Network programming to create a route, ingress, service, and load balance for your app. - Create a new immutable revision for this version of the app.
* Automatically scale your pods up and down (including to zero active pods). - Network programming to create a route, ingress, service, and load balance for your app.
- Automatically scale your pods up and down (including to zero active pods).
1. To find the IP address for your service, use 1. To find the IP address for your service, use
`kubectl get svc knative-ingressgateway --namespace istio-system` to get the ingress IP for your `kubectl get svc knative-ingressgateway --namespace istio-system` to get the ingress IP for your
@ -175,6 +176,7 @@ folder) you're ready to build and deploy the sample app.
``` ```
1. To find the URL for your service, use 1. To find the URL for your service, use
``` ```
kubectl get ksvc helloworld-nodejs --output=custom-columns=NAME:.metadata.name,DOMAIN:.status.domain kubectl get ksvc helloworld-nodejs --output=custom-columns=NAME:.metadata.name,DOMAIN:.status.domain
NAME DOMAIN NAME DOMAIN

View File

@ -1,15 +1,15 @@
# Hello World - PHP sample # Hello World - PHP sample
A simple web app written in PHP that you can use for testing. A simple web app written in PHP that you can use for testing.
It reads in an env variable `TARGET` and prints "Hello ${TARGET}!". If It reads in an env variable `TARGET` and prints "Hello \${TARGET}!". If
TARGET is not specified, it will use "World" as the TARGET. TARGET is not specified, it will use "World" as the TARGET.
## Prerequisites ## Prerequisites
* A Kubernetes cluster with Knative installed. Follow the - A Kubernetes cluster with Knative installed. Follow the
[installation instructions](https://github.com/knative/docs/blob/master/install/README.md) if you need [installation instructions](https://github.com/knative/docs/blob/master/install/README.md) if you need
to create one. to create one.
* [Docker](https://www.docker.com) installed and running on your local machine, - [Docker](https://www.docker.com) installed and running on your local machine,
and a Docker Hub account configured (we'll use it for a container registry). and a Docker Hub account configured (we'll use it for a container registry).
## Recreating the sample code ## Recreating the sample code
@ -20,10 +20,10 @@ following instructions recreate the source files from this folder.
1. Create a new directory and cd into it: 1. Create a new directory and cd into it:
````shell ```shell
mkdir app mkdir app
cd app cd app
```` ```
1. Create a file named `index.php` and copy the code block below into it: 1. Create a file named `index.php` and copy the code block below into it:
@ -100,9 +100,10 @@ you're ready to build and deploy the sample app.
``` ```
1. Now that your service is created, Knative will perform the following steps: 1. Now that your service is created, Knative will perform the following steps:
* Create a new immutable revision for this version of the app.
* Network programming to create a route, ingress, service, and load balance for your app. - Create a new immutable revision for this version of the app.
* Automatically scale your pods up and down (including to zero active pods). - Network programming to create a route, ingress, service, and load balance for your app.
- Automatically scale your pods up and down (including to zero active pods).
1. To find the IP address for your service, use 1. To find the IP address for your service, use
`kubectl get svc knative-ingressgateway --namespace istio-system` to get the ingress IP for your `kubectl get svc knative-ingressgateway --namespace istio-system` to get the ingress IP for your
@ -118,6 +119,7 @@ you're ready to build and deploy the sample app.
``` ```
1. To find the URL for your service, use 1. To find the URL for your service, use
``` ```
kubectl get ksvc helloworld-php --output=custom-columns=NAME:.metadata.name,DOMAIN:.status.domain kubectl get ksvc helloworld-php --output=custom-columns=NAME:.metadata.name,DOMAIN:.status.domain
NAME DOMAIN NAME DOMAIN

View File

@ -1,15 +1,15 @@
# Hello World - Python sample # Hello World - Python sample
A simple web app written in Python that you can use for testing. A simple web app written in Python that you can use for testing.
It reads in an env variable `TARGET` and prints "Hello ${TARGET}!". If It reads in an env variable `TARGET` and prints "Hello \${TARGET}!". If
TARGET is not specified, it will use "World" as the TARGET. TARGET is not specified, it will use "World" as the TARGET.
## Prerequisites ## Prerequisites
* A Kubernetes cluster with Knative installed. Follow the - A Kubernetes cluster with Knative installed. Follow the
[installation instructions](https://github.com/knative/docs/blob/master/install/README.md) if you need [installation instructions](https://github.com/knative/docs/blob/master/install/README.md) if you need
to create one. to create one.
* [Docker](https://www.docker.com) installed and running on your local machine, - [Docker](https://www.docker.com) installed and running on your local machine,
and a Docker Hub account configured (we'll use it for a container registry). and a Docker Hub account configured (we'll use it for a container registry).
## Steps to recreate the sample code ## Steps to recreate the sample code
@ -20,10 +20,11 @@ The following instructions recreate the source files from this folder.
1. Create a new directory and cd into it: 1. Create a new directory and cd into it:
````shell ```shell
mkdir app mkdir app
cd app cd app
```` ```
1. Create a file named `app.py` and copy the code block below into it: 1. Create a file named `app.py` and copy the code block below into it:
```python ```python
@ -114,9 +115,10 @@ folder) you're ready to build and deploy the sample app.
``` ```
1. Now that your service is created, Knative will perform the following steps: 1. Now that your service is created, Knative will perform the following steps:
* Create a new immutable revision for this version of the app.
* Network programming to create a route, ingress, service, and load balance for your app. - Create a new immutable revision for this version of the app.
* Automatically scale your pods up and down (including to zero active pods). - Network programming to create a route, ingress, service, and load balance for your app.
- Automatically scale your pods up and down (including to zero active pods).
1. To find the IP address for your service, use 1. To find the IP address for your service, use
`kubectl get svc knative-ingressgateway --namespace istio-system` to get the ingress IP for your `kubectl get svc knative-ingressgateway --namespace istio-system` to get the ingress IP for your
@ -132,6 +134,7 @@ folder) you're ready to build and deploy the sample app.
``` ```
1. To find the URL for your service, use 1. To find the URL for your service, use
``` ```
kubectl get ksvc helloworld-python --output=custom-columns=NAME:.metadata.name,DOMAIN:.status.domain kubectl get ksvc helloworld-python --output=custom-columns=NAME:.metadata.name,DOMAIN:.status.domain
NAME DOMAIN NAME DOMAIN

View File

@ -1,15 +1,15 @@
# Hello World - Ruby sample # Hello World - Ruby sample
A simple web app written in Ruby that you can use for testing. A simple web app written in Ruby that you can use for testing.
It reads in an env variable `TARGET` and prints "Hello ${TARGET}!". If It reads in an env variable `TARGET` and prints "Hello \${TARGET}!". If
TARGET is not specified, it will use "World" as the TARGET. TARGET is not specified, it will use "World" as the TARGET.
## Prerequisites ## Prerequisites
* A Kubernetes cluster with Knative installed. Follow the - A Kubernetes cluster with Knative installed. Follow the
[installation instructions](https://github.com/knative/docs/blob/master/install/README.md) if you need [installation instructions](https://github.com/knative/docs/blob/master/install/README.md) if you need
to create one. to create one.
* [Docker](https://www.docker.com) installed and running on your local machine, - [Docker](https://www.docker.com) installed and running on your local machine,
and a Docker Hub account configured (we'll use it for a container registry). and a Docker Hub account configured (we'll use it for a container registry).
## Steps to recreate the sample code ## Steps to recreate the sample code
@ -20,10 +20,10 @@ The following instructions recreate the source files from this folder.
1. Create a new directory and cd into it: 1. Create a new directory and cd into it:
````shell ```shell
mkdir app mkdir app
cd app cd app
```` ```
1. Create a file named `app.rb` and copy the code block below into it: 1. Create a file named `app.rb` and copy the code block below into it:
@ -126,9 +126,10 @@ you're ready to build and deploy the sample app.
``` ```
1. Now that your service is created, Knative will perform the following steps: 1. Now that your service is created, Knative will perform the following steps:
* Create a new immutable revision for this version of the app.
* Network programming to create a route, ingress, service, and load balance for your app. - Create a new immutable revision for this version of the app.
* Automatically scale your pods up and down (including to zero active pods). - Network programming to create a route, ingress, service, and load balance for your app.
- Automatically scale your pods up and down (including to zero active pods).
1. To find the IP address for your service, use 1. To find the IP address for your service, use
`kubectl get svc knative-ingressgateway --namespace istio-system` to get the ingress IP for your `kubectl get svc knative-ingressgateway --namespace istio-system` to get the ingress IP for your
@ -144,6 +145,7 @@ you're ready to build and deploy the sample app.
``` ```
1. To find the URL for your service, use 1. To find the URL for your service, use
``` ```
kubectl get ksvc helloworld-ruby --output=custom-columns=NAME:.metadata.name,DOMAIN:.status.domain kubectl get ksvc helloworld-ruby --output=custom-columns=NAME:.metadata.name,DOMAIN:.status.domain
NAME DOMAIN NAME DOMAIN

View File

@ -1,16 +1,16 @@
# Hello World - Rust sample # Hello World - Rust sample
A simple web app written in Rust that you can use for testing. A simple web app written in Rust that you can use for testing.
It reads in an env variable `TARGET` and prints "Hello ${TARGET}!". If It reads in an env variable `TARGET` and prints "Hello \${TARGET}!". If
TARGET is not specified, it will use "World" as the TARGET. TARGET is not specified, it will use "World" as the TARGET.
## Prerequisites ## Prerequisites
* A Kubernetes cluster with Knative installed. Follow the - A Kubernetes cluster with Knative installed. Follow the
[installation instructions](https://github.com/knative/docs/blob/master/install/README.md) if you need [installation instructions](https://github.com/knative/docs/blob/master/install/README.md) if you need
to create one. to create one.
* [Docker](https://www.docker.com) installed and running on your local machine, - [Docker](https://www.docker.com) installed and running on your local machine,
and a Docker Hub account configured (we'll use it for a container registry). and a Docker Hub account configured (we'll use it for a container registry).
## Steps to recreate the sample code ## Steps to recreate the sample code
@ -155,9 +155,10 @@ folder) you're ready to build and deploy the sample app.
``` ```
1. Now that your service is created, Knative will perform the following steps: 1. Now that your service is created, Knative will perform the following steps:
* Create a new immutable revision for this version of the app.
* Network programming to create a route, ingress, service, and load balance for your app. - Create a new immutable revision for this version of the app.
* Automatically scale your pods up and down (including to zero active pods). - Network programming to create a route, ingress, service, and load balance for your app.
- Automatically scale your pods up and down (including to zero active pods).
1. To find the IP address for your service, enter 1. To find the IP address for your service, enter
`kubectl get svc knative-ingressgateway --namespace istio-system` to get the ingress IP for your `kubectl get svc knative-ingressgateway --namespace istio-system` to get the ingress IP for your
@ -173,6 +174,7 @@ folder) you're ready to build and deploy the sample app.
``` ```
1. To find the URL for your service, enter: 1. To find the URL for your service, enter:
``` ```
kubectl get ksvc helloworld-rust --output=custom-columns=NAME:.metadata.name,DOMAIN:.status.domain kubectl get ksvc helloworld-rust --output=custom-columns=NAME:.metadata.name,DOMAIN:.status.domain
NAME DOMAIN NAME DOMAIN

View File

@ -2,7 +2,7 @@
Learn how to deploy a simple web app that is written in Java and uses Eclipse Vert.x. Learn how to deploy a simple web app that is written in Java and uses Eclipse Vert.x.
This samples uses Docker to build locally. The app reads in a `TARGET` env variable and then This samples uses Docker to build locally. The app reads in a `TARGET` env variable and then
prints "Hello World: ${TARGET}!". If a value for `TARGET` is not specified, prints "Hello World: \${TARGET}!". If a value for `TARGET` is not specified,
the "NOT SPECIFIED" default value is used. the "NOT SPECIFIED" default value is used.
Use this sample to walk you through the steps of creating and modifying the sample app, building and pushing your Use this sample to walk you through the steps of creating and modifying the sample app, building and pushing your
@ -12,15 +12,15 @@ container image to a registry, and then deploying your app to your Knative clust
You must meet the following requirements to complete this sample: You must meet the following requirements to complete this sample:
* A version of the Knative Serving component installed and running on your Kubernetes cluster. Follow the - A version of the Knative Serving component installed and running on your Kubernetes cluster. Follow the
[Knative installation instructions](https://github.com/knative/docs/blob/master/install/README.md) if you need [Knative installation instructions](https://github.com/knative/docs/blob/master/install/README.md) if you need
to create a Knative cluster. to create a Knative cluster.
* The following software downloaded and install on your loacal machine: - The following software downloaded and install on your loacal machine:
* [Java SE 8 or later JDK](http://www.oracle.com/technetwork/java/javase/downloads/index.html). - [Java SE 8 or later JDK](http://www.oracle.com/technetwork/java/javase/downloads/index.html).
* [Eclipse Vert.x v3.5.4](https://vertx.io/). - [Eclipse Vert.x v3.5.4](https://vertx.io/).
* [Docker](https://www.docker.com) for building and pushing your container image. - [Docker](https://www.docker.com) for building and pushing your container image.
* [curl](https://curl.haxx.se/) to test the sample app after deployment. - [curl](https://curl.haxx.se/) to test the sample app after deployment.
* A [Docker Hub](https://hub.docker.com/) account where you can push your container image. - A [Docker Hub](https://hub.docker.com/) account where you can push your container image.
**Tip**: You can clone the [Knatve/docs repo](https://github.com/knative/docs) and then modify the source files. **Tip**: You can clone the [Knatve/docs repo](https://github.com/knative/docs) and then modify the source files.
Alternatively, learn more by manually creating the files youself. Alternatively, learn more by manually creating the files youself.
@ -187,13 +187,14 @@ To build a container image, push your image to the registry, and then deploy you
``` ```
Result: A service name `helloworld-vertx` is created in your cluster along with the following resources: Result: A service name `helloworld-vertx` is created in your cluster along with the following resources:
* A new immutable revision for the version of the app that you just deployed.
* The following networking resources are created for your app: - A new immutable revision for the version of the app that you just deployed.
* route - The following networking resources are created for your app:
* ingress - route
* service - ingress
* load balancer - service
* Auto scaling is enable to allow your pods to scale up to meet traffic, and also back down to zero when there is no traffic. - load balancer
- Auto scaling is enable to allow your pods to scale up to meet traffic, and also back down to zero when there is no traffic.
## Testing the sample app ## Testing the sample app
@ -215,6 +216,7 @@ an external IP address, especially if your cluster was newly created.
``` ```
1. Retrieve the URL for your service, by running the following `kubectl get` command: 1. Retrieve the URL for your service, by running the following `kubectl get` command:
```shell ```shell
kubectl get services.serving.knative.dev helloworld-vertx --output=custom-columns=NAME:.metadata.name,DOMAIN:.status.domain kubectl get services.serving.knative.dev helloworld-vertx --output=custom-columns=NAME:.metadata.name,DOMAIN:.status.domain
``` ```

View File

@ -22,6 +22,7 @@ to the Login service.
you can modify your hosts file (on Mac or Linux) to map `example.com` to your you can modify your hosts file (on Mac or Linux) to map `example.com` to your
cluster's ingress IP. cluster's ingress IP.
4. Check out the code: 4. Check out the code:
``` ```
go get -d github.com/knative/docs/serving/samples/knative-routing-go go get -d github.com/knative/docs/serving/samples/knative-routing-go
``` ```
@ -31,18 +32,22 @@ go get -d github.com/knative/docs/serving/samples/knative-routing-go
Build the application container and publish it to a container registry: Build the application container and publish it to a container registry:
1. Move into the sample directory: 1. Move into the sample directory:
```shell ```shell
cd $GOPATH/src/github.com/knative/docs cd $GOPATH/src/github.com/knative/docs
``` ```
2. Set your preferred container registry: 2. Set your preferred container registry:
```shell ```shell
export REPO="gcr.io/<YOUR_PROJECT_ID>" export REPO="gcr.io/<YOUR_PROJECT_ID>"
``` ```
This example shows how to use Google Container Registry (GCR). You will need a Google Cloud Project and to enable the [Google Container Registry This example shows how to use Google Container Registry (GCR). You will need a Google Cloud Project and to enable the [Google Container Registry
API](https://console.cloud.google.com/apis/library/containerregistry.googleapis.com). API](https://console.cloud.google.com/apis/library/containerregistry.googleapis.com).
3. Use Docker to build your application container: 3. Use Docker to build your application container:
``` ```
docker build \ docker build \
--tag "${REPO}/serving/samples/knative-routing-go" \ --tag "${REPO}/serving/samples/knative-routing-go" \
@ -50,17 +55,20 @@ docker build \
``` ```
4. Push your container to a container registry: 4. Push your container to a container registry:
``` ```
docker push "${REPO}/serving/samples/knative-routing-go" docker push "${REPO}/serving/samples/knative-routing-go"
``` ```
5. Replace the image reference path with our published image path in the configuration file `serving/samples/knative-routing-go/sample.yaml`: 5. Replace the image reference path with our published image path in the configuration file `serving/samples/knative-routing-go/sample.yaml`:
* Manually replace:
- Manually replace:
`image: github.com/knative/docs/serving/samples/knative-routing-go` with `image: <YOUR_CONTAINER_REGISTRY>/serving/samples/knative-routing-go` `image: github.com/knative/docs/serving/samples/knative-routing-go` with `image: <YOUR_CONTAINER_REGISTRY>/serving/samples/knative-routing-go`
Or Or
* Run this command: - Run this command:
``` ```
perl -pi -e "s@github.com/knative/docs@${REPO}@g" serving/samples/knative-routing-go/sample.yaml perl -pi -e "s@github.com/knative/docs@${REPO}@g" serving/samples/knative-routing-go/sample.yaml
``` ```
@ -68,6 +76,7 @@ docker push "${REPO}/serving/samples/knative-routing-go"
## Deploy the Service ## Deploy the Service
Deploy the Knative Serving sample: Deploy the Knative Serving sample:
``` ```
kubectl apply --filename serving/samples/knative-routing-go/sample.yaml kubectl apply --filename serving/samples/knative-routing-go/sample.yaml
``` ```
@ -78,36 +87,43 @@ A shared Gateway "knative-shared-gateway" is used within Knative service mesh
for serving all incoming traffic. You can inspect it and its corresponding Kubernetes for serving all incoming traffic. You can inspect it and its corresponding Kubernetes
service with: service with:
* Check the shared Gateway: - Check the shared Gateway:
``` ```
kubectl get Gateway --namespace knative-serving --output yaml kubectl get Gateway --namespace knative-serving --output yaml
``` ```
* Check the corresponding Kubernetes service for the shared Gateway: - Check the corresponding Kubernetes service for the shared Gateway:
``` ```
kubectl get svc knative-ingressgateway --namespace istio-system --output yaml kubectl get svc knative-ingressgateway --namespace istio-system --output yaml
``` ```
* Inspect the deployed Knative services with: - Inspect the deployed Knative services with:
``` ```
kubectl get ksvc kubectl get ksvc
``` ```
You should see 2 Knative services: `search-service` and `login-service`. You should see 2 Knative services: `search-service` and `login-service`.
### Access the Services ### Access the Services
1. Find the shared Gateway IP and export as an environment variable: 1. Find the shared Gateway IP and export as an environment variable:
```shell ```shell
export GATEWAY_IP=`kubectl get svc knative-ingressgateway --namespace istio-system \ export GATEWAY_IP=`kubectl get svc knative-ingressgateway --namespace istio-system \
--output jsonpath="{.status.loadBalancer.ingress[*]['ip']}"` --output jsonpath="{.status.loadBalancer.ingress[*]['ip']}"`
``` ```
2. Find the `Search` service route and export as an environment variable: 2. Find the `Search` service route and export as an environment variable:
```shell ```shell
export SERVICE_HOST=`kubectl get route search-service --output jsonpath="{.status.domain}"` export SERVICE_HOST=`kubectl get route search-service --output jsonpath="{.status.domain}"`
``` ```
3. Make a curl request to the service: 3. Make a curl request to the service:
```shell ```shell
curl http://${GATEWAY_IP} --header "Host:${SERVICE_HOST}" curl http://${GATEWAY_IP} --header "Host:${SERVICE_HOST}"
``` ```
@ -115,6 +131,7 @@ curl http://${GATEWAY_IP} --header "Host:${SERVICE_HOST}"
You should see: `Search Service is called !` You should see: `Search Service is called !`
4. Similarly, you can also directly access "Login" service with: 4. Similarly, you can also directly access "Login" service with:
```shell ```shell
export SERVICE_HOST=`kubectl get route login-service --output jsonpath="{.status.domain}"` export SERVICE_HOST=`kubectl get route login-service --output jsonpath="{.status.domain}"`
``` ```
@ -128,22 +145,24 @@ You should see: `Login Service is called !`
## Apply Custom Routing Rule ## Apply Custom Routing Rule
1. Apply the custom routing rules defined in `routing.yaml` file with: 1. Apply the custom routing rules defined in `routing.yaml` file with:
``` ```
kubectl apply --filename serving/samples/knative-routing-go/routing.yaml kubectl apply --filename serving/samples/knative-routing-go/routing.yaml
``` ```
2. The `routing.yaml` file will generate a new VirtualService `entry-route` for 2. The `routing.yaml` file will generate a new VirtualService `entry-route` for
domain `example.com`. View the VirtualService: domain `example.com`. View the VirtualService:
``` ```
kubectl get VirtualService entry-route --output yaml kubectl get VirtualService entry-route --output yaml
``` ```
3. Send a request to the `Search` service and the `Login` service by using 3. Send a request to the `Search` service and the `Login` service by using
corresponding URIs. You should get the same results as directly accessing these services. corresponding URIs. You should get the same results as directly accessing these services.
* Get the ingress IP: _ Get the ingress IP:
```shell ```shell
export GATEWAY_IP=`kubectl get svc knative-ingressgateway --namespace istio-system \ export GATEWAY_IP=`kubectl get svc knative-ingressgateway --namespace istio-system \
--output jsonpath="{.status.loadBalancer.ingress[*]['ip']}"` --output jsonpath="{.status.loadBalancer.ingress[_]['ip']}"`
``` ```
* Send a request to the Search service: * Send a request to the Search service:
@ -169,10 +188,10 @@ Gateway again. The Gateway proxy checks the updated host, and forwards it to
![Object model](images/knative-routing-sample-flow.png) ![Object model](images/knative-routing-sample-flow.png)
## Clean Up ## Clean Up
To clean up the sample resources: To clean up the sample resources:
``` ```
kubectl delete --filename serving/samples/knative-routing-go/sample.yaml kubectl delete --filename serving/samples/knative-routing-go/sample.yaml
kubectl delete --filename serving/samples/knative-routing-go/routing.yaml kubectl delete --filename serving/samples/knative-routing-go/routing.yaml

View File

@ -8,6 +8,7 @@ This sample demonstrates creating a simple RESTful service. The exposed endpoint
2. Install [Docker](https://docs.docker.com/get-started/#prepare-your-docker-environment). 2. Install [Docker](https://docs.docker.com/get-started/#prepare-your-docker-environment).
3. You need to [configure outbound network access](https://github.com/knative/docs/blob/master/serving/outbound-network-access.md) because this application makes an external API request. 3. You need to [configure outbound network access](https://github.com/knative/docs/blob/master/serving/outbound-network-access.md) because this application makes an external API request.
4. Check out the code: 4. Check out the code:
``` ```
go get -d github.com/knative/docs/serving/samples/rest-api-go go get -d github.com/knative/docs/serving/samples/rest-api-go
``` ```
@ -17,18 +18,22 @@ go get -d github.com/knative/docs/serving/samples/rest-api-go
Build the application container and publish it to a container registry: Build the application container and publish it to a container registry:
1. Move into the sample directory: 1. Move into the sample directory:
``` ```
cd $GOPATH/src/github.com/knative/docs cd $GOPATH/src/github.com/knative/docs
``` ```
2. Set your preferred container registry: 2. Set your preferred container registry:
``` ```
export REPO="gcr.io/<YOUR_PROJECT_ID>" export REPO="gcr.io/<YOUR_PROJECT_ID>"
``` ```
To run the sample, you need to have a Google Cloud Platform project, and you also need to enable the [Google Container Registry To run the sample, you need to have a Google Cloud Platform project, and you also need to enable the [Google Container Registry
API](https://console.cloud.google.com/apis/library/containerregistry.googleapis.com). API](https://console.cloud.google.com/apis/library/containerregistry.googleapis.com).
3. Use Docker to build your application container: 3. Use Docker to build your application container:
``` ```
docker build \ docker build \
--tag "${REPO}/serving/samples/rest-api-go" \ --tag "${REPO}/serving/samples/rest-api-go" \
@ -36,17 +41,20 @@ docker build \
``` ```
4. Push your container to a container registry: 4. Push your container to a container registry:
``` ```
docker push "${REPO}/serving/samples/rest-api-go" docker push "${REPO}/serving/samples/rest-api-go"
``` ```
5. Replace the image reference path with our published image path in the configuration files (`serving/samples/rest-api-go/sample.yaml`: 5. Replace the image reference path with our published image path in the configuration files (`serving/samples/rest-api-go/sample.yaml`:
* Manually replace:
- Manually replace:
`image: github.com/knative/docs/serving/samples/rest-api-go` with `image: <YOUR_CONTAINER_REGISTRY>/serving/samples/rest-api-go` `image: github.com/knative/docs/serving/samples/rest-api-go` with `image: <YOUR_CONTAINER_REGISTRY>/serving/samples/rest-api-go`
Or Or
* Use run this command: - Use run this command:
``` ```
perl -pi -e "s@github.com/knative/docs@${REPO}@g" serving/samples/rest-api-go/sample.yaml perl -pi -e "s@github.com/knative/docs@${REPO}@g" serving/samples/rest-api-go/sample.yaml
``` ```
@ -54,6 +62,7 @@ docker push "${REPO}/serving/samples/rest-api-go"
## Deploy the Configuration ## Deploy the Configuration
Deploy the Knative Serving sample: Deploy the Knative Serving sample:
``` ```
kubectl apply --filename serving/samples/rest-api-go/sample.yaml kubectl apply --filename serving/samples/rest-api-go/sample.yaml
``` ```
@ -62,17 +71,20 @@ kubectl apply --filename serving/samples/rest-api-go/sample.yaml
Inspect the created resources with the `kubectl` commands: Inspect the created resources with the `kubectl` commands:
* View the created Route resource: - View the created Route resource:
``` ```
kubectl get route --output yaml kubectl get route --output yaml
``` ```
* View the created Configuration resource: - View the created Configuration resource:
``` ```
kubectl get configurations --output yaml kubectl get configurations --output yaml
``` ```
* View the Revision that was created by our Configuration: - View the Revision that was created by our Configuration:
``` ```
kubectl get revisions --output yaml kubectl get revisions --output yaml
``` ```
@ -82,6 +94,7 @@ kubectl get revisions --output yaml
To access this service via `curl`, you need to determine its ingress address. To access this service via `curl`, you need to determine its ingress address.
1. To determine if your service is ready: 1. To determine if your service is ready:
``` ```
kubectl get svc knative-ingressgateway --namespace istio-system --watch kubectl get svc knative-ingressgateway --namespace istio-system --watch
``` ```
@ -94,14 +107,16 @@ To access this service via `curl`, you need to determine its ingress address.
``` ```
2. When the service is ready, export the ingress hostname and IP as environment variables: 2. When the service is ready, export the ingress hostname and IP as environment variables:
``` ```
export SERVICE_HOST=`kubectl get route stock-route-example --output jsonpath="{.status.domain}"` export SERVICE_HOST=`kubectl get route stock-route-example --output jsonpath="{.status.domain}"`
export SERVICE_IP=`kubectl get svc knative-ingressgateway --namespace istio-system \ export SERVICE_IP=`kubectl get svc knative-ingressgateway --namespace istio-system \
--output jsonpath="{.status.loadBalancer.ingress[*].ip}"` --output jsonpath="{.status.loadBalancer.ingress[*].ip}"`
``` ```
* If your cluster is running outside a cloud provider (for example on Minikube), - If your cluster is running outside a cloud provider (for example on Minikube),
your services will never get an external IP address. In that case, use the istio `hostIP` and `nodePort` as the service IP: your services will never get an external IP address. In that case, use the istio `hostIP` and `nodePort` as the service IP:
``` ```
export SERVICE_IP=$(kubectl get po --selector knative=ingressgateway --namespace istio-system \ export SERVICE_IP=$(kubectl get po --selector knative=ingressgateway --namespace istio-system \
--output 'jsonpath={.items[0].status.hostIP}'):$(kubectl get svc knative-ingressgateway --namespace istio-system \ --output 'jsonpath={.items[0].status.hostIP}'):$(kubectl get svc knative-ingressgateway --namespace istio-system \
@ -109,28 +124,35 @@ To access this service via `curl`, you need to determine its ingress address.
``` ```
3. Now use `curl` to make a request to the service: 3. Now use `curl` to make a request to the service:
* Make a request to the index endpoint:
- Make a request to the index endpoint:
``` ```
curl --header "Host:$SERVICE_HOST" http://${SERVICE_IP} curl --header "Host:$SERVICE_HOST" http://${SERVICE_IP}
``` ```
Response body: `Welcome to the stock app!` Response body: `Welcome to the stock app!`
* Make a request to the `/stock` endpoint: - Make a request to the `/stock` endpoint:
``` ```
curl --header "Host:$SERVICE_HOST" http://${SERVICE_IP}/stock curl --header "Host:$SERVICE_HOST" http://${SERVICE_IP}/stock
``` ```
Response body: `stock ticker not found!, require /stock/{ticker}` Response body: `stock ticker not found!, require /stock/{ticker}`
* Make a request to the `/stock` endpoint with a `ticker` parameter: - Make a request to the `/stock` endpoint with a `ticker` parameter:
``` ```
curl --header "Host:$SERVICE_HOST" http://${SERVICE_IP}/stock/<ticker> curl --header "Host:$SERVICE_HOST" http://${SERVICE_IP}/stock/<ticker>
``` ```
Response body: `stock price for ticker <ticker> is <price>`
Response body: `stock price for ticker <ticker> is <price>`
## Clean Up ## Clean Up
To clean up the sample service: To clean up the sample service:
``` ```
kubectl delete --filename serving/samples/rest-api-go/sample.yaml kubectl delete --filename serving/samples/rest-api-go/sample.yaml
``` ```

View File

@ -10,10 +10,10 @@ components of Knative to orchestrate an end-to-end deployment.
You need: You need:
* A Kubernetes cluster with Knative installed. Follow the - A Kubernetes cluster with Knative installed. Follow the
[installation instructions](https://github.com/knative/docs/blob/master/install/README.md) if you need [installation instructions](https://github.com/knative/docs/blob/master/install/README.md) if you need
to create one. to create one.
* Go installed and configured. This is optional, and only required if you want to run the sample app - Go installed and configured. This is optional, and only required if you want to run the sample app
locally. locally.
## Configuring Knative ## Configuring Knative
@ -74,7 +74,6 @@ available, but these are the key steps:
1. Create a new `Service Account` manifest which is used to link the build process to the secret. 1. Create a new `Service Account` manifest which is used to link the build process to the secret.
Save this file as `service-account.yaml`: Save this file as `service-account.yaml`:
```yaml ```yaml
apiVersion: v1 apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
@ -93,7 +92,6 @@ available, but these are the key steps:
serviceaccount "build-bot" created serviceaccount "build-bot" created
``` ```
## Deploying the sample ## Deploying the sample
Now that you've configured your cluster accordingly, you are ready to deploy the Now that you've configured your cluster accordingly, you are ready to deploy the
@ -196,11 +194,12 @@ container for the application.
``` ```
1. Now that your service is created, Knative will perform the following steps: 1. Now that your service is created, Knative will perform the following steps:
* Fetch the revision specified from GitHub and build it into a container
* Push the container to Docker Hub - Fetch the revision specified from GitHub and build it into a container
* Create a new immutable revision for this version of the app. - Push the container to Docker Hub
* Network programming to create a route, ingress, service, and load balance for your app. - Create a new immutable revision for this version of the app.
* Automatically scale your pods up and down (including to zero active pods). - Network programming to create a route, ingress, service, and load balance for your app.
- Automatically scale your pods up and down (including to zero active pods).
1. To get the ingress IP for your cluster, use the following command. If your cluster is new, 1. To get the ingress IP for your cluster, use the following command. If your cluster is new,
it can take some time for the service to get an external IP address: it can take some time for the service to get an external IP address:

View File

@ -12,12 +12,16 @@ using the default installation.
1. A Kubernetes cluster with [Knative Serving](https://github.com/knative/docs/blob/master/install/README.md) 1. A Kubernetes cluster with [Knative Serving](https://github.com/knative/docs/blob/master/install/README.md)
installed. installed.
2. Check if Knative monitoring components are installed: 2. Check if Knative monitoring components are installed:
``` ```
kubectl get pods --namespace knative-monitoring kubectl get pods --namespace knative-monitoring
``` ```
* If pods aren't found, install [Knative monitoring component](../../installing-logging-metrics-traces.md).
- If pods aren't found, install [Knative monitoring component](../../installing-logging-metrics-traces.md).
3. Install [Docker](https://docs.docker.com/get-started/#prepare-your-docker-environment). 3. Install [Docker](https://docs.docker.com/get-started/#prepare-your-docker-environment).
4. Check out the code: 4. Check out the code:
``` ```
go get -d github.com/knative/docs/serving/samples/telemetry-go go get -d github.com/knative/docs/serving/samples/telemetry-go
``` ```
@ -27,19 +31,23 @@ go get -d github.com/knative/docs/serving/samples/telemetry-go
Build the application container and publish it to a container registry: Build the application container and publish it to a container registry:
1. Move into the sample directory: 1. Move into the sample directory:
``` ```
cd $GOPATH/src/github.com/knative/docs cd $GOPATH/src/github.com/knative/docs
``` ```
2. Set your preferred container registry: 2. Set your preferred container registry:
``` ```
export REPO="gcr.io/<YOUR_PROJECT_ID>" export REPO="gcr.io/<YOUR_PROJECT_ID>"
``` ```
This example shows how to use Google Container Registry (GCR). You will need This example shows how to use Google Container Registry (GCR). You will need
a Google Cloud Project and to enable the [Google Container Registry a Google Cloud Project and to enable the [Google Container Registry
API](https://console.cloud.google.com/apis/library/containerregistry.googleapis.com). API](https://console.cloud.google.com/apis/library/containerregistry.googleapis.com).
3. Use Docker to build your application container: 3. Use Docker to build your application container:
``` ```
docker build \ docker build \
--tag "${REPO}/serving/samples/telemetry-go" \ --tag "${REPO}/serving/samples/telemetry-go" \
@ -47,19 +55,24 @@ docker build \
``` ```
4. Push your container to a container registry: 4. Push your container to a container registry:
``` ```
docker push "${REPO}/serving/samples/telemetry-go" docker push "${REPO}/serving/samples/telemetry-go"
``` ```
5. Replace the image reference path with our published image path in the 5. Replace the image reference path with our published image path in the
configuration file (`serving/samples/telemetry-go/sample.yaml`): configuration file (`serving/samples/telemetry-go/sample.yaml`):
* Manually replace:
- Manually replace:
`image: github.com/knative/docs/serving/samples/telemetry-go` with `image: github.com/knative/docs/serving/samples/telemetry-go` with
`image: <YOUR_CONTAINER_REGISTRY>/serving/samples/telemetry-go` `image: <YOUR_CONTAINER_REGISTRY>/serving/samples/telemetry-go`
Or Or
* Use run this command: - Use run this command:
``` ```
perl -pi -e "s@github.com/knative/docs@${REPO}@g" serving/samples/telemetry-go/sample.yaml perl -pi -e "s@github.com/knative/docs@${REPO}@g" serving/samples/telemetry-go/sample.yaml
``` ```
@ -67,6 +80,7 @@ configuration file (`serving/samples/telemetry-go/sample.yaml`):
## Deploy the Service ## Deploy the Service
Deploy this application to Knative Serving: Deploy this application to Knative Serving:
``` ```
kubectl apply --filename serving/samples/telemetry-go/ kubectl apply --filename serving/samples/telemetry-go/
``` ```
@ -75,17 +89,20 @@ kubectl apply --filename serving/samples/telemetry-go/
Inspect the created resources with the `kubectl` commands: Inspect the created resources with the `kubectl` commands:
* View the created Route resource: - View the created Route resource:
``` ```
kubectl get route --output yaml kubectl get route --output yaml
``` ```
* View the created Configuration resource: - View the created Configuration resource:
``` ```
kubectl get configurations --output yaml kubectl get configurations --output yaml
``` ```
* View the Revision that was created by the Configuration: - View the Revision that was created by the Configuration:
``` ```
kubectl get revisions --output yaml kubectl get revisions --output yaml
``` ```
@ -96,22 +113,28 @@ To access this service via `curl`, you need to determine its ingress address.
1. To determine if your service is ready: 1. To determine if your service is ready:
Check the status of your Knative gateway: Check the status of your Knative gateway:
``` ```
kubectl get svc knative-ingressgateway --namespace istio-system --watch kubectl get svc knative-ingressgateway --namespace istio-system --watch
``` ```
When the service is ready, you'll see an IP address in the `EXTERNAL-IP` field: When the service is ready, you'll see an IP address in the `EXTERNAL-IP` field:
``` ```
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
knative-ingressgateway LoadBalancer 10.23.247.74 35.203.155.229 80:32380/TCP,443:32390/TCP,32400:32400/TCP 2d knative-ingressgateway LoadBalancer 10.23.247.74 35.203.155.229 80:32380/TCP,443:32390/TCP,32400:32400/TCP 2d
``` ```
CTRL+C to end watch. CTRL+C to end watch.
Check the status of your route: Check the status of your route:
``` ```
kubectl get route --output yaml kubectl get route --output yaml
``` ```
When the route is ready, you'll see the following fields reported as: When the route is ready, you'll see the following fields reported as:
```YAML ```YAML
status: status:
conditions: conditions:
@ -123,33 +146,40 @@ To access this service via `curl`, you need to determine its ingress address.
2. Export the ingress hostname and IP as environment 2. Export the ingress hostname and IP as environment
variables: variables:
``` ```
export SERVICE_HOST=`kubectl get route telemetrysample-route --output jsonpath="{.status.domain}"` export SERVICE_HOST=`kubectl get route telemetrysample-route --output jsonpath="{.status.domain}"`
export SERVICE_IP=`kubectl get svc knative-ingressgateway --namespace istio-system --output jsonpath="{.status.loadBalancer.ingress[*].ip}"` export SERVICE_IP=`kubectl get svc knative-ingressgateway --namespace istio-system --output jsonpath="{.status.loadBalancer.ingress[*].ip}"`
``` ```
3. Make a request to the service to see the `Hello World!` message: 3. Make a request to the service to see the `Hello World!` message:
``` ```
curl --header "Host:$SERVICE_HOST" http://${SERVICE_IP} curl --header "Host:$SERVICE_HOST" http://${SERVICE_IP}
``` ```
4. Make a request to the `/log` endpoint to generate logs to the `stdout` file 4. Make a request to the `/log` endpoint to generate logs to the `stdout` file
and generate files under `/var/log` in both `JSON` and plain text formats: and generate files under `/var/log` in both `JSON` and plain text formats:
``` ```
curl --header "Host:$SERVICE_HOST" http://${SERVICE_IP}/log curl --header "Host:$SERVICE_HOST" http://${SERVICE_IP}/log
``` ```
## Access Logs ## Access Logs
You can access to the logs from Kibana UI - see [Logs](../../accessing-logs.md) You can access to the logs from Kibana UI - see [Logs](../../accessing-logs.md)
for more information. for more information.
## Access per Request Traces ## Access per Request Traces
You can access to per request traces from Zipkin UI - see [Traces](../../accessing-traces.md) You can access to per request traces from Zipkin UI - see [Traces](../../accessing-traces.md)
for more information. for more information.
## Accessing Custom Metrics ## Accessing Custom Metrics
You can see published metrics using Prometheus UI. To access to the UI, forward You can see published metrics using Prometheus UI. To access to the UI, forward
the Prometheus server to your machine: the Prometheus server to your machine:
``` ```
kubectl port-forward $(kubectl get pods --selector=app=prometheus,prometheus=test --output=jsonpath="{.items[0].metadata.name}") 9090 kubectl port-forward $(kubectl get pods --selector=app=prometheus,prometheus=test --output=jsonpath="{.items[0].metadata.name}") 9090
``` ```
@ -159,6 +189,7 @@ Then browse to http://localhost:9090.
## Clean up ## Clean up
To clean up the sample service: To clean up the sample service:
``` ```
kubectl delete --filename serving/samples/telemetry-go/ kubectl delete --filename serving/samples/telemetry-go/
``` ```

View File

@ -7,11 +7,12 @@ generates its thumbnail image using the `ffmpeg` framework.
## Before you begin ## Before you begin
* [Install Knative Serving](../../../install/README.md) - [Install Knative Serving](../../../install/README.md)
If you want to test and run the app locally: If you want to test and run the app locally:
* [Install Go](https://golang.org/doc/install)
* [Download `ffmpeg`](https://www.ffmpeg.org/download.html) - [Install Go](https://golang.org/doc/install)
- [Download `ffmpeg`](https://www.ffmpeg.org/download.html)
## Sample code ## Sample code
@ -114,7 +115,6 @@ kubectl apply --filename https://raw.githubusercontent.com/knative/build-templat
kubectl apply --filename sample.yaml kubectl apply --filename sample.yaml
``` ```
Now, if you look at the `status` of the revision, you will see that a build is in progress: Now, if you look at the `status` of the revision, you will see that a build is in progress:
```shell ```shell
@ -134,7 +134,6 @@ items:
Once `BuildComplete` has a `status: "True"`, the revision will be deployed. Once `BuildComplete` has a `status: "True"`, the revision will be deployed.
## Using the app ## Using the app
To confirm that the app deployed, you can check for the Knative Serving service using `kubectl`. To confirm that the app deployed, you can check for the Knative Serving service using `kubectl`.

View File

@ -12,51 +12,62 @@ to illustrate applying a revision, then using that revision for manual traffic s
This section describes how to create an revision by deploying a new configuration. This section describes how to create an revision by deploying a new configuration.
1. Replace the image reference path with our published image path in the configuration files (`serving/samples/traffic-splitting/updated_configuration.yaml`: 1. Replace the image reference path with our published image path in the configuration files (`serving/samples/traffic-splitting/updated_configuration.yaml`:
* Manually replace:
- Manually replace:
`image: github.com/knative/docs/serving/samples/rest-api-go` with `image: <YOUR_CONTAINER_REGISTRY>/serving/samples/rest-api-go` `image: github.com/knative/docs/serving/samples/rest-api-go` with `image: <YOUR_CONTAINER_REGISTRY>/serving/samples/rest-api-go`
Or Or
* Use run this command: - Use run this command:
``` ```
perl -pi -e "s@github.com/knative/docs@${REPO}@g" serving/samples/rest-api-go/updated_configuration.yaml perl -pi -e "s@github.com/knative/docs@${REPO}@g" serving/samples/rest-api-go/updated_configuration.yaml
``` ```
2. Deploy the new configuration to update the `RESOURCE` environment variable 2. Deploy the new configuration to update the `RESOURCE` environment variable
from `stock` to `share`: from `stock` to `share`:
``` ```
kubectl apply --filename serving/samples/traffic-splitting/updated_configuration.yaml kubectl apply --filename serving/samples/traffic-splitting/updated_configuration.yaml
``` ```
3. Once deployed, traffic will shift to the new revision automatically. Verify the deployment by checking the route status: 3. Once deployed, traffic will shift to the new revision automatically. Verify the deployment by checking the route status:
``` ```
kubectl get route --output yaml kubectl get route --output yaml
``` ```
4. When the new route is ready, you can access the new endpoints: 4. When the new route is ready, you can access the new endpoints:
The hostname and IP address can be found in the same manner as the [Creating a RESTful Service](../rest-api-go) sample: The hostname and IP address can be found in the same manner as the [Creating a RESTful Service](../rest-api-go) sample:
``` ```
export SERVICE_HOST=`kubectl get route stock-route-example --output jsonpath="{.status.domain}"` export SERVICE_HOST=`kubectl get route stock-route-example --output jsonpath="{.status.domain}"`
export SERVICE_IP=`kubectl get svc knative-ingressgateway --namespace istio-system \ export SERVICE_IP=`kubectl get svc knative-ingressgateway --namespace istio-system \
--output jsonpath="{.status.loadBalancer.ingress[*].ip}"` --output jsonpath="{.status.loadBalancer.ingress[*].ip}"`
``` ```
* Make a request to the index endpoint: - Make a request to the index endpoint:
``` ```
curl --header "Host:$SERVICE_HOST" http://${SERVICE_IP} curl --header "Host:$SERVICE_HOST" http://${SERVICE_IP}
``` ```
Response body: `Welcome to the share app!` Response body: `Welcome to the share app!`
* Make a request to the `/share` endpoint: - Make a request to the `/share` endpoint:
``` ```
curl --header "Host:$SERVICE_HOST" http://${SERVICE_IP}/share curl --header "Host:$SERVICE_HOST" http://${SERVICE_IP}/share
``` ```
Response body: `share ticker not found!, require /share/{ticker}` Response body: `share ticker not found!, require /share/{ticker}`
* Make a request to the `/share` endpoint with a `ticker` parameter: - Make a request to the `/share` endpoint with a `ticker` parameter:
``` ```
curl --header "Host:$SERVICE_HOST" http://${SERVICE_IP}/share/<ticker> curl --header "Host:$SERVICE_HOST" http://${SERVICE_IP}/share/<ticker>
``` ```
Response body: `share price for ticker <ticker> is <price>` Response body: `share price for ticker <ticker> is <price>`
## Manual Traffic Splitting ## Manual Traffic Splitting
@ -64,9 +75,11 @@ kubectl get route --output yaml
This section describes how to manually split traffic to specific revisions. This section describes how to manually split traffic to specific revisions.
1. Get your revisions names via: 1. Get your revisions names via:
``` ```
kubectl get revisions kubectl get revisions
``` ```
``` ```
NAME AGE NAME AGE
stock-configuration-example-00001 11m stock-configuration-example-00001 11m
@ -74,6 +87,7 @@ stock-configuration-example-00002 4m
``` ```
2. Update the `traffic` list in `serving/samples/rest-api-go/sample.yaml` as: 2. Update the `traffic` list in `serving/samples/rest-api-go/sample.yaml` as:
```yaml ```yaml
traffic: traffic:
- revisionName: <YOUR_FIRST_REVISION_NAME> - revisionName: <YOUR_FIRST_REVISION_NAME>
@ -83,14 +97,17 @@ traffic:
``` ```
3. Deploy your traffic revision: 3. Deploy your traffic revision:
``` ```
kubectl apply --filename serving/samples/rest-api-go/sample.yaml kubectl apply --filename serving/samples/rest-api-go/sample.yaml
``` ```
4. Verify the deployment by checking the route status: 4. Verify the deployment by checking the route status:
``` ```
kubectl get route --output yaml kubectl get route --output yaml
``` ```
Once updated, you can make `curl` requests to the API using either `stock` or `share` Once updated, you can make `curl` requests to the API using either `stock` or `share`
endpoints. endpoints.

View File

@ -73,16 +73,18 @@ You can also apply an updated domain configuration:
> the configuration map and automatically update the host name for all of the deployed > the configuration map and automatically update the host name for all of the deployed
> services and routes. > services and routes.
Deploy an app (for example, [`helloworld-go`](./samples/helloworld-go/README.md)), to Deploy an app (for example, [`helloworld-go`](./samples/helloworld-go/README.md)), to
your cluster as normal. You can check the customized domain in Knative Route "helloworld-go" with your cluster as normal. You can check the customized domain in Knative Route "helloworld-go" with
the following command: the following command:
```shell ```shell
kubectl get route helloworld-go --output jsonpath="{.status.domain}" kubectl get route helloworld-go --output jsonpath="{.status.domain}"
``` ```
You should see the full customized domain: `helloworld-go.default.mydomain.com`. You should see the full customized domain: `helloworld-go.default.mydomain.com`.
And you can check the IP address of your Knative gateway by running: And you can check the IP address of your Knative gateway by running:
```shell ```shell
kubectl get svc knative-ingressgateway --namespace istio-system --output jsonpath="{.status.loadBalancer.ingress[*]['ip']}" kubectl get svc knative-ingressgateway --namespace istio-system --output jsonpath="{.status.loadBalancer.ingress[*]['ip']}"
``` ```
@ -103,6 +105,7 @@ export DOMAIN_NAME=`kubectl get route helloworld-go --output jsonpath="{.status.
echo -e "$GATEWAY_IP\t$DOMAIN_NAME" | sudo tee -a /etc/hosts echo -e "$GATEWAY_IP\t$DOMAIN_NAME" | sudo tee -a /etc/hosts
``` ```
You can now access your domain from the browser in your machine and do some quick checks. You can now access your domain from the browser in your machine and do some quick checks.
## Publish your Domain ## Publish your Domain
@ -119,7 +122,7 @@ so that the gateway IP does not change each time your cluster is restarted.
To publish your domain, you need to update your DNS provider to point to the To publish your domain, you need to update your DNS provider to point to the
IP address for your service ingress. IP address for your service ingress.
* Create a [wildcard record](https://support.google.com/domains/answer/4633759) - Create a [wildcard record](https://support.google.com/domains/answer/4633759)
for the namespace and custom domain to the ingress IP Address, which would enable for the namespace and custom domain to the ingress IP Address, which would enable
hostnames for multiple services in the same namespace to work without creating hostnames for multiple services in the same namespace to work without creating
additional DNS entries. additional DNS entries.
@ -128,7 +131,7 @@ IP address for your service ingress.
*.default.mydomain.com 59 IN A 35.237.28.44 *.default.mydomain.com 59 IN A 35.237.28.44
``` ```
* Create an A record to point from the fully qualified domain name to the IP - Create an A record to point from the fully qualified domain name to the IP
address of your Knative gateway. This step needs to be done for each Knative Service or address of your Knative gateway. This step needs to be done for each Knative Service or
Route created. Route created.
@ -139,7 +142,6 @@ IP address for your service ingress.
If you are using Google Cloud DNS, you can find step-by-step instructions If you are using Google Cloud DNS, you can find step-by-step instructions
in the [Cloud DNS quickstart](https://cloud.google.com/dns/quickstart). in the [Cloud DNS quickstart](https://cloud.google.com/dns/quickstart).
Once the domain update has propagated, you can access your app using Once the domain update has propagated, you can access your app using
the fully qualified domain name of the deployed route, for example the fully qualified domain name of the deployed route, for example
`http://helloworld-go.default.mydomain.com` `http://helloworld-go.default.mydomain.com`

View File

@ -53,13 +53,13 @@ spec:
knative: ingressgateway knative: ingressgateway
servers: servers:
- hosts: - hosts:
- '*' - "*"
port: port:
name: http name: http
number: 80 number: 80
protocol: HTTP protocol: HTTP
- hosts: - hosts:
- '*' - "*"
port: port:
name: https name: https
number: 443 number: 443
@ -107,6 +107,7 @@ To install cert-manager into your cluster, use kubectl to apply the cert-manager
``` ```
kubectl apply --filename https://raw.githubusercontent.com/jetstack/cert-manager/release-0.5/contrib/manifests/cert-manager/with-rbac.yaml kubectl apply --filename https://raw.githubusercontent.com/jetstack/cert-manager/release-0.5/contrib/manifests/cert-manager/with-rbac.yaml
``` ```
or see the [cert-manager docs](https://cert-manager.readthedocs.io/en/latest/getting-started/) for more ways to install and customize. or see the [cert-manager docs](https://cert-manager.readthedocs.io/en/latest/getting-started/) for more ways to install and customize.
### Configure cert-manager for your DNS provider ### Configure cert-manager for your DNS provider
@ -119,8 +120,7 @@ is only supported by a [small number of DNS providers through cert-manager](http
Instructions for configuring cert-manager are provided for the following DNS hosts: Instructions for configuring cert-manager are provided for the following DNS hosts:
* [Google Cloud DNS](using-cert-manager-on-gcp.md) - [Google Cloud DNS](using-cert-manager-on-gcp.md)
--- ---

View File

@ -12,6 +12,7 @@ to their zone to prove ownership. Other challenge types are not currently suppor
Knative. Knative.
## Creating a Cloud DNS service account ## Creating a Cloud DNS service account
To add the TXT record, configure Knative with a service account To add the TXT record, configure Knative with a service account
that can be used by cert-manager to create and update the DNS record. that can be used by cert-manager to create and update the DNS record.
@ -174,6 +175,7 @@ kubectl get certificate --namespace istio-system my-certificate --output yaml
``` ```
Verify that its `Status.Conditions` have `Ready=True`. For example: Verify that its `Status.Conditions` have `Ready=True`. For example:
```yaml ```yaml
status: status:
acme: acme:
@ -186,6 +188,7 @@ status:
status: "True" status: "True"
type: Ready type: Ready
``` ```
A condition with `Ready=False` is a failure to obtain certificate, and such A condition with `Ready=False` is a failure to obtain certificate, and such
condition usually has an error message to indicate the reason of failure. condition usually has an error message to indicate the reason of failure.
@ -230,4 +233,3 @@ EOF
Now you can access your services via HTTPS; cert-manager will keep your certificates Now you can access your services via HTTPS; cert-manager will keep your certificates
up-to-date, replacing them before the certificate expires. up-to-date, replacing them before the certificate expires.

View File

@ -18,11 +18,14 @@ of publishing the Knative domain.
1. [Knative Serving](https://github.com/knative/docs/blob/master/install/README.md) installed on your cluster. 1. [Knative Serving](https://github.com/knative/docs/blob/master/install/README.md) installed on your cluster.
1. A public domain that will be used in Knative. 1. A public domain that will be used in Knative.
1. Knative configured to use your custom domain. 1. Knative configured to use your custom domain.
```shell ```shell
kubectl edit cm config-domain --namespace knative-serving kubectl edit cm config-domain --namespace knative-serving
``` ```
This command opens your default text editor and allows you to edit the config This command opens your default text editor and allows you to edit the config
map. map.
``` ```
apiVersion: v1 apiVersion: v1
data: data:
@ -30,9 +33,11 @@ data:
kind: ConfigMap kind: ConfigMap
[...] [...]
``` ```
Edit the file to replace `example.com` with the domain you'd like to use and Edit the file to replace `example.com` with the domain you'd like to use and
save your changes. In this example, we use domain `external-dns-test.my-org.do` save your changes. In this example, we use domain `external-dns-test.my-org.do`
for all routes: for all routes:
``` ```
apiVersion: v1 apiVersion: v1
data: data:
@ -63,23 +68,29 @@ A DNS zone which will contain the managed DNS records needs to be created.
Assume your custom domain is `external-dns-test.my-org.do`. Assume your custom domain is `external-dns-test.my-org.do`.
Use the following command to create a DNS zone with [Google Cloud DNS](https://cloud.google.com/dns/): Use the following command to create a DNS zone with [Google Cloud DNS](https://cloud.google.com/dns/):
```shell ```shell
gcloud dns managed-zones create "external-dns-zone" \ gcloud dns managed-zones create "external-dns-zone" \
--dns-name "external-dns-test.my-org.do." \ --dns-name "external-dns-test.my-org.do." \
--description "Automatically managed zone by kubernetes.io/external-dns" --description "Automatically managed zone by kubernetes.io/external-dns"
``` ```
Make a note of the nameservers that were assigned to your new zone. Make a note of the nameservers that were assigned to your new zone.
```shell ```shell
gcloud dns record-sets list \ gcloud dns record-sets list \
--zone "external-dns-zone" \ --zone "external-dns-zone" \
--name "external-dns-test.my-org.do." \ --name "external-dns-test.my-org.do." \
--type NS --type NS
``` ```
You should see output similar to the following: You should see output similar to the following:
``` ```
NAME TYPE TTL DATA NAME TYPE TTL DATA
external-dns-test.my-org.do. NS 21600 ns-cloud-e1.googledomains.com.,ns-cloud-e2.googledomains.com.,ns-cloud-e3.googledomains.com.,ns-cloud-e4.googledomains.com. external-dns-test.my-org.do. NS 21600 ns-cloud-e1.googledomains.com.,ns-cloud-e2.googledomains.com.,ns-cloud-e3.googledomains.com.,ns-cloud-e4.googledomains.com.
``` ```
In this case, the DNS nameservers are `ns-cloud-{e1-e4}.googledomains.com`. In this case, the DNS nameservers are `ns-cloud-{e1-e4}.googledomains.com`.
Yours could differ slightly, e.g. {a1-a4}, {b1-b4} etc. Yours could differ slightly, e.g. {a1-a4}, {b1-b4} etc.
@ -88,6 +99,7 @@ the parent zone so that this zone can be found from the parent.
Assuming the parent zone is `my-org-do` and the parent domain is `my-org.do`, Assuming the parent zone is `my-org-do` and the parent domain is `my-org.do`,
and the parent zone is also hosted at Google Cloud DNS, you can follow these and the parent zone is also hosted at Google Cloud DNS, you can follow these
steps to add the NS records of this zone into the parent zone: steps to add the NS records of this zone into the parent zone:
```shell ```shell
gcloud dns record-sets transaction start --zone "my-org-do" gcloud dns record-sets transaction start --zone "my-org-do"
gcloud dns record-sets transaction add ns-cloud-e{1..4}.googledomains.com. \ gcloud dns record-sets transaction add ns-cloud-e{1..4}.googledomains.com. \
@ -98,14 +110,17 @@ gcloud dns record-sets transaction execute --zone "my-org-do"
### Deploy ExternalDNS ### Deploy ExternalDNS
Use the following command to apply the [manifest](https://github.com/kubernetes-incubator/external-dns/blob/master/docs/tutorials/gke.md#manifest-for-clusters-without-rbac-enabled) to install ExternalDNS Use the following command to apply the [manifest](https://github.com/kubernetes-incubator/external-dns/blob/master/docs/tutorials/gke.md#manifest-for-clusters-without-rbac-enabled) to install ExternalDNS
```shell ```shell
cat <<EOF | kubectl apply --filename - cat <<EOF | kubectl apply --filename -
<the-content-of-manifest-with-custom-domain-filter> <the-content-of-manifest-with-custom-domain-filter>
EOF EOF
``` ```
Note that you need to set the argument `domain-filter` to your custom domain. Note that you need to set the argument `domain-filter` to your custom domain.
You should see ExternalDNS is installed by running: You should see ExternalDNS is installed by running:
```shell ```shell
kubectl get deployment external-dns kubectl get deployment external-dns
``` ```
@ -115,12 +130,15 @@ kubectl get deployment external-dns
In order to publish the Knative Gateway service, the annotation In order to publish the Knative Gateway service, the annotation
`external-dns.alpha.kubernetes.io/hostname: '*.external-dns-test.my-org.do'` `external-dns.alpha.kubernetes.io/hostname: '*.external-dns-test.my-org.do'`
needs to be added into Knative gateway service: needs to be added into Knative gateway service:
```shell ```shell
kubectl edit svc knative-ingressgateway --namespace istio-system kubectl edit svc knative-ingressgateway --namespace istio-system
``` ```
This command opens your default text editor and allows you to add the This command opens your default text editor and allows you to add the
annotation to `knative-ingressgateway` service. After you've added your annotation to `knative-ingressgateway` service. After you've added your
annotation, your file may look similar to this: annotation, your file may look similar to this:
``` ```
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
@ -138,6 +156,7 @@ service was created.
```shell ```shell
gcloud dns record-sets list --zone "external-dns-zone" --name "*.external-dns-test.my-org.do." gcloud dns record-sets list --zone "external-dns-zone" --name "*.external-dns-test.my-org.do."
``` ```
You should see output similar to: You should see output similar to:
``` ```
@ -150,12 +169,16 @@ NAME TYPE TTL DATA
You can check if the domain has been published to the Internet be entering You can check if the domain has been published to the Internet be entering
the following command: the following command:
```shell ```shell
host test.external-dns-test.my-org.do host test.external-dns-test.my-org.do
``` ```
You should see the below result after the domain is published: You should see the below result after the domain is published:
``` ```
test.external-dns-test.my-org.do has address 35.231.248.30 test.external-dns-test.my-org.do has address 35.231.248.30
``` ```
> Note: The process of publishing the domain to the Internet can take several > Note: The process of publishing the domain to the Internet can take several
minutes. > minutes.

View File

@ -2,9 +2,8 @@
This directory contains tests and testing docs. This directory contains tests and testing docs.
* [Unit tests](#running-unit-tests) currently reside in the codebase alongside the code they test - [Unit tests](#running-unit-tests) currently reside in the codebase alongside the code they test
* [End-to-end tests](#running-end-to-end-tests) - [End-to-end tests](#running-end-to-end-tests)
## Running unit tests ## Running unit tests