Performing rolling updates to the application with a new software version
The rolling updates feature of Kubernetes allows Deployments to be updated with zero downtime. It handles the upgrading of pods' instances with new ones in an incremental manner, and new pods would be scheduled on Nodes that have resources available.
Some key features of rolling updates are listed here:
- Transferring an application from one environment to another (via container image updates).
- Rollback to a prior version of the application.
- With minimal downtime, continuous integration and continuous delivery (CI/CD) of applications are achievable.
We are going to reuse the same example of the nginx sample deployment that we used earlier. We can update the same deployment by applying the following new YAML file.
This YAML file specifies that the deployment should be updated to use the nginx 1.16.1
container image instead of nginx.1.14.2
:
apiVersion: apps/v1 kind: Deployment...