-
Install [Homebrew] in a MacOS or Linux machine:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)
(TODO: Convert this into a VM.)
-
Use Homebrew to install Minikube, go-task, helm and Flux:
brew install minikube go-task helm fluxcd/tap/flux
-
Run
minikube start
to create a K8s node. Pass--subnet=''
flag to set a subnet for a cluster (>1 nodes). -
Run
task cluster:verify
to check that all dependencies are setup. Usebrew update
to check new versions of any dependencies. Usebrew upgrade
to upgrade dependencies. -
Run
task cluster:install
to bootstrap minikube with flux andload cluster config/info into bootstrapped minikube cluster. -
You'd have your cluster behind your domain. In this repo, since we don't have our own public domain, we want our K8s DNS gateway to resolve requests for our domain (
my-example.com
) to the K8s DNS gateway's external IP address, which can be found usingkubectl get svc -n networking k8s-gateway
(underEXTERNAL-IP
). Here's a link to the Arch wiki for configuring DNSMASQD. For example, my DNSMASQD configuration is as follows.# Forward queries for 'my-example.com' and all of its subdomains to # k8s-gateway running in minikube at 192.168.49.20 server=/my-example.com/192.168.49.20
Replace the IP address with the K8s gateway's external IP address found using the command above. You can continue to browse the web as usual; this configuration simply ensures that my-example.com is resolved by your local DNS resolver. This configuration file can be removed once you've turned minikube off.
-
Be happy! Work on your cluster.
- Run the cluster (use
./scripts/start-minikube-cluster.sh
)- Note, we run latest version of our components when testing the cluster. We
can pick specific versions of our components, but it requires digging for
image version settings in
./kubernetes/
, changing and committing these values, since our setup is done using flux. - We might consider changing our test scripts so the deployment is created outside of flux and then we can select specific versions of components to test.
- Note, we run latest version of our components when testing the cluster. We
can pick specific versions of our components, but it requires digging for
image version settings in
- Collect latencies
- Adjust settings in
./scripts/collect-latencies.mts
- Run that script (can pass
--test-mode vegeta|serial
) - Results will get collected in
./vegeta/bookinfo/<hostname>/<timestamp>/
- Adjust settings in
- Plot cumulative results
- Adjust settings in
./scripts/plot-througput-graphs.py
to include newly generated results with hostname and timestamp from above - Run that script
- Graphs will be generated in
./vegeta/bookinfo/_graphs/bookinfo_*
- Adjust settings in
- Inspect specific run results
- Adjust settings in
./scripts/inspect-specific-results.py
to point at specific result for inspection - Run that script
- Graphs will be generated in
./vegeta/bookinfo/_graphs/results_inspection_*
- Adjust settings in