A small project to demonstrate how prefixing istio
to the application/service name is causing
the Isito Destination policies to fail
-
Kubernetes cluster is up and running
-
Istio is deployed into the kubernetes cluster
The build above should create the required kubernetes manifests that allows to deploy the service in Istio Service Mesh. All the files will be located in the target directory of the project
kubectl apply -f /target/istio/isito-httpbin.yaml (1) kubectl apply -f target/istio/httpbin-ingress.yaml (2) kubectl apply -f target/istio/httpbin-svc.yaml (3) istioctl create -f target/istio/isito-httpbin.yaml (4)
-
Deploy the istio-httpbin in to kubernetes cluster and create the istio-httpbin service
-
Create istio-httpbin related Kubernetes ingress resources
-
Create the Kubernetes egress resource to access httpbin.org from within Isito Service Mesh
-
Create the Istio
route-rule
anddestinaiton-policy
Since the destination policy has defined the Circuit Breaker, the application should return the client with errors post 2 requests which means 90% failure for concurrent requests of 20 users.
The application url can be found using the command echo $(minikube ip):$(kubectl get svc istio-ingress -o jsonpath='{.spec.ports[0].nodePort}')/httbin/delay
To test application with concurrency you can using tools like Gatling, the following load test script could be used with gatling
import scala.concurrent.duration._ import io.gatling.core.Predef._ import io.gatling.http.Predef._ import io.gatling.jdbc.Predef._ class HttpBinServiceSimulation extends Simulation { val httpProtocol = http .baseURL("http://192.168.99.100:30420") (1) .inferHtmlResources() .acceptHeader("text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8") .acceptEncodingHeader("gzip, deflate") .acceptLanguageHeader("en-US,en;q=0.5") .userAgentHeader("Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Firefox/52.0") val headers_0 = Map("Upgrade-Insecure-Requests" -> "1") val uri1 = "http://192.168.99.100:30420/httpbin/delay" (1) val scn = scenario("HttpBinServiceSimulation") .exec(http("request_0") .get("/httpbin/delay") .headers(headers_0)) setUp(scn.inject(atOnceUsers(20))).protocols(httpProtocol) }
-
replace it with Kubernetes cluster IP and isito-ingress node port