Posts

Showing posts from March, 2025

Service

Image
  The mandatory one is the port , the targetport if not mentioned will be assumed to be the same as port and nodeport will be assigned with a range between 30000 to 32767 , if not explicitly defined.

Networking

Image
Kubernetes expects us to establish a networking solution where all Node should be able to communicate to the Pods/Containers and all Pods should be able to communicate to all Nodes in the cluster. There are several third-party solutions provided to us by third-party solutions  When it comes to third-party networking solutions for Kubernetes (K8s) clusters, there are several robust options available. These solutions often integrate seamlessly with Kubernetes using the Container Network Interface (CNI) API. Here are a few notable ones: Calico : A popular choice for networking and network policy enforcement. It supports both overlay and non-overlay networks and provides flexibility for various deployment scenarios 2 . Cisco ACI Networks : Cilium : Known for its eBPF-based data plane, Cilium offers advanced networking, observability, and security features. It can also replace kube-proxy for improved performance. Flannel : A simple and lightweight overlay network provider that works wel...

Deployment

Image
 Deployment :-  In a rolling update in Kubernetes, the existing ReplicaSet is not taken down completely before deploying a new one. Instead, the update process is gradual, ensuring minimal downtime and high availability of your application. Here's how it works: Create a New ReplicaSet : A new ReplicaSet is created to represent the updated version of the application. Gradual Scaling : Kubernetes incrementally scales up the new ReplicaSet while simultaneously scaling down the old one. The exact number of pods added or removed during each step is controlled by the maxSurge and maxUnavailable parameters in the update strategy. maxSurge : The maximum number of extra pods that can run above the desired number of replicas during the update. maxUnavailable : The maximum number of pods that can be unavailable during the update. Progress Monitoring : The process continues until all pods of the old ReplicaSet are replaced by the new ones. If any issues occur, Kubernetes can pause or r...

Replicaset and Replication Controller

ReplicationController and ReplicaSet are both fundamental components in Kubernetes used to manage the replication and scaling of pods. Here's a comparison to help you understand their differences and use cases: ReplicationController Purpose : Ensures a specified number of pod replicas are running at any given time. Selectors : Uses equality-based selectors (e.g., app=nginx ). Creation : Now considered legacy; replaced by ReplicaSets and Deployments. Usage : Used mainly in earlier versions of Kubernetes but still available for backward compatibility. ReplicaSet Purpose : Similar to ReplicationController but offers more flexible selector options. Selectors : Supports both equality-based and set-based selectors (e.g., app in (nginx, apache) ). Creation : Typically created indirectly by Deployments. Usage : Preferred over ReplicationControllers due to its improved selector capabilities and integration with Deployments. Key Differences Selectors : ReplicaSet supports set-based selectors...