Git Based Workflows for Deploying Applications on Kubernetes
Shahidh K Muhammed
Git is an integral part of every developer’s workflow. With platforms like Kubernetes, which focus on running applications as containers, developers need to take care of shipping their code on to these platforms by using tools like kubectl. Since git is already in every developer’s toolbox, building workflows around it makes it intuitive to use. This means that with a little bit of smart hacking you can use git for doing devops and remove the need for using kubectl or any other tooling in our regular workflows. An emerging pattern (called GitOps) revolves around managing ops using just git. K8s deployments are particularly easy to manage using git, as k8s can make devops declarative.
We’ll look into setting up such systems, especially using git-hooks, which can be used to mask the gory details of
kubectl applys and
docker builds. The demo will be useful for application developers as well as Kubernetes administrators for setting up their own customised flows.
- Developers will learn how kubernetes makes devops declarative and thus amenable to GitOps
- Developers will learn how to use git-hooks to build their own devops tooling so that git is the only tool required for devops
- Why git-based workflows are useful for developer teams
- Functional requirements for such workflows (templating, multiple environments, integration with existing CI/CD systems etc.)
- DIY tooling setup for Kubernetes which allow developers to set-up their own workflows
- Using git-pre-push and git-pre-receive hooks for
- Demo of integrating such a system with a Kubernetes cluster, from scratch
Shahidh is a senior platform engineer at Hasura and heads the development of the Hasura CLI. He has been working extensively with Kubernetes since the pre-1.0 versions, from building installers to writing developer tools.
Shahidh is a co-author of Gitkube (https://github.com/hasura/gitkube), an open-source tool to deploy applications onto Kubernetes using git. He, along with the team at Hasura, are exploring ways to make application deployment to Kubernetes easier, leveraging workflows around Git.
Shahidh is a regular speaker at many Golang and Kubernetes meetups. He also co-hosts the weekly CNCF certified meetup, Koffee with Kubernetes in Bengaluru.