Skip to content

Latest commit

 

History

History
93 lines (66 loc) · 1.91 KB

try-with-minikube.md

File metadata and controls

93 lines (66 loc) · 1.91 KB

Try with Minikube

Prerequisites

Please follow instructions to install Minikube.

Create/start a minikube cluster

minikube start -p shopping-cluster

Please wait patiently until you see messages as follows:

😄  [shopping-cluster] minikube v1.4.0 on Darwin 10.14.5
🔥  Creating virtualbox VM (CPUs=2, Memory=2000MB, Disk=20000MB) ...
🐳  Preparing Kubernetes v1.16.0 on Docker 18.09.9 ...
🚜  Pulling images ...
🚀  Launching Kubernetes ...
⌛  Waiting for: apiserver proxy etcd scheduler controller dns
🏄  Done! kubectl is now configured to use "shopping-cluster"

Build docker images for shopping and recommender for the minikube cluster

eval $(minikube -p shopping-cluster docker-env)
npm run docker:build

Configure kubectl

kubectl config use-context shopping-cluster

Set up helm

https://helm.sh/docs/using_helm/

kubectl create serviceaccount --namespace kube-system tiller
kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
helm init --service-account tiller

Build docker images

Before we rebuild docker images, consider to bump the project to the next version:

npm run docker:version

To specify the exact version:

npm run docker:version -- <version>

Run the the following command to build docker images:

npm run docker:build

Install the shopping app

helm dependency build kubernetes/shopping-app
helm install --name shopping-app --debug kubernetes/shopping-app

Start Minikube dashboard

minikube dashboard -p shopping-cluster

Open the home page

minikube service shopping-app -p shopping-cluster