Skip to content

Commit 2de694a

Browse files
REadme instructions
1 parent 9821563 commit 2de694a

File tree

3 files changed

+84
-26
lines changed

3 files changed

+84
-26
lines changed

README.md

Lines changed: 83 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,85 @@
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+
![Request dashboard](https://raw.githubusercontent.com/kostis-codefresh/summer-of-k8s-app/main/dashboard.png)
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+
284

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).
585

6-
For deployment we use Argo Rollouts and Ambassador gateway.

deployment.yaml

Lines changed: 0 additions & 21 deletions
This file was deleted.

rollout.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ spec:
1616
spec:
1717
containers:
1818
- name: webserver-simple
19-
image: kostiscodefresh/summer-of-k8s-app:v2
19+
image: kostiscodefresh/summer-of-k8s-app:v1
2020
imagePullPolicy: Always
2121
ports:
2222
- containerPort: 8080

0 commit comments

Comments
 (0)