chapter eleven

11 Dockerized Microservices on K8s

 

This chapter covers

  • Setting up a Kubernetes cluster on AWS with Terraform.
  • Automating deployment of applications on Kubernetes with Jenkins pipelines.
  • Packaging and versioning of Kubernetes Helm Charts.
  • Converting Compose files to Kubernetes manifests with Kompose
  • Running post-deployment tests and health checks within CI/CD pipelines.
  • Discovering Jenkins X and setup of Serverless CI/CD pipelines.

In the previous chapter, we covered how to set up a CI/CD pipeline from scratch for containerized applications running in Docker Swarm. In this chapter, we will cover how to deploy the same application in Kubernetes (K8s) and automate the deployment. As well, how to use Jenkins X to simplify the workflow of cloud-native applications running in Kubernetes.

Figure 11.1. Current CI/CD pipeline workflow

Docker Swarm might be a good solution for beginners and smaller workloads. However, for large deployment and at a certain scale, you might want to consider shifting to Kubernetes.

For those of you who are AWS power users, Amazon EKS is a natural fit. Other cloud providers offer managed Kubernetes solutions like Azure Kubernetes Service (AKS) and Google Kubernetes Engine (GKE).

11.1  Setting up a Kubernetes Cluster

11.2  Automating Continuous Deployment Flow with Jenkins

11.2.1    Migrating Docker Compose to K8s Manifests with Kompose

11.3  Walking Through Continuous Delivery Steps

11.4  Packaging Kubernetes Applications with Helm

11.5  Running Post-Deployment Smoke Tests

11.6  Discovering Jenkins X

11.7  Summary