Background
After reading Venil Noronha's tutorial [ 1 ] (thanks!), I rolled my own sidecar proxy :-)
However I changed two things
- You can configure ingress to route traffic to your service without the need to send requests from inside of the Kubernetes network
- I modified the http requests, depending on my "business logic"
In summary to create a service mesh on Kubernetes you need
- An Init Container to allow you to run configuration scripts before you main application container starts [ 2 ], [ 3 ]
- An iptable rule to direct network traffic to your proxy
- A proxy where you implment your business logic
More notes : https://medium.com/@caoimhin.denais/kafka-proxies-and-service-meshes-8218353dac50
User Story
My userstory was protecting a village (i.e a SpringBoot rest service) against Dragons \o/
Quickstart
./run.sh
minikube dashboard
References
[1]: https://venilnoronha.io/hand-crafting-a-sidecar-proxy-and-demystifying-istio
[2]: https://sookocheff.com/post/kubernetes/understanding-kubernetes-networking-model/
[3]: https://medium.com/@awkwardferny/getting-started-with-kubernetes-ingress-nginx-on-minikube-d75e58f52b6c
Prerequisites
[4]: https://kubernetes.io/docs/tasks/tools/install-minikube/
[5]: https://golang.org/doc/install)
[6]: https://adoptopenjdk.net