Chapter 5. Continuous Integration, Testing, and Deployment

In this chapter, we look at the key concepts of how to integrate a continuous integration/continuous deployment (CI/CD) pipeline to deliver your applications to Kubernetes. Building a well-integrated pipeline will enable you to deliver applications to production with confidence, so here we look at the methods, tools, and processes to enable CI/CD in your environment. The goal of CI/CD is to have a fully automated process, from a developer checking in code to rolling out the new code to production. You want to avoid manually rolling out updates to your apps deployed to Kubernetes because it can be very error prone. Manually managing application updates in Kubernetes leads to configuration drift and fragile deployment updates, and overall agility delivering an application is lost.

We cover the following topics in this chapter:

  • Version control

  • Continuous integration

  • Testing

  • Container builds

  • Container image tagging

  • Continuous deployment

  • Deployment strategies

  • Testing in production

  • Chaos testing

We also go through an example CI/CD pipeline, which consists of the following tasks:

  • Pushing code changes to the Git repository

  • Running a build of the application code

  • Running test against the code

  • Building a container image on a successful test

  • Pushing the container image to a container registry

  • Deploying the application to Kubernetes

  • Running a test against a deployed application

  • Performing rolling ...

Get Kubernetes Best Practices, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.