Skip to content

Commit

Permalink
Update Docker Desktop setup and separate out MiniKube setup
Browse files Browse the repository at this point in the history
This PR seeks to separate out the MiniKube setup which somehow appears to have been placed under the Docker Desktop setup instructions.  While doing this I thought to update the instructions to be more accurate relative to the Docker Desktop preferences and menuing system.
  • Loading branch information
mrutkows authored and tekton-robot committed Aug 6, 2020
1 parent cb85f1d commit 3a7a693
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
24 changes: 15 additions & 9 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,32 +95,38 @@ 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:

```bash
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:

Expand Down
8 changes: 4 additions & 4 deletions docs/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand All @@ -614,15 +614,15 @@ 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/<image_name>`
- 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/<image name>`.

If you wish to use a different image URL, you can add the appropriate line to minikube's `/etc/hosts`.

### Reconfigure logging

See the information in the "Docker for Desktop" section
See the information in the "Docker for Desktop" section

## Further reading

Expand Down

0 comments on commit 3a7a693

Please sign in to comment.