README.md 1.24 KB
Newer Older
Ijaz Ahmad's avatar
Ijaz Ahmad committed
1
# GitOps-style Continuous Delivery For Kubernetes With Gitlab
2 3 4 5 6 7 8

GitOps is a Continuous Delivery approach [first described by Weaveworks](https://www.weave.works/blog/gitops-operations-by-pull-request) that is
popular in the Kubernetes community. A key part of GitOps is the idea of
"environments-as-code": describing your deployments declaratively by files (for
example, Kubernetes manifests) stored in a Git repository.

In this tutorial, you create a CI/CD pipeline that automatically builds a
Ijaz Ahmad's avatar
Ijaz Ahmad committed
9 10
container image from commited code, stores the image in Gitlab Registry, updates a Kubernetes manifest in a Git repository and triggers a
deployment to Kubernetes using that manifest.
11 12

In the end, you have a system where:
Ijaz Ahmad's avatar
Ijaz Ahmad committed
13
* You have a view of successful and failed deployments.
14
* You can rollback to any previous deployment by re-executing the corresponding
Ijaz Ahmad's avatar
Ijaz Ahmad committed
15
  job in Gitlab CI/CD pipeline.
Ijaz Ahmad's avatar
Ijaz Ahmad committed
16 17 18 19 20 21 22 23 24 25


# Setup

  - Install and configure Gitlab shell runner on your build machine/runner/node
  - Make sure kubectl is installed on runner and is availble to gitlab-runner user
  - Upload your cluster kubeconfig to gitlab-runner home directory
  - Test kubeconfig is working on runner
  - Make sure docker is installed on runner
  - Fork this project and assign it to your specific runner