Application deployments in k8s
- The basic process
- Manifests (static or dynamic)
- From CI/CD whenever the code is merged
- Build docker images
- update manifests (use –values)
- Update deployment (kubectl or helm )
- Apporach is push
GitOPS
- The manifest or helm will be the source (Git repo)
- whenever the source is changed the deployment will be updated automatically
- whenever there is change the deployment is automatically updated (pull)
- A system which does this approach is referred as gitops
-
Popular gitops tools
- ArgoCD
- FluxCD
- Jenkinsx
- Tekton
- In our k8s cluster we deploy gitops tool
- Now gitops tool can work in the same cluster or other clusters can also be enabled.
Service Mesh
- Generally when service mesh is enabled without changing the containers we can control network
- Circuit breaking
- Routing
- Header Based
- Traffic splitting
- SSL/TLS enabling.
- Observability Tools
- Fault injection
- Popular service mesh:
- istio
- Linkerd
AKS-Store
- This is a sample app which represents the microservices built by Microsoft
- Refer Here for the article on aks store
- To deploy this to aks Refer Here
- refer to run on any kubernetes in the page Refer Here
- Refer Here for the repository
Activity 1: – Docker
- Create a virtual machine in azure/aws and clone the repo at Refer Here
- Try building all the docker images
- Create an azure container registry
- Push the images to azure container registry
-
If you know Github Actions:
- Create a workflow to build the images and push them to acr
- Try running the application from docker compose and accesing it.
-
Learning objectives:
- understand dockerfiles of different languages
- understand docker compose
- learn creating a private registry and setting the image names according to registry convention.
Activity -2
- Compare the docker compose file and from that create a k8s manifests.
- Compare your manifests to Refer Here
