Implementing GitOps for Kubernetes in AWS
GitOps is a way of approaching configuration, automation, and application management for Kubernetes and other cloud-native technologies. In traditional DevOps pipelines for Kubernetes, you might manage the configuration of Kubernetes by using an Infrastructure as Code (IaC) solution like Cloudformation or Terraform. You might then use any number of technologies to manage your build and deployment pipeline, including Jenkins, CodePipeline, Github Actions, and many others. While these are valid tools to use and no organization's needs are the same, GitOps provides another layer of abstraction and productivity by allowing developers to control both the deployment and configuration of Kubernetes and other technologies by using Git as a single source of truth, while still using your favorite tools to manage your pipelines. Companies adopt GitOps in part because of the consistency and standardization it offers and the high reliability offered by being able to use Git rollbacks to affect environments.
In this lab, you'll start with a pre-provisioned environment that uses hosts Kubernetes on an EC2 instance and uses AWS CodePipeline to manage an automated deployment pipeline for a simple containerized Node.js application. You'll then update the setup to manage the configuration, deployment, and automation of the app using GitOps principles and tools, including Weave Flux and Helm.
Upon completion of this lab you will be able to:
- Be a more productive Kubernetes developer
- Use modern tools to increase the efficiency of your pipeline
- Use GitOps to make Kubernetes development easier for developers
This lab is intended for:
- Cloud engineers and architects
- DevOps engineers
You should be familiar with:
June 12th, 2023 - Resolved an issue that caused the lab to fail to provision on rare occasions
March 7th, 2023 - Updated lab to use aws/codebuild/standard:6.0 image
March 16th, 2022 - Updated docker image and instructions
October 9th, 2021 - Clarified the instructions
September 14th, 2021 - Addressed an issue with Helm initialization
December 24th, 2020 - Update the stable repo used by Helm
October 13th, 2020 - Modified an instruction to handle an issue with opening the workspace in the IDE
Matt has worked for multiple Fortune 500 companies as a DevOps Engineer and Solutions Architect. He is an AWS Certified DevOps Engineer - Professional, and an AWS Certified Solution Architect - Associate. He enjoys reading and learning new technologies.