hands-on lab

Implementing GitOps for Kubernetes in AWS

Difficulty: Advanced
Duration: Up to 1 hour and 30 minutes
Students: 906
Rating: 4.3/5
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.

Description

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.

Note: AWS closed access to the AWS CodeCommit service to new customers on the 25th of July 2024. This AWS CodeCommit lab is functional and may be useful to students expecting to work with existing AWS CodeCommit repositories.

Lab Objectives

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

Intended Audience

This lab is intended for:

  • Developers
  • Cloud engineers and architects
  • DevOps engineers

Prerequisites

You should be familiar with:

Updates

October 27th, 2024 - Resolved an issue preventing the lab from provisioning successfully

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

Environment before

Environment after

Covered topics

Lab steps

Logging In to the Amazon Web Services Console
Connecting to the CloudAcademy Web based Containers IDE Port 8080
Reviewing a DevOps Pipeline for Kubernetes in AWS
Deploying a Kubernetes Application with AWS CodePipeline
Implementing GitOps for Kubernetes in AWS
Validating GitOps for Kubernetes in AWS