Implementing a CD pipeline for containerized applications is quite simple. Let's recall what practices we learned about Docker and Kubernetes so far and organize those practices into the CD pipeline. Suppose we've finished our code, Dockerfile, and corresponding Kubernetes templates. To deploy these to our cluster, we'd go through the following steps:
- docker build: Produces an executable and immutable artifact
- docker run: Verifies whether the build works with a simple test
- docker tag: Tags the build with meaningful versions if it's good
- docker push: Moves the build to the artifacts repository for distribution
- kubectl apply: Deploys the build to a desired environment
- kubectl rollout status: Tracks the progress of deployment tasks
This is all we need for a simple but viable delivery pipeline.
Here, we use the term continuous delivery...