This example combines istio, grpc with a simple dart front end. This experiment stages future work using the same technologies for a flutter application using gRPC backend services hosted on kubernetes.
This README assumes the following are setup on your machine.
$ eval $(minikube docker-env)
The echo service simple reverses a string. It simply does this to prove that a backend service is processing a payload provided by the frontend.
$ make build-server
The front end is built simply using dart from protobuf generated dart client code.
$ make build-web
$ kubetcl apply -f manifest/gateway.yaml
$ kubetcl apply -f manifest/server.yaml
See determining the ingress IP and Ports from the Istio documentation for more information.
$ export INGRESS_PORT=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="http2")].nodePort}')
$ export GATEWAY=$(minikube ip):$INGRESS_PORT
Run the following commands to open the web front end. Filling out anything in the input and pressing Submit should show a string reversal proving that you've set up everything correctly. Your front end web app is calling your backend gRPC.
$ docker run -it -p 5000:5000 -e PORT=5000 -e ENDPOINT=http://$GATEWAY echo-web:1.0
$ open "http://$(minikube ip):5000"