Skip to content

Latest commit

 

History

History
61 lines (41 loc) · 1.97 KB

File metadata and controls

61 lines (41 loc) · 1.97 KB

Development Guide

This doc explains how to build and run the Online Boutique source code locally using the skaffold command-line tool.

Prerequisites

Local Cluster

  1. 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
    • To launch a Kind cluster:

      kind create cluster
  2. Run kubectl get nodes to verify you're connected to the respective control plane.

  3. 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.

  4. Run kubectl get pods to verify the Pods are ready and running.

  5. Run kubectl port-forward deployment/frontend 8080:8080 to forward a port to the frontend service.

  6. Navigate to localhost:8080 to access the web frontend.

Cleanup

If you've deployed the application with skaffold run command, you can run skaffold delete to clean up the deployed resources.