Skip to content

Commit

Permalink
[docs] fix markdown lint warnings (knative#2227)
Browse files Browse the repository at this point in the history
  • Loading branch information
drnic authored and knative-prow-robot committed Oct 23, 2018
1 parent caf68f8 commit 0506b90
Show file tree
Hide file tree
Showing 18 changed files with 200 additions and 140 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Knative Serving Changelog

All notable changes to Knative Serving will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
Expand All @@ -9,7 +10,9 @@ When adding a changelog entry, link to the most relevant issue or PR for more
details.

## [Unreleased]

### Added

* Basic API resources Revision, Configuration, and Route.
* Integration with the Build API for on-demand container builds. [#36](https://github.com/knative/serving/pull/36)
* Autoscaling of Revision deployments. [#229](https://github.com/knative/serving/pull/229)
Expand Down
5 changes: 3 additions & 2 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,9 @@ kubectl apply -R -f config/monitoring/100-namespace.yaml \
As you make changes to the code-base, there are two special cases to be aware of:

* **If you change an input to generated code**, then you must run [`./hack/update-codegen.sh`](./hack/update-codegen.sh). Inputs include:
* API type definitions in [pkg/apis/serving/v1alpha1/](./pkg/apis/serving/v1alpha1/.),
* Types definitions annotated with `// +k8s:deepcopy-gen=true`.

* API type definitions in [pkg/apis/serving/v1alpha1/](./pkg/apis/serving/v1alpha1/.),
* Types definitions annotated with `// +k8s:deepcopy-gen=true`.

* **If you change a package's deps** (including adding external dep), then you must run
[`./hack/update-deps.sh`](./hack/update-deps.sh).
Expand Down
56 changes: 29 additions & 27 deletions docs/creating-a-kubernetes-cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,31 @@

Two options:

* Setup a [GKE cluster](#gke)
* Run [minikube](#minikube) locally
* Setup a [GKE cluster](#gke)
* Run [minikube](#minikube) locally

## GKE

To use a k8s cluster running in GKE:

1. Install `gcloud` using [the instructions for your
1. Install `gcloud` using [the instructions for your
platform](https://cloud.google.com/sdk/downloads).

1. Create a GCP project (or use an existing project if you've already created
1. Create a GCP project (or use an existing project if you've already created
one) at http://console.cloud.google.com/home/dashboard. Set the ID of the
project in an environment variable (e.g. `PROJECT_ID`).

_If you are a new GCP user, you might be eligible for a trial credit making
your GKE cluster and other resources free for a short time. Otherwise, any
GCP resources you create will cost money._

1. Enable the k8s API:
1. Enable the k8s API:

```shell
gcloud --project=$PROJECT_ID services enable container.googleapis.com
```

1. Create a k8s cluster (version 1.10 or greater):
1. Create a k8s cluster (version 1.10 or greater):

```shell
gcloud --project=$PROJECT_ID container clusters create \
Expand All @@ -38,13 +38,13 @@ To use a k8s cluster running in GKE:
knative-demo
```

* Version 1.10+ is required
* Change this to whichever zone you choose
* cloud-platform scope is required to access GCB
* Knative Serving currently requires 4-cpu nodes to run conformance tests.
* Version 1.10+ is required
* Change this to whichever zone you choose
* cloud-platform scope is required to access GCB
* Knative Serving currently requires 4-cpu nodes to run conformance tests.
Changing the machine type from the default may cause failures.
* Autoscale from 1 to 3 nodes. Adjust this for your use case
* Change this to your preferred cluster name
* Autoscale from 1 to 3 nodes. Adjust this for your use case
* Change this to your preferred cluster name

You can see the list of supported cluster versions in a particular zone by
running:
Expand All @@ -54,35 +54,35 @@ To use a k8s cluster running in GKE:
gcloud container get-server-config --zone us-east1-d
```

1. **Alternately**, if you wish to re-use an already-created cluster,
1. **Alternately**, if you wish to re-use an already-created cluster,
you can fetch the credentials to your local machine with:

```shell
# Load credentials for the new cluster in us-east1-d
gcloud container clusters get-credentials --zone us-east1-d knative-demo
```

1. If you haven't installed `kubectl` yet, you can install it now with
`gcloud`:
1. If you haven't installed `kubectl` yet, you can install it now with `gcloud`:
```shell
gcloud components install kubectl
```
1. Add to your .bashrc:
1. Add to your .bashrc:
```shell
# When using GKE, the K8s user is your GCP user.
export K8S_USER_OVERRIDE=$(gcloud config get-value core/account)
```
## Minikube
1. [Install and configure
1. [Install and configure
minikube](https://github.com/kubernetes/minikube#minikube) with a [VM
driver](https://github.com/kubernetes/minikube#requirements), e.g. `kvm2` on
Linux or `hyperkit` on macOS.
1. [Create a cluster](https://github.com/kubernetes/minikube#quickstart) with
1. [Create a cluster](https://github.com/kubernetes/minikube#quickstart) with
version 1.10 or greater and your chosen VM driver.
The following commands will setup a cluster with `8192 MB` of memory and `4`
Expand All @@ -108,6 +108,7 @@ To use a k8s cluster running in GKE:
--extra-config=controller-manager.cluster-signing-key-file="/var/lib/localkube/certs/ca.key" \
--extra-config=apiserver.admission-control="LimitRanger,NamespaceExists,NamespaceLifecycle,ResourceQuota,ServiceAccount,DefaultStorageClass,MutatingAdmissionWebhook"
```
For macOS use:
```shell
Expand All @@ -119,7 +120,8 @@ To use a k8s cluster running in GKE:
--extra-config=controller-manager.cluster-signing-key-file="/var/lib/localkube/certs/ca.key" \
--extra-config=apiserver.admission-control="LimitRanger,NamespaceExists,NamespaceLifecycle,ResourceQuota,ServiceAccount,DefaultStorageClass,MutatingAdmissionWebhook"
```
1. [Configure your shell environment](../DEVELOPMENT.md#environment-setup)
1. [Configure your shell environment](../DEVELOPMENT.md#environment-setup)
to use your minikube cluster:
```shell
Expand All @@ -128,7 +130,7 @@ To use a k8s cluster running in GKE:
export K8S_USER_OVERRIDE=$USER
```
1. Install Knative Serving
1. Install Knative Serving
Before installing knative on minikube, we need to do two things:
Expand All @@ -139,7 +141,6 @@ To use a k8s cluster running in GKE:
components](../DEVELOPMENT.md#starting-knative-serving) to
Minikube the same way you would any other Kubernetes cluster.


### `LoadBalancer` Support in Minikube

By default istio uses a `LoadBalancer` which is [not yet supported by
Expand Down Expand Up @@ -194,7 +195,7 @@ docker tag gcr.io/knative-samples/primer:latest dev.local/knative-samples/primer

You can use Google Container Registry as the registry for a Minikube cluster.

1. [Set up a GCR repo](setting-up-a-docker-registry.md). Export the environment
1. [Set up a GCR repo](setting-up-a-docker-registry.md). Export the environment
variable `PROJECT_ID` as the name of your project. Also export `GCR_DOMAIN`
as the domain name of your GCR repo. This will be either `gcr.io` or a
region-specific variant like `us.gcr.io`.
Expand All @@ -212,23 +213,23 @@ You can use Google Container Registry as the registry for a Minikube cluster.
export DOCKER_REPO_OVERRIDE="${KO_DOCKER_REPO}"
```
1. Create a GCP service account:
1. Create a GCP service account:
```shell
gcloud iam service-accounts create minikube-gcr \
--display-name "Minikube GCR Pull" \
--project $PROJECT_ID
```
1. Give your service account the `storage.objectViewer` role:
1. Give your service account the `storage.objectViewer` role:
```shell
gcloud projects add-iam-policy-binding $PROJECT_ID \
--member "serviceAccount:minikube-gcr@${PROJECT_ID}.iam.gserviceaccount.com" \
--role roles/storage.objectViewer
```
1. Create a key credential file for the service account:
1. Create a key credential file for the service account:
```shell
gcloud iam service-accounts keys create \
Expand All @@ -244,7 +245,7 @@ For example, use these steps to allow Minikube to pull Knative Serving and Build
from GCR as published in our development flow (`ko apply -f config/`).
_This is only necessary if you are not using public Knative Serving and Build images._
1. Create a Kubernetes secret in the `knative-serving` and `knative-build` namespace:
1. Create a Kubernetes secret in the `knative-serving` and `knative-build` namespace:
```shell
export [email protected]
Expand All @@ -265,7 +266,7 @@ _This is only necessary if you are not using public Knative Serving and Build im
_The secret must be created in the same namespace as the pod or service
account._
1. Add the secret as an imagePullSecret to the `controller` and
1. Add the secret as an imagePullSecret to the `controller` and
`build-controller` service accounts:
```shell
Expand All @@ -276,6 +277,7 @@ _This is only necessary if you are not using public Knative Serving and Build im
-p '{"imagePullSecrets": [{"name": "knative-serving-gcr"}]}' \
-n "knative-serving"
```
Use the same procedure to add imagePullSecrets to service accounts in any
namespace. Use the `default` service account for pods that do not specify a
service account.
Expand Down
28 changes: 14 additions & 14 deletions docs/debugging/application-debugging-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This kind of failure is most likely due to either a misconfigured manifest or
wrong command. For example, the following output says that you must configure
route traffic percent to sum to 100:

```
```console
Error from server (InternalError): error when applying patch:
{"metadata":{"annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"serving.knative.dev/v1alpha1\",\"kind\":\"Route\",\"metadata\":{\"annotations\":{},\"name\":\"route-example\",\"namespace\":\"default\"},\"spec\":{\"traffic\":[{\"configurationName\":\"configuration-example\",\"percent\":50}]}}\n"}},"spec":{"traffic":[{"configurationName":"configuration-example","percent":50}]}}
to:
Expand All @@ -23,6 +23,7 @@ ERROR: Non-zero return code '1' from command: Process exited with status 1
```

## Check application logs

Knative Serving provides default out-of-the-box logs for your application. After entering
`kubectl proxy`, you can go to the
[Kibana UI](http://localhost:8001/api/v1/namespaces/knative-monitoring/services/kibana-logging/proxy/app/kibana)
Expand Down Expand Up @@ -73,12 +74,13 @@ kubectl get routerule <routerule-name> -o yaml
```

If you don't know the name of your route rule, use the
```kubectl get routerule``` command to find it.
`kubectl get routerule` command to find it.

The command returns the configuration of your route rule. Compare the domains
between your route and route rule; they should match.

### Check ingress status

Enter:

```shell
Expand All @@ -88,7 +90,6 @@ kubectl get ingress
The command returns the status of the ingress. You can see the name, age,
domains, and IP address.


## Check Revision status

If you configure your `Route` with `Configuration`, run the following
Expand Down Expand Up @@ -119,18 +120,18 @@ conditions:
If you see this condition, check the following to continue debugging:
* [Check Pod status](#check-pod-status)
* [Check application logs](#check-application-logs)
* [Check Istio routing](#check-istio-routing)
* [Check Pod status](#check-pod-status)
* [Check application logs](#check-application-logs)
* [Check Istio routing](#check-istio-routing)
If you see other conditions, to debug further:
* Look up the meaning of the conditions in Knative
[Error Conditions and Reporting](../spec/errors.md). Note: some of them
are not implemented yet. An alternative is to
[check Pod status](#check-pod-status).
* If you are using `BUILD` to deploy and the `BuidComplete` condition is not
`True`, [check BUILD status](#check-build-status).
* Look up the meaning of the conditions in Knative
[Error Conditions and Reporting](../spec/errors.md). Note: some of them
are not implemented yet. An alternative is to
[check Pod status](#check-pod-status).
* If you are using `BUILD` to deploy and the `BuidComplete` condition is not
`True`, [check BUILD status](#check-build-status).

## Check Pod status

Expand All @@ -142,7 +143,7 @@ kubectl get pods

This should list all `Pod`s with brief status. For example:

```
```console
NAME READY STATUS RESTARTS AGE
configuration-example-00001-deployment-659747ff99-9bvr4 2/2 Running 0 3h
configuration-example-00002-deployment-5f475b7849-gxcht 1/2 CrashLoopBackOff 2 36s
Expand All @@ -153,7 +154,6 @@ Choose one and use the following command to see detailed information for its

```shell
kubectl get pod <pod-name> -o yaml
```

## Check Build status
Expand Down
Loading

0 comments on commit 0506b90

Please sign in to comment.