From 31ab3dece95e27a3558dd542d12737da76bba4e1 Mon Sep 17 00:00:00 2001 From: Guang Ya Liu Date: Thu, 7 Jun 2018 20:28:49 +0800 Subject: [PATCH] Format the output of curl to json. (#1468) --- content/docs/tasks/traffic-management/mirroring.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/docs/tasks/traffic-management/mirroring.md b/content/docs/tasks/traffic-management/mirroring.md index adbacd6b9e..9227a22e6d 100644 --- a/content/docs/tasks/traffic-management/mirroring.md +++ b/content/docs/tasks/traffic-management/mirroring.md @@ -155,7 +155,7 @@ Let's set up a scenario to demonstrate the traffic-mirroring capabilities of Ist ```command-output-as-json $ export SLEEP_POD=$(kubectl get pod -l app=sleep -o jsonpath={.items..metadata.name}) - $ kubectl exec -it $SLEEP_POD -c sleep -- sh -c 'curl http://httpbin:8080/headers' + $ kubectl exec -it $SLEEP_POD -c sleep -- sh -c 'curl http://httpbin:8080/headers' | python -m json.tool { "headers": { "Accept": "*/*", @@ -212,7 +212,7 @@ Let's set up a scenario to demonstrate the traffic-mirroring capabilities of Ist Now if we send in traffic: ```command - $ kubectl exec -it $SLEEP_POD -c sleep -- sh -c 'curl http://httpbin:8080/headers' + $ kubectl exec -it $SLEEP_POD -c sleep -- sh -c 'curl http://httpbin:8080/headers' | python -m json.tool ``` We should see access logging for both `v1` and `v2`. The access logs created in `v2` is the mirrored requests that are actually going to `v1`.