This demo is based on the Google cloud microservices demo
It's a smaller version with just a few GO micro-services using REST APIs
- Starts a local K8s cluster like Minikube
minikube start --driver=docker --cpus=10 --memory 8192 --disk-size 32g
minikube addons enable ingress
- Both prod.app.localhost and dev.app.localhost defined in the host file
# Add these entries in the '/private/etc/hosts' file
127.0.0.1 prod.app.localhost
127.0.0.1 dev.app.localhost
- Install Istio resources in the local cluster
istioctl install --set profile=default -y
- Deploy Kardinal Manager in the local cluster
kardinal manager deploy local-minikube
- Deploy the online boutique app with Kardinal
kardinal deploy --k8s-manifest ./release/obd-kardinal.yaml
- Start the tunnel to access the services (you may have to provide you password for the underlying sudo access)
minikube tunnel
- Open the production page in the browser to see the production online boutique
This doc explains how to build and run the OnlineBoutique source code locally using the skaffold
command-line tool.
- Docker for Desktop.
- kubectl (can be installed via
gcloud components install kubectl
) - skaffold 1.27+ (latest version recommended), a tool that builds and deploys Docker images in bulk.
- Minikube (optional - see Local Cluster)
-
Launch a local Kubernetes cluster with one of the following tools:
-
To launch Minikube (tested with Ubuntu Linux). Please, ensure that the local Kubernetes cluster has at least:
- 4 CPUs
- 4.0 GiB memory
- 32 GB disk space
minikube start --cpus=4 --memory 4096 --disk-size 32g
-
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
-
-
Run
kubectl get nodes
to verify you're connected to the respective control plane. -
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, runskaffold dev
command. -
Run
kubectl get pods
to verify the Pods are ready and running. -
Access the web frontend through your browser
- Minikube requires you to run a command to access the frontend service:
minikube service frontend-external
- Docker For Desktop should automatically provide the frontend at http://localhost:80
If you've deployed the application with skaffold run
command, you can run
skaffold delete
to clean up the deployed resources.