From 86ce15d26b88467183bb77b923787f9ddb01cf00 Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Tue, 14 Apr 2020 18:04:09 -0700 Subject: [PATCH] Kind instructions (#323) --- README.md | 51 ++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 36 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index fc818af..5b14649 100644 --- a/README.md +++ b/README.md @@ -72,12 +72,13 @@ We offer the following installation methods: 1. **Running locally** (~20 minutes) You will build 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: - - [Minikube](https://github.com/kubernetes/minikube). Recommended for the + - [Minikube](https://github.com/kubernetes/minikube). Recommended for Linux hosts (also supports Mac/Windows). - [Docker for Desktop](https://www.docker.com/products/docker-desktop). 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, 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`) - Local Kubernetes cluster deployment tool: - [Minikube (recommended for - Linux)](https://kubernetes.io/docs/setup/minikube/). - - Docker for Desktop (recommended for Mac/Windows): It provides Kubernetes support as [noted - here](https://docs.docker.com/docker-for-mac/kubernetes/). + Linux)](https://kubernetes.io/docs/setup/minikube/) + - [Docker for Desktop (recommended for Mac/Windows)](https://www.docker.com/products/docker-desktop) + - 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) 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: - 4 CPU's - 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 - minikube start --cpus=4 --memory 4096 - ``` - - - Launch “Docker for Desktop” (tested with Mac/Windows). Go to Preferences: + - To launch **Docker for Desktop** (tested with Mac/Windows). Go to Preferences: - choose “Enable Kubernetes”, - 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 + - 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 `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 automatically as you refactor the code, run `skaffold dev` command. -1. Run `kubectl get pods` to verify the Pods are ready and running. The - application frontend should be available at http://localhost:80 on your - machine. +1. Run `kubectl get pods` to verify the Pods are ready and running. + +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)