diff --git a/content/en/docs/userguide/install_waypoint.md b/content/en/docs/userguide/install_waypoint.md index d85c244..b6e85be 100644 --- a/content/en/docs/userguide/install_waypoint.md +++ b/content/en/docs/userguide/install_waypoint.md @@ -4,7 +4,7 @@ linktitle: Install Waypoint menu: docs: parent: user guide - weight: 3 + weight: 4 title: Install Waypoint toc: true type: docs @@ -64,7 +64,7 @@ sleep-9454cc476-86vgb 1/1 Running 0 62s Simple Bookstore App ``` -### Install waypoint: +### Install waypoint Waypoints can be used at three granularities: namespace, service and pod. Also you could install multiple waypoints with different granularities under the same namespace. diff --git a/content/en/docs/userguide/metric.md b/content/en/docs/userguide/metric.md index 5269e6f..0fb1ffd 100644 --- a/content/en/docs/userguide/metric.md +++ b/content/en/docs/userguide/metric.md @@ -4,7 +4,7 @@ linktitle: Querying L4 Metrics from Prometheus menu: docs: parent: user guide - weight: 4 + weight: 3 title: Querying L4 Metrics from Prometheus toc: true type: docs diff --git a/content/en/docs/userguide/service_metrics.md b/content/en/docs/userguide/service_metrics.md index 566af55..c6d9d8d 100644 --- a/content/en/docs/userguide/service_metrics.md +++ b/content/en/docs/userguide/service_metrics.md @@ -4,7 +4,7 @@ linktitle: Use Grafana to visualize service metrics menu: docs: parent: user guide - weight: 9 + weight: 19 title: Use Grafana to visualize service metrics toc: true type: docs diff --git a/content/en/docs/userguide/try_fault_injection.md b/content/en/docs/userguide/try_fault_injection.md new file mode 100644 index 0000000..a0f3c39 --- /dev/null +++ b/content/en/docs/userguide/try_fault_injection.md @@ -0,0 +1,175 @@ +--- +draft: false +linktitle: Try Fault Injection +menu: + docs: + parent: user guide + weight: 10 +title: Try Fault Injection +toc: true +type: docs + + +--- + +### Preparation + +1. Make default namespace managed by Kmesh + +2. Deploy bookinfo as sample application and sleep as curl client + +3. Install service granularity waypoint for reviews service + +*The above steps could refer to [Install Waypoint | Kmesh](https://kmesh.net/en/docs/userguide/install_waypoint/#preparation)* + +4. And install waypoint for ratings service +```bash +istioctl x waypoint apply -n default --name ratings-svc-waypoint +kubectl label service ratings istio.io/use-waypoint=ratings-svc-waypoint +kubectl annotate gateway ratings-svc-waypoint sidecar.istio.io/proxyImage=ghcr.io/kmesh-net/waypoint:latest +``` +5. Apply application version routing by running the following commands: + +```bash +kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.21/samples/bookinfo/networking/virtual-service-all-v1.yaml + +kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.21/samples/bookinfo/networking/virtual-service-reviews-test-v2.yaml +``` + +- With the above configuration, this is how requests flow: + - `productpage` → `reviews:v2` → `ratings` (only for user `jason`) + - `productpage` → `reviews:v1` (for everyone else) + +### Injecting an HTTP delay fault + +To test the Bookinfo application microservices for resiliency, inject a 7s delay between the `reviews:v2` and `ratings` microservices for user `jason`. This test will uncover a bug that was intentionally introduced into the Bookinfo app. + +Note that the `reviews:v2` service has a 10s hard-coded connection timeout for calls to the `ratings` service. Even with the 7s delay that you introduced, you still expect the end-to-end flow to continue without any errors. + +1. Create a fault injection rule to delay traffic coming from the test user `jason`. + +```bash +kubectl apply -f - <