|
| 1 | +# Presentation Commands |
| 2 | + |
| 3 | +## Architecture |
| 4 | +> Describe the architecture of the application. Describe the artifacts you created to build the docker images and to deploy the application to Kubernetes. |
| 5 | +
|
| 6 | +* Docker architecture |
| 7 | + |
| 8 | +* Kubernetes architecture |
| 9 | + |
| 10 | +* Application |
| 11 | + |
| 12 | +* Show nginx CORS config |
| 13 | +`inventory-api/inventory-api-ingress.yaml` |
| 14 | + |
| 15 | +* TLS |
| 16 | + * Show Certificate in Browser |
| 17 | + * Show Secret in Kubernetes |
| 18 | + `kubectl get secrets` |
| 19 | + `kubectl describe secret inventory-app-tls-secret` |
| 20 | + |
| 21 | +## Configuration |
| 22 | +> Show how you configured the pre-requisites for the application (Load Balancer, Service Mesh, Storage Class, Registry etc). |
| 23 | +
|
| 24 | +* Show microk8s nodes |
| 25 | + * `kubectl get nodes` |
| 26 | + * `kubectl describe node mtfunke-vu-ubuntu` |
| 27 | + (point to IP adress and CPU) |
| 28 | + |
| 29 | +* Show microk8s status |
| 30 | +`microk8s status` |
| 31 | +(point to plugins like MetalLB and HELM3 and ISTIO) |
| 32 | + |
| 33 | +* Show MetalLB Load Balancer |
| 34 | +`kubectl -n metallb-system describe configmap config` |
| 35 | + |
| 36 | +* Show default StorageClass |
| 37 | +`kubectl get sc` |
| 38 | + |
| 39 | +* Show registry |
| 40 | +`microk8s ctr images ls |grep localhost` |
| 41 | + |
| 42 | +## Deployment HELM |
| 43 | +> Show how you build the container images and publish to a registry. Show how you deploy the application. Show how to scale the application horizontally (stateless parts only). Show how to uninstall the application. |
| 44 | +
|
| 45 | +* Build and tag Docker container images API |
| 46 | + * `docker build -t inventory-api:v10 inventory-app/inventory-api/api-server/` |
| 47 | + * `docker tag inventory-api:v10 localhost:32000/inventory-api:v10` |
| 48 | + * `docker push localhost:32000/inventory-api:v10` |
| 49 | + |
| 50 | +* Build and tag Docker container images UI |
| 51 | + * `docker build -t inventory-ui:v10 inventory-app/inventory-ui/ui-client/` |
| 52 | + * `docker tag inventory-ui:v10 localhost:32000/inventory-ui:v10` |
| 53 | + * `docker push localhost:32000/inventory-ui:v10` |
| 54 | + |
| 55 | +* Crate namespace |
| 56 | +`kubectl create namespace inventory-app-helm` |
| 57 | + |
| 58 | +* Install HELM chart |
| 59 | +`helm install inventory-app-helm inventory-app/helm/inventory-app-chart/ -n inventory-app-helm` |
| 60 | + |
| 61 | +* Scale horizontally |
| 62 | +`kubectl -n inventory-app-helm scale deployment/inventory-api-deployment --replicas=5` |
| 63 | + |
| 64 | +* Uninstall HELM chart |
| 65 | +`helm uninstall inventory-app-helm -n inventory-app-helm` |
| 66 | + |
| 67 | + |
| 68 | +## Upgrade |
| 69 | +> Show how you re-build the application after a source code change. Show how you upgrade the running application in two ways: deployment rollout and canary update. |
| 70 | +
|
| 71 | +* Implement API change |
| 72 | + * `app.py` |
| 73 | + * `..v3 DEMO CHANGE` |
| 74 | + |
| 75 | +* Build Docker Image |
| 76 | + * `docker build -t inventory-api:v7 inventory-app/inventory-api/api-server/` |
| 77 | + |
| 78 | +* Tag and push Image for Localhost |
| 79 | + * `docker tag inventory-api:v7-helm localhost:32000/inventory-api:v7-helm` |
| 80 | + * `docker push localhost:32000/inventory-ui:v7-helm` |
| 81 | + |
| 82 | +* Change HELM chart appVersion |
| 83 | + * `helm/inventory-app-chart/charts/inventoryAPI/Chart.yaml` |
| 84 | + |
| 85 | +* Upgrade HELM |
| 86 | + * `helm upgrade inventory-app-helm inventory-app/helm/inventory-app-chart/ -n inventory-app-helm` |
| 87 | + |
| 88 | +* Watch rollout |
| 89 | + * `kubectl -n inventory-app-helm get pods -w` |
| 90 | + |
| 91 | +* Canary update |
| 92 | + * Run two versions in paralell |
| 93 | + * apply (manually) deployment for canary update |
| 94 | + `kubectl -n inventory-app-helm apply -f inventory-api-canary.yaml` |
| 95 | + * Show labels |
| 96 | + `kubectl -n inventory-app-helm get pods --show-labels -w` |
| 97 | + |
| 98 | +## GCloud |
| 99 | +* See video recording for commands and further explanations. |
| 100 | + |
| 101 | +## Istio |
| 102 | +* see `../inventory-app-istio/README.md` |
0 commit comments