-
Notifications
You must be signed in to change notification settings - Fork 8
/
runbook.ps
57 lines (47 loc) · 1.62 KB
/
runbook.ps
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
55
56
57
#Version 1
kubectl apply -n ns-dev -f frontend.yaml
kubectl apply -n ns-dev -f frontend-service.yaml
#Version 2
#frontend
kubectl apply -n ns-dev -f frontend-configmap.yaml
kubectl apply -n ns-dev -f frontend.yaml
#backend
kubectl apply -n ns-dev -f backend-secret.yaml
kubectl apply -n ns-dev -f backend.yaml
kubectl apply -n ns-dev -f backend-service.yaml
kubectl apply -n ns-dev -f backend-service.yaml
#mongodb
kubectl apply -n ns-dev -f mongodb-secret.yaml
kubectl apply -n ns-dev -f mongodb-persistent-volume.yaml
kubectl apply -n ns-dev -f mongodb-persistent-volume-claim.yaml
kubectl apply -n ns-dev -f mongodb.yaml
kubectl apply -n ns-dev -f mongodb-service.yaml
#Remove the above resources
kubectl delete deploy -n ns-dev backend
kubectl delete deploy -n ns-dev frontend
kubectl delete deploy -n ns-dev mongodb
kubectl delete svc -n ns-dev backend
kubectl delete svc -n ns-dev frontend
kubectl delete svc -n ns-dev mongodb
#Version 5
cd ..
cd ..
helm install -n ns-dev demo-helm guestbook #release + chart
#Update the app version to 1.1 in the charet.yaml
#Update the image version to 1.1 in frontend.yaml
helm upgrade -n ns-dev demo-helm guestbook
#Check Helm Revision
helm status demo-helm -n ns-dev
# !!!!! Bug in the System !!!
# Rollback
helm rollback -n ns-dev demo-helm 1
# Lets check out the history
helm history -n ns-dev demo-helm
# Major Version upgrade -- App version, image version and helm version changes
# Version 6
# Get current version of the release
helm list --short
helm upgrade -n ns-dev demo-helm guestbook
#Delete all resources -- Optional
helm uninstall -n ns-dev demo-helm
kubectl delete pvc -n ns-dev mongodb-pvc