<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Zoheb Shaik on Medium]]></title>
        <description><![CDATA[Stories by Zoheb Shaik on Medium]]></description>
        <link>https://medium.com/@zohebshaik7?source=rss-5413a517b261------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*NWy7Km1B59scRIyg.jpg</url>
            <title>Stories by Zoheb Shaik on Medium</title>
            <link>https://medium.com/@zohebshaik7?source=rss-5413a517b261------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 05:34:43 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@zohebshaik7/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Hybrid Kubernetes Model by Kamaji]]></title>
            <link>https://medium.com/@zohebshaik7/hybrid-kubernetes-model-by-kamaji-93e80e63c296?source=rss-5413a517b261------2</link>
            <guid isPermaLink="false">https://medium.com/p/93e80e63c296</guid>
            <dc:creator><![CDATA[Zoheb Shaik]]></dc:creator>
            <pubDate>Tue, 04 Mar 2025 11:05:27 GMT</pubDate>
            <atom:updated>2025-03-04T11:05:27.666Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Hybrid Kubernetes Infra Scenario</strong>: host the Control Plane on the Cloud and worker nodes on prem or vice-versa, according to your needs.</p><p>In this video, I’ve deployed control plane in Azure AKS, and by leveraging Kamaji, I can add a worker node from AWS.</p><p>It’s worth watching: <a href="https://youtu.be/lSMSAGGAmJo?si=Y6kyHbfXOeWWYLVA">https://youtu.be/lSMSAGGAmJo?si=Y6kyHbfXOeWWYLVA</a></p><p>In case of any questions, you can comment or reach out to me over Linkedin, and I am happy to help.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=93e80e63c296" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Leader election system for Kubernetes:]]></title>
            <link>https://medium.com/@zohebshaik7/leader-election-system-for-kubernetes-e14d0a0a29ac?source=rss-5413a517b261------2</link>
            <guid isPermaLink="false">https://medium.com/p/e14d0a0a29ac</guid>
            <dc:creator><![CDATA[Zoheb Shaik]]></dc:creator>
            <pubDate>Sat, 08 Feb 2025 06:33:41 GMT</pubDate>
            <atom:updated>2025-02-08T06:33:41.508Z</atom:updated>
            <content:encoded><![CDATA[<p>Leader election system for Kubernetes:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/758/1*ytbgqNyy8Y4zJsHcls5dcg.jpeg" /></figure><p>a leader election system for Kubernetes, designed to ensure only one instance acts as a leader among multiple replicas. The system uses resource locks (like annotations in endpoints) to manage leadership state. Key features include:</p><ol><li>Configurable timing parameters:</li></ol><ul><li>LeaseDuration: How long a leader can hold leadership before others can take over</li><li>RenewDeadline: How long a leader has to renew its lease before giving up</li><li>RetryPeriod: Time between leadership acquisition attempts</li></ul><p>2. The system tolerates clock skew between nodes but requires careful configuration of timing parameters to balance leadership stability and failover speed.</p><p>3. Core operations:</p><ul><li>Leader acquisition through tryAcquireOrRenew</li><li>Continuous lease renewal by the leader</li><li>Automatic leadership release on context cancellation (optional)</li><li>Callbacks for leadership transitions</li></ul><p>4. Safety features:</p><ul><li>Lease validation checks</li><li>Leadership transition tracking</li><li>Health checking capabilities</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e14d0a0a29ac" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Azure AKS Cluster Upgrades]]></title>
            <link>https://medium.com/@zohebshaik7/azure-aks-cluster-upgrades-f5abc4b02bc6?source=rss-5413a517b261------2</link>
            <guid isPermaLink="false">https://medium.com/p/f5abc4b02bc6</guid>
            <dc:creator><![CDATA[Zoheb Shaik]]></dc:creator>
            <pubDate>Tue, 21 Jan 2025 18:13:57 GMT</pubDate>
            <atom:updated>2025-01-21T18:13:57.889Z</atom:updated>
            <content:encoded><![CDATA[<p>Can we optimize Azure AKS Cluster Upgrades? The answer is “Yes”</p><p>The combination of <a href="https://learn.microsoft.com/en-us/azure/aks/planned-maintenance">Planned Maintenance Window</a>, <a href="https://learn.microsoft.com/en-us/azure/aks/upgrade-aks-cluster#customize-node-surge-upgrade">Max Surge</a>, <a href="https://kubernetes.io/docs/tasks/run-application/configure-pdb/">Pod Disruption Budget</a>, <a href="https://learn.microsoft.com/en-us/azure/aks/upgrade-aks-cluster#set-node-drain-timeout-value">node drain timeout</a>, and <a href="https://learn.microsoft.com/en-us/azure/aks/upgrade-aks-cluster#set-node-soak-time-value">node soak time</a> can significantly increase the likelihood of node upgrades completing successfully by the end of the maintenance window while also minimizing disruptions.</p><ul><li><a href="https://learn.microsoft.com/en-us/azure/aks/planned-maintenance">Planned Maintenance Window</a> enables service teams to schedule auto-upgrade during a predefined window, typically a low-traffic period, to minimize workload impact. We recommend a window duration of at least <em>four hours</em>.</li><li><a href="https://learn.microsoft.com/en-us/azure/aks/upgrade-aks-cluster#customize-node-surge-upgrade">Max Surge</a> on the node pool allows requesting extra quota during the upgrade process and limits the number of nodes selected for upgrade simultaneously. A higher max surge results in a faster upgrade process. We don’t recommend setting it at 100%, as it upgrades all nodes simultaneously, which can cause disruptions to running applications. We recommend a max surge quota of <em>33%</em> for production node pools.</li><li><a href="https://kubernetes.io/docs/tasks/run-application/configure-pdb/">Pod Disruption Budget</a> is set for service applications and limits the number of pods that can be down during voluntary disruptions, such as AKS-controlled node upgrades. It can be configured as minAvailable replicas, indicating the minimum number of application pods that need to be active, or maxUnavailable replicas, indicating the maximum number of application pods that can be terminated, ensuring high availability for the application. Refer to the guidance provided for configuring <a href="https://kubernetes.io/docs/concepts/workloads/pods/disruptions/#pod-disruption-budgets">Pod Disruption Budgets (PDBs)</a>. PDB values should be validated to determine the settings that work best for your specific service.</li><li><a href="https://learn.microsoft.com/en-us/azure/aks/upgrade-aks-cluster#set-node-drain-timeout-value">Node drain timeout</a> on the node pool allows you to configure the wait duration for eviction of pods and graceful termination per node during an upgrade. This option is useful when dealing with long running workloads. When the node drain timeout is specified (in minutes), AKS respects waiting on pod disruption budgets. If not specified, the default timeout is 30 minutes.</li><li><a href="https://learn.microsoft.com/en-us/azure/aks/upgrade-aks-cluster#set-node-soak-time-value">Node soak time</a> helps stagger node upgrades in a controlled manner and can minimize application downtime during an upgrade. You can specify a wait time, preferably as reasonably close to 0 minutes as possible, to check application readiness between node upgrades. If not specified, the default value is 0 minutes. Node soak time works together with the max surge and node drain timeout properties available in the node pool to deliver the right outcomes in terms of upgrade speed and application availability.</li></ul><p>Majorly I’ve seen Planned Upgrades with PDBs in place.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f5abc4b02bc6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Azure Front Door to secure AKS workloads]]></title>
            <link>https://medium.com/@zohebshaik7/azure-front-door-to-secure-aks-workloads-df803c8a8c8b?source=rss-5413a517b261------2</link>
            <guid isPermaLink="false">https://medium.com/p/df803c8a8c8b</guid>
            <dc:creator><![CDATA[Zoheb Shaik]]></dc:creator>
            <pubDate>Tue, 21 Jan 2025 17:10:41 GMT</pubDate>
            <atom:updated>2025-01-21T17:10:41.781Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*BfMh_XcGMjfWUc8o" /></figure><h3>Workflow architecture:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/687/0*sIvy2J1ntZfcW2Jm" /></figure><h4>Runtime workflow:</h4><p>The following steps describe the message flow for a request that an external client application initiates during runtime. This workflow corresponds to the orange numbers in the preceding diagram.</p><ol><li>The client application uses its custom domain to send a request to the web application. The DNS zone that’s associated with the custom domain uses a <a href="https://en.wikipedia.org/wiki/CNAME_record">CNAME record</a> to redirect the DNS query for the custom domain to the original hostname of the Azure Front Door endpoint.</li><li>Azure Front Door traffic routing occurs in several stages. Initially, the request is sent to one of the <a href="https://learn.microsoft.com/en-us/azure/frontdoor/edge-locations-by-region">Azure Front Door points of presence</a>. Then Azure Front Door uses the configuration to determine the appropriate destination for the traffic. Various factors can influence the routing process, such as the Azure front door caching, web application firewall (WAF), routing rules, rules engine, and caching configuration. For more information, see <a href="https://learn.microsoft.com/en-us/azure/frontdoor/front-door-routing-architecture">Routing architecture overview</a>.</li><li>Azure Front Door forwards the incoming request to the <a href="https://learn.microsoft.com/en-us/azure/private-link/private-endpoint-overview">Azure private endpoint</a> that’s connected to the <a href="https://learn.microsoft.com/en-us/azure/private-link/private-link-service-overview">Private Link service</a> that exposes the AKS-hosted workload.</li><li>The request is sent to the Private Link service.</li><li>The request is forwarded to the <em>kubernetes-internal</em> AKS internal load balancer.</li><li>The request is sent to one of the agent nodes that hosts a pod of the NGINX ingress controller.</li><li>One of the NGINX ingress controller replicas handles the request.</li><li>The NGINX ingress controller forwards the request to one of the workload pods.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=df803c8a8c8b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Multi-Cloud Communication for Kubernetes]]></title>
            <link>https://medium.com/@zohebshaik7/multi-cloud-communication-for-kubernetes-1d52956285c4?source=rss-5413a517b261------2</link>
            <guid isPermaLink="false">https://medium.com/p/1d52956285c4</guid>
            <dc:creator><![CDATA[Zoheb Shaik]]></dc:creator>
            <pubDate>Tue, 21 Jan 2025 16:58:23 GMT</pubDate>
            <atom:updated>2025-01-21T16:58:23.470Z</atom:updated>
            <content:encoded><![CDATA[<p>Both Skupper and Submariner are excellent tools designed for hybrid or multi-cloud Kubernetes deployments, but they serve slightly different purposes and have unique features. Here’s a comparison to help you decide which might be better for your needs:</p><h3>Skupper:</h3><ul><li><strong>Purpose</strong>: Skupper focuses on application-level communication across multiple Kubernetes clusters, enabling secure communication between services running in different clusters without exposing them to the public internet.</li></ul><p><strong>Key Features</strong>:</p><ul><li><strong>Layer 7 Focus</strong>: Operates at the application layer, providing service-to-service communication across clusters.</li><li><strong>Network Independence</strong>: No need for direct network connectivity (e.g., VPNs) between clusters.</li><li><strong>Ease of Use</strong>: Simple to set up and manage, with a focus on securely connecting services.</li><li><strong>Cloud-Agnostic</strong>: Works across different cloud providers and on-premises environments.</li></ul><p><strong>Best For</strong>:</p><ul><li>Connecting microservices across multiple clusters.</li><li>Environments where direct network connectivity is challenging or not desired.</li><li>Applications that need secure, application-level communication between clusters.</li></ul><h3>Submariner:</h3><ul><li><strong>Purpose</strong>: Submariner is designed to provide network connectivity between multiple Kubernetes clusters, allowing pods and services to communicate directly across cluster boundaries.</li></ul><p><strong>Key Features</strong>:</p><ul><li><strong>Layer 3 Focus</strong>: Operates at the network layer, enabling IP connectivity between clusters.</li><li><strong>Direct Pod Communication</strong>: Facilitates direct pod-to-pod communication across clusters.</li><li><strong>Supports Load Balancers</strong>: Integrates with external load balancers to handle cross-cluster traffic.</li><li><strong>Cloud Provider Integration</strong>: Works well with various cloud provider networking solutions.</li></ul><p><strong>Best For</strong>:</p><ul><li>Use cases that require direct pod-to-pod communication across clusters.</li><li>Scenarios where full network connectivity (e.g., VPN, direct links) is available or desired.</li><li>Environments that benefit from a single, unified network across clusters.</li></ul><h3>Choosing Between Skupper and Submariner:</h3><p><strong>Choose Skupper</strong> if you need:</p><ul><li>Application-layer routing and secure service-to-service communication.</li><li>A solution that works without needing direct network connectivity between clusters.</li><li>A simpler setup for connecting services across different environments.</li></ul><p><strong>Choose Submariner</strong> if you need:</p><ul><li>Full network connectivity with direct IP communication between clusters.</li><li>Integration with existing network infrastructure and load balancers.</li><li>A solution that enables a unified network for multi-cluster Kubernetes deployments.</li></ul><p>Ultimately, the best choice depends on your specific requirements for network connectivity, application architecture, and cloud provider constraints.</p><p><strong>Liqo</strong> is another promising solution for hybrid and multi-cloud Kubernetes environments, offering unique capabilities that can be highly beneficial for scenarios involving on-premises Kubernetes clusters connecting to cloud environments like Azure AKS. Here’s how <strong>Liqo</strong> can help in this scenario:</p><h3>Key Features of Liqo:</h3><ol><li><strong>Dynamic Resource Sharing</strong>:</li></ol><ul><li><strong>Cross-Cluster Resource Sharing</strong>: Liqo allows your on-prem and AKS clusters to dynamically share resources (like CPU, memory, and storage) across clusters. This enables workloads to seamlessly run on either cluster based on resource availability and demand.</li><li><strong>Automatic Workload Distribution</strong>: Workloads can be automatically distributed between the on-prem cluster and AKS without manual intervention.</li></ul><p><strong>2. Network Transparency</strong>:</p><ul><li><strong>Transparent Pod Communication</strong>: Liqo creates a virtual network across clusters, making it appear as if all pods are part of the same cluster. This enables transparent communication between pods on different clusters.</li><li><strong>No VPN Required</strong>: Like Skupper, Liqo doesn’t require complex network setups like VPNs or VNet peering. It uses Kubernetes APIs and networking layers to facilitate secure communication.</li></ul><p><strong>3. Multi-Cluster Management</strong>:</p><ul><li><strong>Unified Control Plane</strong>: Liqo provides a unified control plane for managing workloads across multiple clusters. This simplifies operations by allowing you to manage both your on-prem and AKS clusters as a single entity.</li><li><strong>Failover and Load Balancing</strong>: It supports failover and load balancing across clusters, improving the resilience and availability of your applications.</li></ul><p><strong>4. Inter-Cluster Federation</strong>:</p><ul><li><strong>Seamless Federation</strong>: Liqo enables a federated Kubernetes setup, where you can deploy and manage applications across clusters with a single deployment manifest. It abstracts the complexities of managing multiple clusters.</li></ul><h3>How Liqo Helps in On-Prem to Azure AKS/AWS EKS Scenarios:</h3><ol><li><strong>Simplified Hybrid Deployment</strong>:</li></ol><ul><li>Liqo makes it easy to extend your on-prem Kubernetes cluster into Azure AKS, treating both clusters as part of a unified infrastructure.</li></ul><p><strong>2. Resource Optimization</strong>:</p><ul><li>You can offload workloads to Azure AKS when on-prem resources are under pressure, or vice versa, optimizing resource utilization and costs.</li></ul><p><strong>3. No Need for Complex Networking</strong>:</p><ul><li>Liqo eliminates the need for setting up VPNs or ExpressRoute, reducing setup complexity and cost. It handles secure communication at the Kubernetes networking layer.</li></ul><p><strong>4. Application Portability</strong>:</p><ul><li>Applications can move or scale between on-prem and AKS clusters without modification, enhancing flexibility and disaster recovery capabilities.</li></ul><h3>Comparison with Skupper and Submariner:</h3><p><strong>Liqo vs Skupper</strong>:</p><ul><li>Both provide easy, secure inter-cluster communication without complex networking, but Liqo adds dynamic resource sharing and a unified control plane.</li></ul><p><strong>Liqo vs Submariner</strong>:</p><ul><li>Submariner focuses on direct network connectivity and pod-level communication, while Liqo emphasizes resource sharing and a seamless hybrid Kubernetes experience.</li></ul><h3>Conclusion:</h3><p><strong>Liqo</strong> is particularly helpful if you want a more integrated, resource-sharing approach to hybrid Kubernetes environments, with seamless workload distribution and management across on-prem and Azure AKS/AWS EKS clusters. It simplifies hybrid cloud operations, reduces the need for complex networking, and enhances resource utilization, making it an excellent choice for many hybrid cloud scenarios.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1d52956285c4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Performance aspects of Azure CNI Overlay & Cilium]]></title>
            <link>https://medium.com/@zohebshaik7/performance-aspects-of-azure-cni-overlay-cilium-ed9702d33fe8?source=rss-5413a517b261------2</link>
            <guid isPermaLink="false">https://medium.com/p/ed9702d33fe8</guid>
            <dc:creator><![CDATA[Zoheb Shaik]]></dc:creator>
            <pubDate>Tue, 21 Jan 2025 16:09:05 GMT</pubDate>
            <atom:updated>2025-01-21T16:09:05.484Z</atom:updated>
            <content:encoded><![CDATA[<p>Let me explain how pod-to-service communication works in Kubernetes, breaking it down into key components and the flow:</p><p>1. Service Discovery:<br>- When a pod needs to communicate with a service, it first needs to resolve the service name<br>- Kubernetes DNS (CoreDNS) provides name resolution<br>- Service names are resolved to their cluster IP addresses<br>- Format: `service-name.namespace.svc.cluster.local`</p><p>2. kube-proxy Role:<br>- kube-proxy runs on every node<br>- Watches the Kubernetes API server for changes to Services and Endpoints<br>- Creates network rules to redirect traffic to the correct backend pods<br>- Maintains these rules using one of three modes:</p><p>3. Proxy Modes:</p><p>a) IPTABLES mode (default):<br>```bash<br># Example iptables rules created by kube-proxy<br>-A KUBE-SERVICES -d 10.96.0.10/32 -p tcp -m tcp — dport 80 \<br> -j KUBE-SVC-XXXX</p><p>-A KUBE-SVC-XXXX -m statistic — mode random — probability 0.33333333349 \<br> -j KUBE-SEP-POD1<br>-A KUBE-SVC-XXXX -m statistic — mode random — probability 0.50000000000 \<br> -j KUBE-SEP-POD2<br>-A KUBE-SVC-XXXX -j KUBE-SEP-POD3<br>```</p><p>b) IPVS mode:<br>```bash<br># Example IPVS rules<br>IP Virtual Server version 1.2.1 (size=4096)<br>TCP 10.96.0.10:80 rr<br> -&gt; 192.168.1.10:80 Route 1 0 0 <br> -&gt; 192.168.1.11:80 Route 1 0 0<br> -&gt; 192.168.1.12:80 Route 1 0 0<br>```</p><p>c) Userspace mode (legacy, rarely used)</p><p>4. Traffic Flow:<br>```<br>Pod → ClusterIP → iptables/IPVS rules → Backend Pod<br>```</p><p>5. Load Balancing:</p><p>In iptables mode: <br>- Random selection with equal probability<br>- Handled by iptables rules</p><p>In IPVS mode:<br>- Multiple algorithms available (rr, lc, dh, sh, sed, nq)<br>- More efficient for large clusters</p><p>6. Connection Tracking:<br>Once a connection is established, subsequent packets follow the same path:<br>- Handled by conntrack (connection tracking)<br>- Ensures session affinity when configured</p><p>7. Health Checks:<br>- kube-proxy only directs traffic to healthy pods<br>- Uses endpoint information from the API server<br>- Removes failed pods from the load balancing pool</p><p>8. Performance Considerations:<br>- IPVS mode generally performs better for large clusters<br>- Connection tracking table size can impact performance<br>- DNS caching in pods affects resolution speed</p><p>The entire process is transparent to the application running in the pod — it just needs to know the service name and port. Kubernetes handles all the complexities of service discovery, load balancing, and actual pod routing.</p><p>This system provides:<br>- Service discovery through DNS<br>- Load balancing across pods<br>- Automatic handling of pod scaling/failures<br>- Consistent networking regardless of pod location in the cluster</p><h3>Which One is Better?</h3><p><strong>Small to Medium Clusters:</strong></p><ul><li><strong>IPTABLES</strong> is sufficient and simpler to manage.</li><li>Azure CNI (traditional or overlay) using iptables is a reliable choice.</li></ul><p><strong>Large Clusters or High Traffic Scenarios:</strong></p><ul><li><strong>IPVS</strong> offers better performance, especially for clusters with many services.</li><li>If using Cilium, leveraging eBPF can provide even better performance than both iptables and ipvs due to its kernel-level efficiency.</li></ul><h3>Conclusion:</h3><ul><li>For performance in large-scale environments, <strong>IPVS</strong> or <strong>Cilium with eBPF</strong> is generally better than <strong>IPTABLES</strong>.</li><li><strong>Cilium</strong> is an excellent choice for advanced networking and security, offering both performance and flexibility.</li><li><strong>Azure CNI Overlay</strong> with iptables can still perform well but may not match the efficiency of IPVS or eBPF in very large clusters.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ed9702d33fe8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Networking in Kubernetes]]></title>
            <link>https://medium.com/@zohebshaik7/networking-in-kubernetes-0f41986ccb01?source=rss-5413a517b261------2</link>
            <guid isPermaLink="false">https://medium.com/p/0f41986ccb01</guid>
            <dc:creator><![CDATA[Zoheb Shaik]]></dc:creator>
            <pubDate>Tue, 21 Jan 2025 15:58:19 GMT</pubDate>
            <atom:updated>2025-01-21T15:58:19.596Z</atom:updated>
            <content:encoded><![CDATA[<p>A Container Runtime, in the networking context, is a daemon on a node configured to provide CRI Services for kubelet.</p><p>In particular, the Container Runtime must be configured to load the CNI plugins required to implement the Kubernetes network model.</p><p>Networking is a central part of Kubernetes, but it can be challenging to understand exactly how it is expected to work. There are 4 distinct networking problems to address:</p><ol><li>Highly-coupled container-to-container communications: this is solved by <a href="https://kubernetes.io/docs/concepts/workloads/pods/">Pods</a> and localhost communications.</li><li>Pod-to-Pod communications</li><li>Pod-to-Service communications</li><li>External-to-Service communications</li></ol><h3>Kubernetes IP address ranges:</h3><p>Kubernetes clusters require to allocate non-overlapping IP addresses for Pods, Services and Nodes, from a range of available addresses configured in the following components:</p><ul><li>The network plugin is configured to assign IP addresses to Pods.</li><li>The kube-apiserver is configured to assign IP addresses to Services.</li><li>The kubelet or the cloud-controller-manager is configured to assign IP addresses to Nodes.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vv2fmQuI9DP7DoWAC0zS7A.png" /></figure><h3>Cluster networking types:</h3><p>Kubernetes clusters, attending to the IP families configured, can be categorized into:</p><ul><li>IPv4 only: The network plugin, kube-apiserver and kubelet/cloud-controller-manager are configured to assign only IPv4 addresses.</li><li>IPv6 only: The network plugin, kube-apiserver and kubelet/cloud-controller-manager are configured to assign only IPv6 addresses.</li><li>IPv4/IPv6 or IPv6/IPv4 <a href="https://kubernetes.io/docs/concepts/services-networking/dual-stack/">dual-stack</a>:</li><li>The network plugin is configured to assign IPv4 and IPv6 addresses.</li><li>The kube-apiserver is configured to assign IPv4 and IPv6 addresses.</li><li>The kubelet or cloud-controller-manager is configured to assign IPv4 and IPv6 address.</li><li>All components must agree on the configured primary IP family.</li></ul><p>How kube-apiserver will assign IPs to Services?</p><p>The kube-apiserver assigns IP addresses to Services from a pre-configured range called the Service Cluster IP Range (service-cluster-ip-range). Here’s how it works:</p><p>1. Configuration:<br>- The service IP range is configured using the ` — service-cluster-ip-range` flag when starting kube-apiserver<br>- Example: ` — service-cluster-ip-range=10.96.0.0/12`<br>- If not specified, it defaults to 10.0.0.0/24<br>- You can configure multiple IP ranges using comma separation (supported in newer versions)</p><p>2. IP Assignment Process:<br>- When a new Service is created, if no specific IP is requested:<br>- kube-apiserver allocates the next available IP from the configured range<br>- It maintains an allocation bitmap to track used/available IPs<br>- The allocation is stored in etcd along with the Service object<br>- If a specific IP is requested in the Service spec:<br>- apiserver checks if the IP is within the configured range<br>- verifies the IP isn’t already allocated<br>- assigns the requested IP if available</p><p>3. Special Cases:<br>- Headless Services (clusterIP: None) don’t get an IP assigned<br>- ExternalName Services don’t get an IP assigned<br>- If the requested IP is already in use, the Service creation fails<br>- If the service-cluster-ip-range is exhausted, new Service creation fails</p><p>4. IP Range Planning:<br>- The range should be large enough to accommodate your cluster’s needs<br>- Should not overlap with:<br>- Pod network CIDR<br>- Node network CIDR<br>- Any other network ranges in your infrastructure<br>- Common to use private IP ranges (10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/16)</p><p>This IP assignment system ensures that each Service gets a unique IP address within the cluster’s network space, enabling stable networking endpoints for pods to communicate with each other.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0f41986ccb01" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Authentication & Authorization in Azure AKS]]></title>
            <link>https://medium.com/@zohebshaik7/authentication-authorization-in-azure-aks-47b8c89aa743?source=rss-5413a517b261------2</link>
            <guid isPermaLink="false">https://medium.com/p/47b8c89aa743</guid>
            <dc:creator><![CDATA[Zoheb Shaik]]></dc:creator>
            <pubDate>Tue, 21 Jan 2025 15:29:49 GMT</pubDate>
            <atom:updated>2025-01-21T15:31:37.210Z</atom:updated>
            <content:encoded><![CDATA[<p>Kubernetes RBAC and Azure RBAC serve different but complementary roles in managing access to resources. Here’s a breakdown of the key factors in each, and recommendations on their usage:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/385/1*-L32ziReZ54D3qIgG5imXQ.png" /><figcaption>Available Options in Azure AKS</figcaption></figure><h3>Kubernetes RBAC (Role-Based Access Control):</h3><h4>Key Factors:</h4><ol><li><strong>Granular Control:</strong></li></ol><ul><li>Manages access within the Kubernetes cluster.</li><li>Permissions are defined using roles and role bindings (at the namespace level) or cluster roles and cluster role bindings (at the cluster level).</li></ul><p><strong>2. Resource-Level Permissions:</strong></p><ul><li>Provides fine-grained access control to specific Kubernetes resources such as pods, services, deployments, etc.</li><li>Can limit actions like create, read, update, and delete on specific resources.</li></ul><p><strong>3. Dynamic and Flexible:</strong></p><ul><li>Can dynamically adjust permissions based on the current needs and structure of the cluster.</li><li>Supports custom roles tailored to specific applications or teams.</li></ul><p><strong>4. Integration with Azure AD:</strong></p><ul><li>Can be integrated with Azure Active Directory (Azure AD) for managing access through Azure AD groups and users.</li></ul><h4>Use Case:</h4><ul><li>Best for controlling internal cluster resource access.</li><li>Essential for enforcing the principle of least privilege within the Kubernetes cluster.</li></ul><h3>Azure RBAC (Role-Based Access Control):</h3><h4>Key Factors:</h4><ol><li><strong>Unified Access Management:</strong></li></ol><ul><li>Manages access to Azure resources, including AKS and other Azure services.</li><li>Roles are defined at various scopes such as subscription, resource group, or specific resources.</li></ul><p><strong>2. Predefined and Custom Roles:</strong></p><ul><li>Azure provides a set of predefined roles, but custom roles can be created to meet specific requirements.</li><li>Roles define actions across multiple Azure resources, not limited to Kubernetes.</li></ul><p><strong>3. Integration with Azure Services:</strong></p><ul><li>Manages permissions for resources like storage accounts, networking, and databases alongside AKS.</li><li>Centralized in Azure, providing a single point for managing permissions across the Azure ecosystem.</li></ul><p><strong>4. Simplified Identity Management:</strong></p><ul><li>Uses Azure Active Directory for identity management.</li><li>Provides seamless integration with other Azure services, simplifying administration.</li></ul><h4>Use Case:</h4><ul><li>Best for managing access to Azure resources and infrastructure, including AKS cluster-level permissions.</li></ul><h3>Which One is Best and Recommended?</h3><h4>Recommendation:</h4><p>Both Kubernetes RBAC and Azure RBAC serve crucial roles and are best used together in a production environment:</p><ol><li><strong>Kubernetes RBAC:</strong></li></ol><ul><li>Recommended for <strong>fine-grained control</strong> of access within the Kubernetes cluster itself.</li><li>Ideal for managing who can perform specific actions on cluster resources.</li></ul><p><strong>2. Azure RBAC:</strong></p><ul><li>Recommended for <strong>managing access to Azure resources</strong> and infrastructure.</li><li>Provides a <strong>centralized approach</strong> to managing user and application access to the AKS cluster and related Azure resources.</li></ul><h4>Best Practice:</h4><ul><li>Use <strong>Azure RBAC</strong> for managing <strong>cluster-level access</strong> (e.g., who can access the Kubernetes API server).</li><li>Use <strong>Kubernetes RBAC</strong> for managing <strong>in-cluster access</strong> to specific Kubernetes resources.</li><li>Integrate both with <strong>Azure Active Directory</strong> for a unified identity management approach, leveraging the strengths of each system for comprehensive and secure access control.</li></ul><p>This combination ensures robust security, centralized management, and granular control over both infrastructure and cluster resources.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=47b8c89aa743" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pod-VM connectivity — Azure AKS]]></title>
            <link>https://medium.com/@zohebshaik7/pod-vm-connectivity-azure-aks-56ccc38a9fba?source=rss-5413a517b261------2</link>
            <guid isPermaLink="false">https://medium.com/p/56ccc38a9fba</guid>
            <dc:creator><![CDATA[Zoheb Shaik]]></dc:creator>
            <pubDate>Tue, 21 Jan 2025 15:04:42 GMT</pubDate>
            <atom:updated>2025-01-21T15:04:42.284Z</atom:updated>
            <content:encoded><![CDATA[<h3>Pod-VM connectivity — Azure AKS</h3><p><strong>Capability</strong>: VM in the same virtual network &amp; VM in peered virtual network</p><p>The differences in <strong>Pod-VM connectivity</strong> between Azure CNI and Azure CNI Overlay, especially when dealing with VMs in the same virtual network or in a peered virtual network, arise from the fundamental differences in how these networking models handle IP addressing and routing.</p><h3>Azure CNI (Standard):</h3><h4>VM in the Same Virtual Network:</h4><ol><li><strong>Direct IP Assignment</strong>: Pods in Azure CNI get IP addresses directly from the Azure VNet’s IP space. This makes pods effectively first-class citizens within the VNet.</li><li><strong>Seamless Communication</strong>: Since both the pods and VMs are part of the same VNet, they can communicate directly using their assigned IP addresses. The VNet routing table handles this traffic naturally without additional configuration.</li></ol><h4>VM in a Peered Virtual Network:</h4><ol><li><strong>VNet Peering</strong>: VNet peering allows seamless connectivity between VMs and other resources in different VNets. Azure CNI’s direct IP assignment ensures that pod IPs are routable across peered VNets, just like any other VM.</li><li><strong>Routable IPs</strong>: Because the pods have routable IP addresses from the Azure VNet, they can directly communicate with VMs in peered VNets. Azure’s routing infrastructure ensures that packets are routed correctly between the peered VNets.</li></ol><h3>Azure CNI Overlay:</h3><h4>VM in the Same Virtual Network:</h4><ol><li><strong>Overlay Network</strong>: In Azure CNI Overlay, pods are assigned IP addresses from a separate overlay network, not from the Azure VNet’s IP space.</li><li><strong>Non-Routable IPs</strong>: These overlay IPs are not part of the VNet’s routable IP space, which means that VMs in the same VNet cannot directly route traffic to these pod IPs. NAT (Network Address Translation) might be used for outbound traffic from pods, but inbound connectivity is not straightforward.</li><li><strong>Lack of Direct Routing</strong>: The VNet routing table does not recognize the overlay IPs, making it impossible for VMs in the same VNet to directly initiate connections to pods.</li></ol><h4>VM in a Peered Virtual Network:</h4><ol><li><strong>No Direct VNet Peering Support</strong>: Since the overlay IPs are not part of the Azure VNet, the peering relationship cannot route traffic to these overlay IPs. Peering relies on the assumption that resources in both VNets use Azure-routable IP addresses.</li><li><strong>NAT Limitations</strong>: While Azure CNI Overlay can use NAT to enable pods to initiate outbound connections, it does not provide a mechanism for inbound connections from VMs in peered VNets. The overlay network is effectively isolated from the routable address space of the VNets, including those in peering relationships.</li></ol><h3>Summary of Key Differences:</h3><ul><li><strong>Azure CNI (Standard)</strong>: Supports Pod-VM connectivity in both the same VNet and peered VNets because pods have IPs from the VNet’s routable address space, making them directly accessible and routable.</li><li><strong>Azure CNI Overlay</strong>: Does not support Pod-VM connectivity in either the same VNet or peered VNets because pods use non-routable overlay IPs. These IPs cannot be routed across the VNet or peering connections, and NAT is insufficient for supporting inbound traffic and peering scenarios.</li></ul><h3>Conclusion</h3><p>The core issue with Azure CNI Overlay is its use of a separate overlay network that is not integrated into Azure’s native routing and peering infrastructure. This isolation prevents direct communication between pods and VMs, especially in scenarios requiring routable IP addresses across VNets and peering relationships.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=56ccc38a9fba" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Behavioral differences between Azure CNI & Azure CNI Overlay]]></title>
            <link>https://medium.com/@zohebshaik7/behavioral-differences-between-azure-cni-azure-cni-overlay-15e6fe3d97cf?source=rss-5413a517b261------2</link>
            <guid isPermaLink="false">https://medium.com/p/15e6fe3d97cf</guid>
            <dc:creator><![CDATA[Zoheb Shaik]]></dc:creator>
            <pubDate>Tue, 21 Jan 2025 14:53:49 GMT</pubDate>
            <atom:updated>2025-01-21T14:53:49.390Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Capability</strong>: On-premises access using VPN or Express Route</p><h3>Azure CNI:</h3><ol><li><strong>Direct IP Allocation</strong>: Azure CNI integrates the Kubernetes network with the Azure virtual network (VNet). Each pod gets an IP address directly from the Azure VNet, allowing it to communicate directly with resources in the VNet, including on-premises resources connected via VPN or ExpressRoute.</li><li><strong>Two-Way Communication</strong>: Since pods have IP addresses within the VNet range, they can both initiate and receive traffic from on-premises resources. This direct IP assignment makes routing straightforward and symmetrical.</li><li><strong>Standard Routing</strong>: The Azure VNet routing table is used for all pods, enabling seamless two-way communication between pods and on-premises networks.</li></ol><h3>Azure CNI Overlay:</h3><ol><li><strong>Overlay Network</strong>: In Azure CNI Overlay, pods are assigned IP addresses from a separate, overlay network that is not directly part of the Azure VNet IP space. This overlay network is used to address scalability challenges by decoupling pod IPs from the Azure VNet IP range.</li><li><strong>Outbound Traffic Handling</strong>: When a pod initiates traffic to on-premises resources, the overlay network can handle this by using network address translation (NAT) to translate the pod’s overlay IP to a routable IP within the Azure VNet. This allows the traffic to traverse the VPN or ExpressRoute connection to reach on-premises systems.</li><li><strong>Inbound Traffic Challenges</strong>: The key limitation arises with inbound traffic. On-premises systems cannot directly route traffic to overlay IP addresses because these are not part of the Azure VNet IP space. Since Azure CNI Overlay uses NAT for outbound traffic, there is no direct routing mechanism for on-premises systems to initiate communication with pods. The overlay network does not provide a straightforward path for unsolicited inbound connections.</li><li><strong>Routing and NAT</strong>: In Azure CNI Overlay, since the pods’ IPs are not part of the Azure VNet, Azure’s routing tables and VPN/ExpressRoute configurations do not recognize these IPs for direct routing. This restricts the ability for on-premises resources to initiate connections to the pods, as they would require a routable IP address within the Azure VNet space.</li></ol><h3>Summary</h3><ul><li><strong>Azure CNI</strong>: Works both ways because pods have routable IPs directly within the Azure VNet, allowing seamless routing of both inbound and outbound traffic.</li><li><strong>Azure CNI Overlay</strong>: Works only for outbound traffic initiated by pods because the overlay network uses NAT to map pod IPs to Azure VNet IPs for outbound communication, but lacks a mechanism to handle inbound traffic initiated by on-premises systems due to the non-routable nature of overlay IPs.</li></ul><p>To achieve two-way communication with Azure CNI Overlay, additional mechanisms like load balancers, ingress controllers, or custom NAT configurations would be needed to expose pod services with routable IPs.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=15e6fe3d97cf" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>