diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 950df610ca3..fad83225871 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -95,25 +95,30 @@ The recommended configuration is: - Node autoscaling, up to 3 nodes - API scopes for cloud-platform -### To setup a cluster with Docker Desktop: -Docker Desktop using an edge version has been proven to work for both developing -and running Pipelines. +### To setup a cluster using MiniKube: -To use minikube: +- Follow instructions for your platform to [Install Minikube](https://kubernetes.io/docs/tasks/tools/install-minikube/) and start a session as follows: ```bash minikube start eval $(minikube docker-env) ``` -To use the Kubernetes that comes with Docker Desktop: +### To setup a cluster with Docker Desktop: + +Docker Desktop versions come integrated with an edge version of Kubernetes that has been proven to work for both developing and running Pipelines. To find out what Kubernetes a specific version of Docker Desktop includes, please refer to the release notes for your platform here: https://docs.docker.com/. + +To enable the Kubernetes that comes with Docker Desktop: + +1. From the Docker Desktop dropdown menu, open the `preferences...` interface. + +1. Under the `Resources` tab ensure that in the `ADVANCED` menuitem you have at allocated at least 4 CPUs, 8.0 GiB Memory, and 1.0 GiB Swap. -1. First go into the Docker Desktop preferences. Under the resource tabs ensure - that you have at least 4 CPUs, 8.0 GiB Memory, and 1.0 GiB Swap. +1. Under the `Kubernetes` tab, check the `Enable Kubernetes` box. -1. Under the Kubernetes tab, enable Kubernetes. + * *Note: the Kubernetes version Docker Desktop will use is displayed at the top of the window.* -1. Click the Apply and Restart button to save the preferences. +1. Click the `Apply and Restart` button to save the preferences. 1. Switch the proper `kubectl` config context: @@ -121,6 +126,7 @@ To use the Kubernetes that comes with Docker Desktop: kubectl config get-contexts # You should see docker-for-desktop in the previous command output kubectl config use-context docker-for-desktop ``` + * *Note: Docker Desktop menu provides a `Kubernetes` menuitem that allows you to select between contexts which is equivalent to the `kubectl` command.* ### To setup a cluster with GKE: diff --git a/docs/tutorial.md b/docs/tutorial.md index e09908133b2..56eed53cce0 100644 --- a/docs/tutorial.md +++ b/docs/tutorial.md @@ -602,9 +602,9 @@ You must reconfigure any `image` resource definitions in your `PipelineResources Complete these prerequisites to run this tutorial locally using Minikube: - Install the [required tools](https://github.com/tektoncd/pipeline/blob/master/DEVELOPMENT.md#requirements). -- Install [minikube](https://kubernetes.io/docs/tasks/tools/install-minikube/) and start a sesion as follows: +- Install [minikube](https://kubernetes.io/docs/tasks/tools/install-minikube/) and start a session as follows: ```bash -minikube start --memory 6144 --cpus 2 +minikube start --memory 6144 --cpus 2 ``` - Point your shell to minikube's docker-daemon by running `eval $(minikube -p minikube docker-env)` - Set up a [registry on minikube](https://github.com/kubernetes/minikube/tree/master/deploy/addons/registry-aliases) by running `minikube addons enable registry` and `minikube addons enable registry-aliases` @@ -614,7 +614,7 @@ minikube start --memory 6144 --cpus 2 The `registry-aliases` addon will create several aliases for the minikube registry. You'll need to reconfigure your `image` resource definitions to use one of these aliases in your `PipelineResources` (for this tutorial, we use `example.com`; for a full list of aliases, you can run `minikube ssh -- cat /etc/hosts`. You can also configure your own alias by editing minikube's `/etc/hosts` file and the `coredns` configmap in the `kube-system` namespace). - Set the URL to `example.com/` -- When using `ko`, be sure to [use the `-L` flag](https://github.com/google/ko/blob/master/README.md#with-minikube) (i.e. `ko apply -L -f config/`) +- When using `ko`, be sure to [use the `-L` flag](https://github.com/google/ko/blob/master/README.md#with-minikube) (i.e. `ko apply -L -f config/`) - Set your applications (such as deployment definitions) to push to `example.com/`. @@ -622,7 +622,7 @@ If you wish to use a different image URL, you can add the appropriate line to mi ### Reconfigure logging -See the information in the "Docker for Desktop" section +See the information in the "Docker for Desktop" section ## Further reading