Canary Deployment Strategy

This deployment technique in Kubernetes gradually rolls out updates to applications by exposing them to a subset of users or traffic before making them available to the entire user base. Thus, it allows the users to validate the new version’s performance, stability, and user experience in a controlled environment before fully deploying it.

  • The following YAML can be used to implement this kind of deployment:
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-app
spec:
replicas: 3
selector:
matchLabels:
app: my-app
template:
metadata:
labels:
app: my-app
spec:
containers:
- name: my-app-container
image: my-image:latest
---
apiVersion: v1
kind: Service
metadata:
name: my-app-service
spec:
ports:
- port: 80
targetPort: 8080
selector:
app: my-app

Use Case For Canary Deployment Strategy: Canary deployment is useful for applications that want to test new features or changes in a real-world environment before making them available to all users. Thus, we can detect the issues early before the the complete deployment.

What Are The Kubernetes Deployment Stratagies ?

Traditionally, applications used to be deployed on the Physical Servers. However, it was not very efficient as multiple instances of the applications running on the server used to consume a lot of resources. Although Virtual Machines running on the Servers tried to solve the issue, resource allocation and slow boot times were still problems. Due to this, Containerization Technologies like Kubernetes came into the picture.

In this article, we will learn in detail about the deployment strategies in Kubernetes that will help us to understand why it is one of the most popular choices among Software Experts. So, let us start without any delay.

Similar Reads

What Is Kubernetes?

Kubernetes, abbreviated as K8s acts as the container orchestration platform to deploy and manage the containerized applications. It allows the system experts to manage the application workloads using the centralized control plane. Now, you might have the question in your mind what is the meaning of containerized applications? So, the container is the unit that encapsulates the applications including its dependencies like binaries, libraries, and configuration files....

Features Of Kubernetes

The following are the features of Kubernetes:...

Understanding Of Kubernetes Deployment

Before going to the deployment strategies, first, let us understand what is deployment in Kubernetes. The deployment is a resource object used to manage the rollout and scaling of applications. This resource object defines the desired state of a set of identical pods and ensures that their actual state matches this desired state....

Deployment Strategies In Kubernetes

There are different approaches through which we can manage our containerized applications. These different deployment strategies allow us to roll out the updates to the applications with minimal downtime. Let us see different strategies so that we can select the right deployment plan as per the requirements. The following are the some of the popularly known kubernetes Deployment Strategies:...

Recreate Deployment Strategy

In Kubernetes, the Recreate Deployment Strategy is one of the simplest approaches to updating applications. This strategy down all existing pods of the previous version of the application and then creates new pods for the updated version. In other words, it terminates all running instances of the old version and replaces them with instances of the new version....

Rolling Update Deployment Strategy

The Rolling Update Deployment Strategy is the most commonly used approach for updating applications. This approach gradually replaces the instances of the previous version of the application with instances of the updated version, one at a time. This reduces the downtime and improves the performance....

Blue-Green Deployment Strategy

The Blue-Green Deployment focuses on running two identical environments, referred to as blue and green. An important point to note is that both these environments run concurrently. The blue environment represents the current production version of the application, while the green environment represents the new version being deployed....

Canary Deployment Strategy

This deployment technique in Kubernetes gradually rolls out updates to applications by exposing them to a subset of users or traffic before making them available to the entire user base. Thus, it allows the users to validate the new version’s performance, stability, and user experience in a controlled environment before fully deploying it....

A/B Testing Deployment Strategy

The A/B Testing Deployment Strategy compares two or more versions of applications by serving different versions to different subsets of users or traffic. This approach allows users to evaluate performance, usability, and effectiveness of different versions and make data-driven decisions about which version to deploy to entire user base. It is also called as Split Testing....

Shadow Deployment Strategy

Shadow Deployment in Kubernetes tests new versions or changes to an application in a production-like environment without impacting the existing production workload. It involves running parallel deployment of the new version alongside existing production deployment, allowing users to observe and compare behavior and performance of new version without affecting users or disrupting service....

Conclusion

Kubernetes allows us to containerize and manage software applications in efficient manner. The containers, which are organized into pods(logical units) can be deployed across multiple environments. Different Kubernetes Deployment Strategies allow us to deploy and update applications dynamically with minimal downtime. We have now gained enough insights about Kubernetes and its deployment strategies. Now, we can easily select appropriate Kubernetes deployment strategies as per the requirements....

Kubernetes Deployment Strategies – FAQ’s

What Are The Key Components Of The Kubernetes?...