|
1 | | -# Summer of K8s example manifests |
| 1 | +# Summer of K8s Example application for Argo Rollouts |
| 2 | + |
| 3 | +This repository contains the Kubernetes manifest |
| 4 | +for the [summer of K8s](https://www.getambassador.io/summer-of-k8s) Argo rollouts example. |
| 5 | + |
| 6 | +The actual source code is at [https://github.com/kostis-codefresh/summer-of-k8s-app](https://github.com/kostis-codefresh/summer-of-k8s-app) |
| 7 | + |
| 8 | +## Prerequisite |
| 9 | + |
| 10 | +1. Get access to a Kubernetes cluster |
| 11 | +2. Install Argo Rollouts following the [instructions](https://argoproj.github.io/argo-rollouts/installation/). Be sure to install the CLI as well |
| 12 | +3. Install Ambassador Edge stack following the [instructions](https://www.getambassador.io/docs/edge-stack/latest/tutorials/getting-started/) |
| 13 | + |
| 14 | +## Making the first deployment |
| 15 | + |
| 16 | +``` |
| 17 | +git clone https://github.com/kostis-codefresh/summer-of-k8s-app-manifests |
| 18 | +cd summer-of-k8s-app-manifests |
| 19 | +kubectl create namespace demo |
| 20 | +kubectl apply -f . -n demo |
| 21 | +``` |
| 22 | + |
| 23 | +Wait for some time for the application to come up |
| 24 | +``` |
| 25 | +kubectl get pods -n demo |
| 26 | +``` |
| 27 | + |
| 28 | +Get the ambassdor URL |
| 29 | +``` |
| 30 | +kubectl get svc ambassador -n ambassador |
| 31 | +``` |
| 32 | + |
| 33 | +Note down the "External IP" URL (for example 32.98.176.18) |
| 34 | + |
| 35 | + |
| 36 | +Visit the application at https://32.98.176.18/demo/ |
| 37 | + |
| 38 | +## Make a rollout canary release |
| 39 | + |
| 40 | +Open a second terminal and watch the canary |
| 41 | + |
| 42 | +kubectl-argo-rollouts watch summer-k8s-rollout -n demo |
| 43 | + |
| 44 | +Edit file rollout.yaml |
| 45 | +and change line `kostiscodefresh/summer-of-k8s-app:v1` to `kostiscodefresh/summer-of-k8s-app:v2` |
| 46 | + |
| 47 | +Deploy the second version |
| 48 | + |
| 49 | +``` |
| 50 | +kubectl apply -f rollout.yaml -n demo |
| 51 | +``` |
| 52 | + |
| 53 | +See the canary status at the second terminal. It should be at 30%. |
| 54 | +Take a screenshot to submit later in the evaluation phase. |
| 55 | + |
| 56 | +If you also visit the application again you should see some boxes |
| 57 | +with the new version |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | +Take a screenshot to submit later in the evaluation phase. |
| 62 | + |
| 63 | +Promote the canary to 60% with |
| 64 | + |
| 65 | +``` |
| 66 | +kubectl argo rollouts promote summer-k8s-rollout -n demo |
| 67 | +``` |
| 68 | + |
| 69 | +Check the dashboard and terminal again |
| 70 | + |
| 71 | +Promote the canary two more times to reach 100% |
| 72 | + |
| 73 | +``` |
| 74 | +kubectl argo rollouts promote summer-k8s-rollout -n demo |
| 75 | +``` |
| 76 | + |
| 77 | +Now the old version is no longer present |
| 78 | + |
| 79 | +Submit your solution at [https://www.getambassador.io/summer-of-k8s/ship/week3/](https://www.getambassador.io/summer-of-k8s/ship/week3/) |
| 80 | + |
| 81 | + |
| 82 | + |
| 83 | + |
2 | 84 |
|
3 | | -Kubernetes manifests for the application at [https://github.com/kostis-codefresh/summer-of-k8s-app |
4 | | -](https://github.com/kostis-codefresh/summer-of-k8s-app). |
5 | 85 |
|
6 | | -For deployment we use Argo Rollouts and Ambassador gateway. |
|
0 commit comments