DevOps practices will regularly make use of deployments to manage application deployment, there are three popular deployment strategies .
- from a high-level perspective this type of deployment consists of two identical environments in front of which is a load balancer that allows you to direct traffic to the appropriate environment.
- deploying an application in small incremental steps to a small group of clients this is achieved by routing only some percentage of the traffic to the new application or by using a toggle feature (basically a snippet of code that serves to activate or deactivate a certain feature in a given code base)
- also know as Rolling deployment which is the process of deploying the application by slowly replacing currently running instances of the application with newer ones as soon as they’re ready to receive traffic
The central component of a deployment strategy is the k8s object named deployment which is nothing more than a manifest that allows you to:
- Deploy a replica set or pod
- Update pods and replica sets
- Rollback to previous deployment versions
- Scale a deployment
- Pause/Resume a deployment
There are many more deployment strategies but they key takeaway is that a well chosen deployment strategy will allow to change or upgrade an application with minimum amount of downtime.