Run brew install protobuf
or make install-protobuf
From the root directory, make sure you have already setup Lima:
chaos-controller >> make lima-start
Go into the dogfood
directory to use its Makefile
, and build the two images:
chaos-controller >> cd dogfood
chaos-controller/dogfood >> make lima-push-dogfood
They will be pushed your local docker repository as k8s.io/chaos-dogfood-client
& k8s.io/chaos-dogfood-server
.
Create the chaos-demo
namespace (if necessary) and kubectl apply
both Helm charts with this target:
chaos-controller/dogfood >> make install
Get pod name (such as chaos-dogfood-client-84596b6c5-8kdxl
or chaos-dogfood-server-5fdcff889f-hblj2
):
chaos-controller/dogfood >> kubectl -n chaos-demo get pods -o wide
Sample kubectl
output:
NAME READY STATUS RESTARTS AGE
chaos-dogfood-client-59bccfd49c-rn5wl 1/1 Running 0 41s
chaos-dogfood-server-854cc5f49d-gjbnc 1/1 Running 0 4s
chaos-controller/dogfood >> kubectl -n chaos-demo logs -l app=chaos-dogfood-client
Might output:
connecting to chaos-dogfood-server.chaos-demo.svc.cluster.local:50051...
x
| catalog: 0 items returned ()
| ERROR ordering food: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp 10.96.24.54:50051: connect: connection refused"
| ordered:
x
| catalog: 3 items returned (cat, dog, cow)
| ordered: Meowmix is on its way!
x
| catalog: 3 items returned (cow, cat, dog)
| ERROR ordering food: rpc error: code = Unknown desc = Sorry, we don't deliver food for your mouse =(
| ordered:
x
| catalog: 3 items returned (cow, cat, dog)
| ordered: Chewey is on its way!
x
| catalog: 3 items returned (cat, dog, cow)
| ordered: Meowmix is on its way!
x
| catalog: 3 items returned (cat, dog, cow)
| ERROR ordering food: rpc error: code = Unknown desc = Sorry, we don't deliver food for your mouse =(
| ordered:
x
chaos-controller/dogfood >> kubectl -n chaos-demo logs -l app=chaos-dogfood-server
Might output:
listening on :50050...
x
| returned catalog
| proccessed order - animal:"cat"
x
| returned catalog
| * DECLINED ORDER - animal:"mouse"
x
| returned catalog
| proccessed order - animal:"dog"
x
| returned catalog
| proccessed order - animal:"cat"
x
| returned catalog
| * DECLINED ORDER - animal:"mouse"
x
| returned catalog
| proccessed order - animal:"dog"
x
You can kubectl apply -f examples/<disruption.yaml>
for any example/
disruption files.
For gRPC disruption, you can follow these detailed steps.
- Run
make uninstall
tokubectl delete
both charts as well as remove the namespace.