Setting up a CD pipeline
You already have a pipeline with a CI job that will build a new container image. In this section, you'll add a CD job to that pipeline that will deploy the updated container image to a deployment in Kubernetes.
To simplify the application deployment, a Helm Chart for the application has been provided in the website
folder inside Chapter 15
. You can deploy the application by deploying the Helm Chart. By deploying using a Helm Chart, you can override the Helm values using the command line. You've done this in Chapter 12, Connecting an app to an Azure database, when you configured WordPress to use an external database.
In this CD job you will need to execute the following steps:
- Check out the code.
- Get AKS credentials.
- Set up the application.
- (Optional) Get the service's public IP.
Let's start building the CD pipeline. For your reference, the full CI and CD pipeline has been provided in the pipeline-cicd.yaml...