Posts

Showing posts from August, 2025

K8s - QnA

Image
  1. What are the key differences between a Deployment and a StatefulSet in Kubernetes? -> Deployment is stateless(nothing stored), StatefulSet stores data in the volume to process. -> Deployment pod name does not follow order, StatefulSet follows ordering of numbers. -> Deployment pod scaling are random, StatefulSet pod scaling follows strict order (new to old). -> Replaced pod get new name, StatefulSet pod gets the same name. -> Rolling updates can be fast and parallel, stateful deployments are ordered and controlled. 2. How would you safely perform a node upgrade in a Kubernetes cluster? -> Considering the question refers to node in Data plane. -> Cordon the node first to mark it as SCHEDULING DISABLED. -> Drain the node to let the pods to be created across other nodes. -> While draining we can ignore "daemon-sets". kubectl cordon: Prevent New Pods - Purpose: Marks a node as unschedulable. - Effect: No new pods will be scheduled on the node. - Ex...

AWS - Immutable Deployment

Image
  The AWS service most commonly associated with immutable deployments is AWS Elastic Beanstalk . Immutable deployment is often confused with blue/green deployment strategy. The word immutable means something that is unchanging over time or unable to be changed . It’s often used to describe things that are fixed, permanent, or resistant to modification. Let's say your application is deployed as below: So, we have a load balancer with a target group attached to a auto scaling group and there are 3 instances serving traffic for an application version1. Now, you want to deploy application of version2 without any downtime using Immutable deployment strategy.  This starts by creating a another ASG with one instance deployed with application version2. At this moment, there are totally 4 instances. And the load balancer routes traffic to all the 4 instances in round robin fashion. Once the new instances look good, ASG count on v2 version increased by 2 and the ASG count on v1 is s...