7 Getting to continuous delivery

 

This chapter covers

  • Deploying containers to your Kubernetes cluster
  • Working with Terraform to configure Kubernetes
  • Creating an automated deployment pipeline for your application
  • Using Bitbucket Pipelines for continuous delivery

In this chapter, we bring an early version of our microservices application to production. Having just created an empty Kubernetes cluster in the previous chapter, we are now ready to deploy containers to it.

First, we’ll deploy our MongoDB database and RabbitMQ servers. Then, we’ll deploy our first microservice to the Kubernetes cluster: the video-streaming microservice we created way back in chapter 2 (you’ve come such a long way since then).

After learning how to use Terraform to deploy containers to Kubernetes, we’ll wrap up our deployment process in an automated continuous delivery (CD) pipeline. At that point, updating our infrastructure and application will be achieved by pushing code changes to our hosted code repository. Exciting times!

If you find this chapter difficult to follow, don’t worry. This chapter and the previous one are probably the most difficult chapters in the book, so please push through! Following along with the examples is the best way to gain experience. At the end of this chapter, your application will be live in production, and you need to know for yourself how good that feels!

7.1 New and familiar tools

7.2 Getting the code

7.3 Continuing to evolve our infrastructure

7.4 Continuous delivery (CD)

7.5 Deploying containers with Terraform

7.5.1 Configuring the Kubernetes provider

7.5.2 Deploying our database

7.5.3 Preparing for continuous delivery

7.5.4 Testing the new database server

7.5.5 Deploying and testing RabbitMQ

7.5.6 Tightening our security