forked from knative/serving
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[docs] fix markdown lint warnings (knative#2227)
- Loading branch information
1 parent
caf68f8
commit 0506b90
Showing
18 changed files
with
200 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 \ | ||
|
@@ -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: | ||
|
@@ -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` | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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: | ||
|
@@ -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 | ||
|
@@ -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`. | ||
|
@@ -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 \ | ||
|
@@ -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] | ||
|
@@ -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 | ||
|
@@ -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. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.