This is a simple istio demo/example. This example is based on spring boot and create automatically a docker image. Change the docker image prefix in the pom.xml to be able to publish the image on your docker registry.
You will need for this demo:
- maven
- docker
- minikube
- kubectl
- istio
Example usage:
- build both services
mvn clean install
- push to docker registry
docker push prefix/helloworld-service && docker push prefix/helloworld-service-caller
- deploy service
kubectl apply -f kubernetes/helloworld-deployment-mpo.yaml
- create service
kubectl apply -f kubernetes/helloworld-service-mpo.yaml
- deploy service caller
kubectl apply -f kubernetes/helloworld-caller-deployment-mpo.yaml
- create service caller
kubectl apply -f kubernetes/helloworld-caller-service-mpo.yaml
- install istio :
kubectl apply -f $istio-path/install/kubernetes/helm/istio/templates/crds.yaml
- sidecar injection:
kubectl label namespace default istio-injection=enabled --overwrite
- restart services:
kubectl scale deployment helloworld-service --replicas=0 && kubectl scale deployment helloworld-service --replicas=2
- restart services caller:
kubectl scale deployment helloworld-service-caller --replicas=0 && kubectl scale deployment helloworld-service-caller --replicas=2
- create gateway:
kubectl apply -f istio-rules/helloworld-service-gateway.yml
- test it
curl [](http://192.168.39.79:31380/hello/world)
- activate the other example istio rueles