mirror of https://github.com/istio/istio.io.git
Removal of -it in kubectl commands. (#8216)
This commit is contained in:
parent
07f51b347a
commit
106eac2db1
|
@ -44,14 +44,14 @@ tests, end-to-end tests and tests in a staging environment.
|
|||
1. Send a request to the pod and see that it returns the correct result:
|
||||
|
||||
{{< text bash >}}
|
||||
$ kubectl exec -it $(kubectl get pod -l app=sleep -o jsonpath='{.items[0].metadata.name}') -- curl $REVIEWS_V2_POD_IP:9080/reviews/7
|
||||
$ kubectl exec $(kubectl get pod -l app=sleep -o jsonpath='{.items[0].metadata.name}') -- curl "$REVIEWS_V2_POD_IP:9080/reviews/7"
|
||||
{"id": "7","reviews": [{ "reviewer": "Reviewer1", "text": "An extremely entertaining play by Shakespeare. The slapstick humour is refreshing!", "rating": {"stars": 5, "color": "black"}},{ "reviewer": "Reviewer2", "text": "Absolutely fun and entertaining. The play lacks thematic depth when compared to other plays by Shakespeare.", "rating": {"stars": 4, "color": "black"}}]}
|
||||
{{< /text >}}
|
||||
|
||||
1. Perform primitive load testing by sending a request 10 times in a row:
|
||||
|
||||
{{< text bash >}}
|
||||
$ kubectl exec -it $(kubectl get pod -l app=sleep -o jsonpath='{.items[0].metadata.name}') -- sh -c "for i in 1 2 3 4 5 6 7 8 9 10; do curl -o /dev/null -s -w '%{http_code}\n' $REVIEWS_V2_POD_IP:9080/reviews/7; done"
|
||||
$ kubectl exec $(kubectl get pod -l app=sleep -o jsonpath='{.items[0].metadata.name}') -- sh -c "for i in 1 2 3 4 5 6 7 8 9 10; do curl -o /dev/null -s -w '%{http_code}\n' $REVIEWS_V2_POD_IP:9080/reviews/7; done"
|
||||
200
|
||||
200
|
||||
...
|
||||
|
|
|
@ -95,7 +95,7 @@ microservice.
|
|||
with a curl command from your testing pod:
|
||||
|
||||
{{< text bash >}}
|
||||
$ kubectl exec -it $(kubectl get pod -l app=sleep -o jsonpath='{.items[0].metadata.name}') -c sleep -- curl productpage:9080/productpage | grep -o "<title>.*</title>"
|
||||
$ kubectl exec $(kubectl get pod -l app=sleep -o jsonpath='{.items[0].metadata.name}') -c sleep -- curl productpage:9080/productpage | grep -o "<title>.*</title>"
|
||||
<title>Simple Bookstore App</title>
|
||||
{{< /text >}}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ Test your microservice, in production!
|
|||
1. Issue an HTTP request from the testing pod to one of your services:
|
||||
|
||||
{{< text bash >}}
|
||||
$ kubectl exec -it $(kubectl get pod -l app=sleep -o jsonpath='{.items[0].metadata.name}') -- curl http://ratings:9080/ratings/7
|
||||
$ kubectl exec $(kubectl get pod -l app=sleep -o jsonpath='{.items[0].metadata.name}') -- curl http://ratings:9080/ratings/7
|
||||
{{< /text >}}
|
||||
|
||||
## Chaos testing
|
||||
|
@ -30,7 +30,7 @@ the pods' status with `kubectl get pods`.
|
|||
1. Terminate the `details` service in one pod.
|
||||
|
||||
{{< text bash >}}
|
||||
$ kubectl exec -it $(kubectl get pods -l app=details -o jsonpath='{.items[0].metadata.name}') -- pkill ruby
|
||||
$ kubectl exec $(kubectl get pods -l app=details -o jsonpath='{.items[0].metadata.name}') -- pkill ruby
|
||||
{{< /text >}}
|
||||
|
||||
1. Check the pods status:
|
||||
|
@ -58,7 +58,7 @@ the pods' status with `kubectl get pods`.
|
|||
1. Terminate the `details` service in all its pods:
|
||||
|
||||
{{< text bash >}}
|
||||
$ for pod in $(kubectl get pods -l app=details -o jsonpath='{.items[*].metadata.name}'); do echo terminating $pod; kubectl exec -it $pod -- pkill ruby; done
|
||||
$ for pod in $(kubectl get pods -l app=details -o jsonpath='{.items[*].metadata.name}'); do echo terminating "$pod"; kubectl exec "$pod" -- pkill ruby; done
|
||||
{{< /text >}}
|
||||
|
||||
1. Check the webpage of the application:
|
||||
|
|
Loading…
Reference in New Issue