- Install Dependencies
- Container manager like Docker, or Podman
- minikube: https://minikube.sigs.k8s.io/docs/start/
- k8s version: v1.27.4
- Configure Minikube
- Start Local k8s cluster using minikube
minikube start --nodes <nodeCount>
When initializing minikube nodes, only some core dependencies will be installed (dashboard and dns). For the experiment, more setup is needed:
- Istio Service Mesh
- https://istio.io/latest/docs/setup/getting-started/
- Remember to enable Envoy sidecar injection!
- Install Prometheus & Grafana (optional) using Istio
- Useful Add-ons:
- minikube dashboard
- kubernetes-sigs/metrics-server
- Enable Scheduler
- Custom: See following section
Use build-images.sh
under <rootDir>/services/
to build mock services and push the images to minikube.
Use deployment.yaml
under <rootDir>/infra
to create deployment. Use services.yaml
under <rootDir>/infra
to create services
We are doing dev locally, which means we don't push our test service's image to cloud. Thus, we need to load image: See: https://minikube.sigs.k8s.io/docs/handbook/pushing/#7-loading-directly-to-in-cluster-container-runtime
minikube image load <imageName>
kubectl apply -f infra/pods.yaml
kubectl port-forward svc/prometheus 9090:9090 -n istio-system
kubectl get po -A
Envoy sidecar
See: https://github.com/kubernetes-sigs/scheduler-plugins/blob/master/doc/install.md
How to login minikube control plane: https://minikube.sigs.k8s.io/docs/commands/ssh/
https://kubernetes.io/docs/concepts/cluster-administration/system-metrics/