Kind instructions (#323)
This commit is contained in:
parent
173ac3f071
commit
86ce15d26b
1 changed files with 36 additions and 15 deletions
51
README.md
51
README.md
|
@ -72,12 +72,13 @@ We offer the following installation methods:
|
||||||
|
|
||||||
1. **Running locally** (~20 minutes) You will build
|
1. **Running locally** (~20 minutes) You will build
|
||||||
and deploy microservices images to a single-node Kubernetes cluster running
|
and deploy microservices images to a single-node Kubernetes cluster running
|
||||||
on your development machine. There are two options to run a Kubernetes
|
on your development machine. There are three options to run a Kubernetes
|
||||||
cluster locally for this demo:
|
cluster locally for this demo:
|
||||||
- [Minikube](https://github.com/kubernetes/minikube). Recommended for the
|
- [Minikube](https://github.com/kubernetes/minikube). Recommended for
|
||||||
Linux hosts (also supports Mac/Windows).
|
Linux hosts (also supports Mac/Windows).
|
||||||
- [Docker for Desktop](https://www.docker.com/products/docker-desktop).
|
- [Docker for Desktop](https://www.docker.com/products/docker-desktop).
|
||||||
Recommended for Mac/Windows.
|
Recommended for Mac/Windows.
|
||||||
|
- [Kind](https://www.docker.com/products/docker-desktop). Supports Mac/Windows/Linux.
|
||||||
|
|
||||||
1. **Running on Google Kubernetes Engine (GKE)”** (~30 minutes) You will build,
|
1. **Running on Google Kubernetes Engine (GKE)”** (~30 minutes) You will build,
|
||||||
upload and deploy the container images to a Kubernetes cluster on Google
|
upload and deploy the container images to a Kubernetes cluster on Google
|
||||||
|
@ -98,38 +99,58 @@ We offer the following installation methods:
|
||||||
- kubectl (can be installed via `gcloud components install kubectl`)
|
- kubectl (can be installed via `gcloud components install kubectl`)
|
||||||
- Local Kubernetes cluster deployment tool:
|
- Local Kubernetes cluster deployment tool:
|
||||||
- [Minikube (recommended for
|
- [Minikube (recommended for
|
||||||
Linux)](https://kubernetes.io/docs/setup/minikube/).
|
Linux)](https://kubernetes.io/docs/setup/minikube/)
|
||||||
- Docker for Desktop (recommended for Mac/Windows): It provides Kubernetes support as [noted
|
- [Docker for Desktop (recommended for Mac/Windows)](https://www.docker.com/products/docker-desktop)
|
||||||
here](https://docs.docker.com/docker-for-mac/kubernetes/).
|
- It provides Kubernetes support as [noted
|
||||||
|
here](https://docs.docker.com/docker-for-mac/kubernetes/)
|
||||||
|
- [Kind](https://github.com/kubernetes-sigs/kind)
|
||||||
- [skaffold]( https://skaffold.dev/docs/install/) (ensure version ≥v0.20)
|
- [skaffold]( https://skaffold.dev/docs/install/) (ensure version ≥v0.20)
|
||||||
|
|
||||||
1. Launch the local Kubernetes cluster with one of the following tools:
|
1. Launch the local Kubernetes cluster with one of the following tools:
|
||||||
|
|
||||||
- Launch Minikube (tested with Ubuntu Linux). Please, ensure that the
|
- To launch **Minikube** (tested with Ubuntu Linux). Please, ensure that the
|
||||||
local Kubernetes cluster has at least:
|
local Kubernetes cluster has at least:
|
||||||
- 4 CPU's
|
- 4 CPU's
|
||||||
- 4.0 GiB memory
|
- 4.0 GiB memory
|
||||||
|
|
||||||
To run a Kubernetes cluster with Minikube using the described configuration, please run:
|
```shell
|
||||||
|
minikube start --cpus=4 --memory 4096
|
||||||
|
```
|
||||||
|
|
||||||
```shell
|
- To launch **Docker for Desktop** (tested with Mac/Windows). Go to Preferences:
|
||||||
minikube start --cpus=4 --memory 4096
|
|
||||||
```
|
|
||||||
|
|
||||||
- Launch “Docker for Desktop” (tested with Mac/Windows). Go to Preferences:
|
|
||||||
- choose “Enable Kubernetes”,
|
- choose “Enable Kubernetes”,
|
||||||
- set CPUs to at least 3, and Memory to at least 6.0 GiB
|
- set CPUs to at least 3, and Memory to at least 6.0 GiB
|
||||||
- on the "Disk" tab, set at least 32 GB disk space
|
- on the "Disk" tab, set at least 32 GB disk space
|
||||||
|
|
||||||
|
- To launch a **Kind** cluster:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
kind create cluster
|
||||||
|
```
|
||||||
|
|
||||||
1. Run `kubectl get nodes` to verify you're connected to “Kubernetes on Docker”.
|
1. Run `kubectl get nodes` to verify you're connected to “Kubernetes on Docker”.
|
||||||
|
|
||||||
1. Run `skaffold run` (first time will be slow, it can take ~20 minutes).
|
1. Run `skaffold run` (first time will be slow, it can take ~20 minutes).
|
||||||
This will build and deploy the application. If you need to rebuild the images
|
This will build and deploy the application. If you need to rebuild the images
|
||||||
automatically as you refactor the code, run `skaffold dev` command.
|
automatically as you refactor the code, run `skaffold dev` command.
|
||||||
|
|
||||||
1. Run `kubectl get pods` to verify the Pods are ready and running. The
|
1. Run `kubectl get pods` to verify the Pods are ready and running.
|
||||||
application frontend should be available at http://localhost:80 on your
|
|
||||||
machine.
|
1. Access the web frontend through your browser
|
||||||
|
- **Minikube** requires you to run a command to access the frontend service:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
minikube service frontend-external
|
||||||
|
```
|
||||||
|
|
||||||
|
- **Docker For Desktop** should automatically provide the frontend at http://localhost:80
|
||||||
|
|
||||||
|
- **Kind** does not provision an IP address for the service.
|
||||||
|
You must run a port-forwarding process to access the frontend at http://localhost:8080:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
kubectl port-forward deployment/frontend 8080:8080
|
||||||
|
```
|
||||||
|
|
||||||
### Option 2: Running on Google Kubernetes Engine (GKE)
|
### Option 2: Running on Google Kubernetes Engine (GKE)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue