Implementing a continuous delivery pipeline for containerized applications is quite simple. Let's remember what we have learnt about Docker and Kubernetes so far and organize them into the CD pipeline. Suppose we've done our code, Dockerfile, and corresponding Kubernetes templates. To deploy them to our cluster, we'd go through the following steps:
- docker build: Produces an executable immutable artifact.
- docker run: Verifies if the build works with some 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.
That's all for a simple but viable delivery pipeline.