SLO Validation with Traffic Shifting¶
Scenario: SLO validation with progressive traffic shift
This tutorial illustrates an SLO validation experiment with two versions; the candidate version will be promoted after Iter8 validates that it satisfies service-level objectives (SLOs). You will:
- Specify latency and error-rate based service-level objectives (SLOs). If the candidate version satisfies SLOs, Iter8 will declare it as the winner.
- Use Iter8's built-in capabilities for collecting latency and error-rate metrics.
- Combine SLO validation with progressive traffic shifting.
Platform setup
- Setup Kubernetes cluster
- Install Iter8 in Kubernetes cluster
- Install Knative in Kubernetes cluster
- Get Helm 3.4+.
- Get
iter8ctl
- Fork the Iter8 GitHub repo. Clone your fork, and set the
ITER8
environment variable as follows.export USERNAME=<your GitHub username>
git clone git@github.com:$USERNAME/iter8.git cd iter8 export ITER8=$(pwd)
Follow these steps to install Iter8 and Knative in your K8s cluster.
1. Create app versions¶
Deploy two versions of a Knative app.
kubectl apply -f $ITER8/samples/knative/quickstart/baseline.yaml
kubectl apply -f $ITER8/samples/knative/quickstart/experimentalservice.yaml
kubectl wait --for=condition=Ready ksvc/sample-app
Look inside baseline.yaml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|
Look inside experimentalservice.yaml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
|
2. Launch experiment¶
Launch the SLO validation experiment. This experiment will generate requests for your application versions, collect latency and error-rate metrics, and progressively shift traffic and promote the candidate version after verifying that it satisfies SLOs.
kubectl apply -f $ITER8/samples/knative/quickstart/experiment.yaml
Look inside experiment.yaml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
|
3. Observe experiment¶
Follow these steps to observe your experiment.
4. Cleanup¶
kubectl delete -f $ITER8/samples/knative/quickstart/experiment.yaml
kubectl delete -f $ITER8/samples/knative/quickstart/experimentalservice.yaml