<?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 FoxuTech on Medium]]></title>
        <description><![CDATA[Stories by FoxuTech on Medium]]></description>
        <link>https://medium.com/@foxutech?source=rss-bf3548dc6db6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*nicHwop-O31UayXsKZaseQ@2x.jpeg</url>
            <title>Stories by FoxuTech on Medium</title>
            <link>https://medium.com/@foxutech?source=rss-bf3548dc6db6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 01:22:35 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@foxutech/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[Kubernetes CPU Limits: How to Manage Resource Allocation]]></title>
            <link>https://foxutech.medium.com/kubernetes-cpu-limits-how-to-manage-resource-allocation-cd9b7db9ca2b?source=rss-bf3548dc6db6------2</link>
            <guid isPermaLink="false">https://medium.com/p/cd9b7db9ca2b</guid>
            <category><![CDATA[k8s-cluster-management]]></category>
            <category><![CDATA[k8s-series]]></category>
            <category><![CDATA[cpu-utilization]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[k8s]]></category>
            <dc:creator><![CDATA[FoxuTech]]></dc:creator>
            <pubDate>Wed, 24 Jul 2024 19:06:27 GMT</pubDate>
            <atom:updated>2024-07-24T19:06:27.397Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/696/0*RWqc70C4OJj4wMi9" /></figure><p>In <a href="https://foxutech.com/category/kubernetes/">Kubernetes</a>, <a href="https://foxutech.com/what-happens-when-kubernetes-pod-cpu-memory-run-high/">CPU limits</a> define the maximum amount of <a href="https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/">CPU resources</a> a pod is allowed to consume on a host machine. They play a crucial role in ensuring efficient resource utilization, preventing performance bottlenecks, and maintaining application stability within your cluster.</p><p><strong>Understanding CPU Requests and Limits</strong></p><p>Each node in a Kubernetes cluster is allocated memory (RAM) and compute power (CPU) that can be used to run containers. A Kubernetes cluster defines a logical grouping of one or more containers into pods. You can then deploy and manage pods on top of your nodes.</p><p>When you create a pod, you typically specify the storage and networking that containers share within that pod. The Kubernetes scheduler finds a node that has the required resources to run the pod.</p><p>You can provide more information for the scheduler using two parameters that specify RAM and CPU utilization:</p><ul><li><strong>CPU Requests:</strong> Indicate the minimum guaranteed CPU resources a container requires to function properly. The Kubernetes scheduler uses this information to place pods on nodes with sufficient capacity.</li><li><strong>CPU Limits:</strong> Set a maximum ceiling on CPU usage for a container, preventing it from hogging resources and impacting other workloads. The kubelet enforces these limits by throttling containers that exceed them.</li></ul><p><strong>Benefits of Using CPU Limits:</strong></p><p>If you do not specify a CPU limit, the container can use all the CPU resources available on the node. This can cause containers with high CPU utilization to slow down other containers on the same node and use all available CPU and may even cause Kubernetes components such as the kubelet to become unresponsive. The node then enters a NotReady state, causing its pods to be rescheduled on another node.</p><p>By setting limits on all containers, you can avoid most of the following problems:</p><ul><li><strong>Prevents Resource Contention:</strong> Ensures fair allocation of CPU resources across pods, stopping any single container from monopolizing CPU power and starving others.</li><li><strong>Enhances Predictability:</strong> CPU limits promote consistent application performance by guaranteeing a minimum level of CPU availability. This is vital for maintaining Service Level Agreements (SLAs).</li><li><strong>Safeguards Against OOM Issues:</strong> By limiting memory usage alongside CPU limits, you can prevent containers with memory leaks from crashing the entire node and jeopardizing cluster stability.</li><li><strong>Optimizes Resource Allocation:</strong> CPU limits help identify over-provisioned clusters where resources are underutilized. This can lead to cost savings by right sizing your cluster resources.</li></ul><p>Continue reading <a href="https://foxutech.com/kubernetes-cpu-limits-how-to-manage-resource-allocation/">Kubernetes CPU Limits: How to Manage Resource Allocation — FoxuTech</a></p><p>If you like our posts, don’t forget to subscribe and share with your friends.</p><p>You can subscribe us on <a href="https://www.youtube.com/@FoxuTech">https://www.youtube.com/@FoxuTech</a></p><p>Follow us on <a href="https://twitter.com/i/flow/login?redirect_after_login=%2Ffoxutech">Twitter </a>&amp; <a href="https://www.instagram.com/foxutech">Instagram</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cd9b7db9ca2b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Isolate a Pod in Production for Debugging using kubectl]]></title>
            <link>https://foxutech.medium.com/how-to-isolate-a-pod-in-production-for-debugging-using-kubectl-a9bedb0f7747?source=rss-bf3548dc6db6------2</link>
            <guid isPermaLink="false">https://medium.com/p/a9bedb0f7747</guid>
            <category><![CDATA[k8s-debug]]></category>
            <category><![CDATA[k8s-troubleshooting]]></category>
            <category><![CDATA[debugging]]></category>
            <category><![CDATA[kubectl]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[FoxuTech]]></dc:creator>
            <pubDate>Sun, 21 Jul 2024 09:03:09 GMT</pubDate>
            <atom:updated>2024-07-21T09:04:08.568Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yPO7740ArnqNe_RowQS_DQ.jpeg" /></figure><p>This article shows a nifty technique for live debugging Pods running in production using labels.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fr86jhH9fk30%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dr86jhH9fk30&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fr86jhH9fk30%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/d6eba6fa0217363da486bd60fcdab1be/href">https://medium.com/media/d6eba6fa0217363da486bd60fcdab1be/href</a></iframe><p><strong>The Scenario:</strong></p><p>Imagine you have a Deployment with three Pods, all labeled with app=tech. A Service routes traffic to these Pods based on this selector.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/0*wqWEbukQoxuK8JSv" /></figure><p><strong>Isolating a Pod:</strong></p><ul><li>Use kubectl label pod &lt;pod-name&gt; app=debug --overwrite to change the specific Pod’s label to app=debug.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/0*JEoKx7axsVEFEju4" /></figure><ul><li><strong>Consequences:</strong></li><li>The Service stops sending traffic because its selector (app=tech) no longer matches the isolated Pod’s label (app=debug).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/0*l9qwqEKEp44F137p" /></figure><ul><li>The ReplicaSet notices a missing replica (only two Pods with app=tech label) and creates a new one to maintain the desired number of running Pods (originally 3).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/0*3gizee8AF-D2sFkV" /></figure><p><strong>The Outcome:</strong></p><ul><li>You end up with four Pods:</li><li>3 Pods running production traffic (labeled app=tech).</li><li>1 isolated Pod (labeled app=debug) that was previously receiving traffic but is now isolated.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/0*fbesMp5A_rG9RyJt" /></figure><p>Continue reading on <a href="https://foxutech.com/how-to-isolate-a-pod-in-production-for-debugging-using-kubectl/">https://foxutech.com/how-to-isolate-a-pod-in-production-for-debugging-using-kubectl/</a></p><p>If you like our posts, don’t forget to subscribe and share with your friends.</p><p>You can subscribe us on <a href="https://www.youtube.com/@FoxuTech">https://www.youtube.com/@FoxuTech</a></p><p>Follow us on <a href="https://twitter.com/i/flow/login?redirect_after_login=%2Ffoxutech">Twitter </a>&amp; <a href="https://www.instagram.com/foxutech">Instagram</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a9bedb0f7747" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Shaping Kubernetes Network Traffic With Topology-Aware Routing]]></title>
            <link>https://foxutech.medium.com/shaping-kubernetes-network-traffic-with-topology-aware-routing-95e9437575f7?source=rss-bf3548dc6db6------2</link>
            <guid isPermaLink="false">https://medium.com/p/95e9437575f7</guid>
            <category><![CDATA[network]]></category>
            <category><![CDATA[topology-aware-routing]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[k8s]]></category>
            <category><![CDATA[kubernetes-networking]]></category>
            <dc:creator><![CDATA[FoxuTech]]></dc:creator>
            <pubDate>Sat, 13 Jul 2024 03:23:01 GMT</pubDate>
            <atom:updated>2024-07-13T03:23:01.303Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/696/0*FQhsfIFFxynnOCMn" /></figure><p>In cloud-based deployments, Kubernetes clusters are often spread across multiple availability zones for <a href="https://foxutech.com/deep-dive-into-kubernetes-design-patterns-building-resilient-and-scalable-applications/">redundancy and scalability</a>. However, by default, Kubernetes services distribute traffic randomly between pods, which can lead to inefficiencies. Traffic might travel between zones unnecessarily, increasing latency and potentially incurring extra costs. In this post, let’s understand about Kubernetes traffic shaping with Topology Aware Routing.</p><p><strong>What is Topology-Aware Routing?</strong></p><p>Topology-aware routing (TAR) is a Kubernetes feature that optimizes network traffic flow by considering the physical or logical layout of the cluster’s infrastructure. With TAR enabled, Kubernetes can make informed routing decisions to prioritize keeping traffic within the zone it originated from. This reduces latency, improves performance, and potentially minimizes network egress costs.</p><p><strong>How Does TAR Work?</strong></p><p>Here’s a breakdown of the process:</p><ol><li><strong>Pod Communication:</strong> Pods within your application communicate with each other through services. These services act as load balancers, directing traffic to the appropriate pods based on selectors and labels.</li><li><strong>Endpoint Slices:</strong> When a service is created, Kubernetes creates EndpointSlices, which are essentially service endpoint information divided by zone. These EndpointSlices contain details about pods that belong to the service, including their zone location.</li><li><strong>Topology Hints:</strong> The EndpointSlice controller incorporates the zone information into “topology hints.” These hints are attached to the EndpointSlices, indicating the preferred zone for the endpoints.</li><li><strong>Kube-proxy:</strong> Kube-proxy, a network proxy running on each node, utilizes these topology hints when selecting endpoints for service traffic. It prioritizes selecting pods within the same zone as the requesting pod whenever possible.</li></ol><p><strong>Benefits of Topology-Aware Routing</strong></p><ul><li><strong>Reduced Latency:</strong> By keeping traffic local, TAR minimizes the distance packets need to travel, resulting in faster communication between pods.</li><li><strong>Improved Performance:</strong> Lower latency translates to a more responsive and performant application.</li><li><strong>Cost Optimization:</strong> In certain cloud environments, data transfer between zones incurs additional charges. TAR helps minimize these costs by keeping traffic within the same zone.</li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FR1WnfxN1OFI%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DR1WnfxN1OFI&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FR1WnfxN1OFI%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/f726600f66096d2a0756e40fe555f69f/href">https://medium.com/media/f726600f66096d2a0756e40fe555f69f/href</a></iframe><p><strong>Example Scenario</strong></p><p>Imagine a two-zone Kubernetes cluster (Zone A and Zone B) hosting a microservices application. Service A in Zone A frequently communicates with Service B in Zone B. Without TAR, traffic between these services might traverse zones, introducing unnecessary latency and potentially incurring extra costs.</p><p>With TAR it keeps communication local, enhancing performance and potentially reducing costs. Let’s check with some examples:</p><p><strong>Detailed Example</strong></p><p>Assume, you have multiple nodes running in different zones in the cloud (<em>e.g., us-east-1a, us-east-1b</em>), You have two applications: <strong>fox-App1</strong> and <strong>fox-App2</strong>. Each application has multiple containers, and the containers are running in <strong>different</strong> zones.</p><p>In this <strong>fox-App1</strong> frequently sends requests to <strong>fox-App2</strong>. How do you make sure that <strong>fox-App1</strong> container make requests to <strong>fox-App2</strong> container, which are situated in the same zone?</p><p>Continue Reading on <a href="https://foxutech.com/shaping-kubernetes-network-traffic-with-topology-aware-routing/">https://foxutech.com/shaping-kubernetes-network-traffic-with-topology-aware-routing/</a></p><p>If you like our posts, don’t forget to subscribe and share with your friends.</p><p>You can subscribe us on <a href="https://www.youtube.com/@FoxuTech">https://www.youtube.com/@FoxuTech</a></p><p>Follow us on <a href="https://twitter.com/i/flow/login?redirect_after_login=%2Ffoxutech">Twitter </a>&amp; <a href="https://www.instagram.com/foxutech">Instagram</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=95e9437575f7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kubernetes pod command and args — compared with Dockerfile]]></title>
            <link>https://foxutech.medium.com/kubernetes-pod-command-and-args-compared-with-dockerfile-82b85c4b8a76?source=rss-bf3548dc6db6------2</link>
            <guid isPermaLink="false">https://medium.com/p/82b85c4b8a76</guid>
            <category><![CDATA[what-is]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[k8s]]></category>
            <category><![CDATA[pods]]></category>
            <category><![CDATA[dockerfiles]]></category>
            <dc:creator><![CDATA[FoxuTech]]></dc:creator>
            <pubDate>Mon, 25 Dec 2023 05:24:16 GMT</pubDate>
            <atom:updated>2023-12-25T05:24:16.176Z</atom:updated>
            <content:encoded><![CDATA[<h3>Kubernetes pod command and args — compared with Dockerfile</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/0*fgJ5VxZKjHzIpiZM" /></figure><p>In <a href="https://www.youtube.com/@FoxuTech/featured">Kubernetes</a>, you have the power to tailor the commands that are executed within your containers. This flexibility is achieved through two key fields in Pod YAML files: command and args. Let’s dive into how they work:</p><p>1. command: Setting the Primary Command</p><ul><li>Think of command as the heart of the action, defining the main command to be run within a container.</li><li>Specify it as an array of strings, with each element representing a part of the command.</li></ul><p>Example:</p><pre>command: [&quot;echo&quot;, &quot;Hello from the container!&quot;]</pre><p>2. args: Providing Additional Arguments</p><ul><li>Need to pass extra information to the command? That’s where args come in.</li><li>It’s also an array of strings, supplying arguments to the command specified in command.</li></ul><p>Example:</p><pre>args: [&quot;This message is brought to you by args.&quot;]</pre><h4>Integration with Dockerfiles: A Smooth Transition</h4><p>If you’re familiar with <a href="https://foxutech.com/how-to-build-a-docker-image-using-dockerfile/">Dockerfiles</a>, you’ll notice a familiar pattern:</p><ul><li>command aligns with the ENTRYPOINT instruction in Dockerfiles.</li><li>args corresponds to the CMD instruction.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/0*lqWr0jtLIZxVyJSg" /></figure><h4>Key Takeaways:</h4><ul><li>Use command to define the primary command to execute in a container.</li><li>Use args to provide additional arguments to that command.</li><li>Understand their relationship with ENTRYPOINT and CMD in Dockerfiles for seamless transitions.</li></ul><p><strong>Continue reading on </strong><a href="https://foxutech.com/kubernetes-pod-command-and-args-compared-with-dockerfile/">https://foxutech.com/kubernetes-pod-command-and-args-compared-with-dockerfile/</a></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FgwA4hWZ5U1M%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DgwA4hWZ5U1M&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FgwA4hWZ5U1M%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/1fb25c61f48309c85954a3b05de2eac2/href">https://medium.com/media/1fb25c61f48309c85954a3b05de2eac2/href</a></iframe><p>If you like our posts, dont forget to subscribe and share with your friends.</p><p>You can subscribe us on <a href="https://www.youtube.com/@FoxuTech">https://www.youtube.com/@FoxuTech</a></p><p>Follow us on <a href="https://twitter.com/i/flow/login?redirect_after_login=%2Ffoxutech">Twitter </a>&amp; <a href="https://www.instagram.com/foxutech">Instagram</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=82b85c4b8a76" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Troubleshoot Kubernetes Insufficient Node Resources]]></title>
            <link>https://foxutech.medium.com/how-to-troubleshoot-kubernetes-insufficient-node-resources-787b185e39fb?source=rss-bf3548dc6db6------2</link>
            <guid isPermaLink="false">https://medium.com/p/787b185e39fb</guid>
            <category><![CDATA[insufficient]]></category>
            <category><![CDATA[troubleshooting]]></category>
            <category><![CDATA[k8s-series]]></category>
            <category><![CDATA[k8s-cluster-management]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[FoxuTech]]></dc:creator>
            <pubDate>Sat, 23 Dec 2023 03:11:38 GMT</pubDate>
            <atom:updated>2023-12-23T03:11:38.204Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/696/0*VFkJPMsHpjq0ZuCr" /></figure><p>Running out of resources in your <a href="https://foxutech.com/category/kubernetes/#google_vignette">Kubernetes </a>cluster is a familiar foe for any K8s warrior. The dreaded “insufficient node resources” message leaves you facing a chaotic battleground of stalled pods, frustrated users, and a performance dip so steep it could rival a ski slope. But fear not, brave adventurer! This guide will equip you with the tools and strategies to navigate this perilous terrain and emerge victorious.</p><pre>Events:<br>  Type     Reason     Age   From               Message<br>  ----     ------     ----  ----               -------<br>  Normal   Scheduled  19m   default-scheduler  Successfully assigned argo/parallel-jobxx-vsd25-123213123` to 10.84.103.96<br>  Warning  OutOfcpu   19m   kubelet            Node didn&#39;t have enough resource: cpu, requested: 310, used: 3655, capacity: 3910</pre><h3>Step 1: Scouting the Battlefield</h3><ul><li>Symptoms: Pods stuck in “Pending” limbo, containers crashing due to OOM (Out-of-Memory) attacks, sluggish performance like a snail in molasses, and overall cluster instability.</li><li>Tools:</li><li>kubectl get pods: Identify pods stuck in “Pending” purgatory.</li><li>kubectl describe nodes: Survey resource availability on each node, like a scout inspecting the land.</li><li>kubectl top nodes: Monitor resource utilization in real-time, keeping an eye on the enemy’s movements.</li><li>Cluster monitoring dashboards (<a href="https://prometheus.io/">Prometheus</a>, <a href="https://grafana.com/">Grafana</a>) offer a bird’s-eye view of the battlefield.</li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fw7vN-3xURzY&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dw7vN-3xURzY&amp;image=http%3A%2F%2Fi.ytimg.com%2Fvi%2Fw7vN-3xURzY%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/8b23d51e2fcedd4478b5316e9a0f18c2/href">https://medium.com/media/8b23d51e2fcedd4478b5316e9a0f18c2/href</a></iframe><h3>Step 2: Analyzing the Enemy’s Tactics</h3><ul><li><strong>CPU, memory, and storage utilization</strong>: Are these resources approaching critical levels on any nodes? Spikes or sustained high levels are red flags.</li></ul><pre># kubectl describe nodes<br>[...]<br>Capacity:<br>  cpu:                4<br>  ephemeral-storage:  61255492Ki<br>  hugepages-1Gi:      0<br>  hugepages-2Mi:      0<br>  memory:             2038904Ki<br>  pods:               110<br>Allocatable:<br>  cpu:                4<br>  ephemeral-storage:  56453061334<br>  hugepages-1Gi:      0<br>  hugepages-2Mi:      0<br>  memory:             1936504Ki<br>  pods:               110<br>[...]<br>Allocated resources:<br>  (Total limits may be over 100 percent, i.e., overcommitted.)<br>  Resource           Requests    Limits<br>  --------           --------    ------<br>  cpu                850m (20%)  0 (0%)<br>  memory             340Mi (7%)  340Mi (17%)<br>  ephemeral-storage  0 (0%)      0 (0%)<br>  hugepages-1Gi      0 (0%)      0 (0%)<br>  hugepages-2Mi      0 (0%)      0 (0%)</pre><ul><li><strong>Pod resource requests and limits</strong>: Are pods requesting more than available? Are requests realistic or inflated?</li></ul><pre>apiVersion: v1<br>kind: Pod<br>metadata:<br>  name: high-mem<br>spec:<br>  containers:<br>    - command:<br>        - sleep<br>        - &quot;3600&quot;<br>      image: busybox<br>      name: lets-break-pod-with-high-mem<br>      resources:<br>        requests:<br>          memory: &quot;1000Gi&quot;</pre><ul><li><strong>Eviction thresholds</strong>: Are pods being evicted for exceeding resource limits? This could be a clue to resource overallocation.</li></ul><h3>Step 3: Deploying Countermeasures</h3><h4>Over-requested resources:</h4><ul><li><strong>Adjust Pod resource </strong><a href="https://foxutech.com/what-happens-when-kubernetes-pod-cpu-memory-run-high/"><strong>requests and limits</strong></a>: Scale back demands to match actual workload needs. Think of it as rationing supplies for efficient use.</li><li><strong>Optimize resource usage within containers</strong>: Identify resource-intensive processes and trim the fat. Like a skilled warrior, make every resource count.</li></ul><h4>Overloaded nodes:</h4><ul><li><strong>Scale down deployments</strong>: Reduce the number of pods, lessening the pressure on nodes. Think of it as retreating to regroup and strategize.</li><li><strong>Add more nodes to the cluster</strong>: Expand your territory and increase overall resource capacity. Think of it as building reinforcements.</li><li><strong>Investigate external resource hogs</strong>: Are processes outside of Kubernetes pods consuming resources? Identify and eliminate them like hidden snipers.</li></ul><p>Continue Reading on <a href="https://foxutech.com/how-to-troubleshoot-kubernetes-insufficient-node-resources/">https://foxutech.com/how-to-troubleshoot-kubernetes-insufficient-node-resources/</a></p><p>If you like our posts, dont forget to subscribe and share with your friends.</p><p>You can subscribe us on <a href="https://www.youtube.com/@FoxuTech">https://www.youtube.com/@FoxuTech</a></p><p>Follow us on <a href="https://twitter.com/i/flow/login?redirect_after_login=%2Ffoxutech">Twitter </a>&amp; <a href="https://www.instagram.com/foxutech">Instagram</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=787b185e39fb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deep Dive into Kubernetes Design Patterns: Building Resilient and Scalable Applications]]></title>
            <link>https://foxutech.medium.com/deep-dive-into-kubernetes-design-patterns-building-resilient-and-scalable-applications-e6cfc60113ad?source=rss-bf3548dc6db6------2</link>
            <guid isPermaLink="false">https://medium.com/p/e6cfc60113ad</guid>
            <category><![CDATA[resilience]]></category>
            <category><![CDATA[scalable-applications]]></category>
            <category><![CDATA[k8s]]></category>
            <category><![CDATA[design-patterns]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[FoxuTech]]></dc:creator>
            <pubDate>Fri, 22 Dec 2023 03:06:05 GMT</pubDate>
            <atom:updated>2023-12-22T03:06:05.359Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/696/0*UPw5MiyIXDxA_ZT3" /></figure><p>The rise of containerization has revolutionized software development, and at the heart of it lies <a href="https://foxutech.com/category/kubernetes/">Kubernetes</a>, the de facto standard for container orchestration. But building containerized applications on Kubernetes requires embracing new approaches and leveraging powerful design patterns. This article delves deep into these patterns, equipping you with the knowledge to craft resilient and scalable applications for the modern cloud.</p><h3>Unveiling the Power of Design Patterns:</h3><ul><li><strong>Sidecar Pattern</strong>: This versatile pattern extends functionality without modifying the core application. Think logging sidecars capturing application logs for analysis, or Envoy providing service mesh capabilities. It promotes modularity, simplifies code changes, and improves observability.</li></ul><pre># Example YAML configuration for the sidecar pattern.</pre><pre># It defines a main application container which writes<br># the current date to a log file every five seconds.</pre><pre># The sidecar container is nginx serving that log file.<br># (In practice, your sidecar is likely to be a log collection<br># container that uploads to external storage.)</pre><pre># To run:<br>#   kubectl apply -f pod.yaml</pre><pre># Once the pod is running:<br>#   <br>#   (Connect to the sidecar pod)<br>#   kubectl exec pod-with-sidecar -c sidecar-container -it bash<br>#   <br>#   (Install curl on the sidecar)<br>#   apt-get update &amp;&amp; apt-get install curl<br>#   <br>#   (Access the log file via the sidecar)<br>#   curl &#39;http://localhost:80/app.txt&#39;</pre><pre>apiVersion: v1<br>kind: Pod<br>metadata:<br>  name: pod-with-sidecar<br>spec:<br>  # Create a volume called &#39;shared-logs&#39; that the<br>  # app and sidecar share.<br>  volumes:<br>  - name: shared-logs <br>    emptyDir: {}</pre><pre>  # In the sidecar pattern, there is a main application<br>  # container and a sidecar container.<br>  containers:</pre><pre>  # Main application container<br>  - name: app-container<br>    # Simple application: write the current date<br>    # to the log file every five seconds<br>    image: alpine # alpine is a simple Linux OS image<br>    command: [&quot;/bin/sh&quot;]<br>    args: [&quot;-c&quot;, &quot;while true; do date &gt;&gt; /var/log/app.txt; sleep 5;done&quot;]</pre><pre>    # Mount the pod&#39;s shared log file into the app <br>    # container. The app writes logs here.<br>    volumeMounts:<br>    - name: shared-logs<br>      mountPath: /var/log</pre><pre>  # Sidecar container<br>  - name: sidecar-container<br>    # Simple sidecar: display log files using nginx.<br>    # In reality, this sidecar would be a custom image<br>    # that uploads logs to a third-party or storage service.<br>    image: nginx:1.7.9<br>    ports:<br>      - containerPort: 80</pre><pre>    # Mount the pod&#39;s shared log file into the sidecar<br>    # container. In this case, nginx will serve the files<br>    # in this directory.<br>    volumeMounts:<br>    - name: shared-logs<br>      mountPath: /usr/share/nginx/html # nginx-specific mount path</pre><ul><li>Example: Picture a trusty sidekick like Envoy Proxy accompanying your main container. In action, this pattern lets you deploy a logging sidecar alongside your e-commerce application. This Envoy container intercepts all application logs and sends them to Elasticsearch for advanced analysis and troubleshooting. No need to touch the application code itself, keeping things modular and maintainable.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/0*VEtk-E5FWyZSdXZC" /></figure><ul><li><strong>Ambassador Pattern</strong>: Abstracted external services become easily manageable with this pattern. Imagine simplifying communication with an internal database or creating an API gateway for your microservices. It enhances service discovery, standardizes interfaces, and promotes independent scaling.</li><li>Example: Think of a diplomatic envoy like <a href="https://konghq.com/">Kong</a>, bridging the gap between your application and external services. Imagine having a legacy database on a different network. This pattern lets you abstract it as a Kubernetes service, presenting a uniform interface for your application code to interact with. Service discovery becomes a breeze, and fault tolerance improves significantly.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/0*APkru6yQ93ene0Nm" /></figure><ul><li><strong>Adapter Pattern</strong>: Bridging protocol and data format gaps becomes effortless with the adapter pattern. Consider seamlessly integrating services using different protocols or handling data migrations. It decouples services from specific formats, increasing flexibility and future-proofing your architecture.</li></ul><pre># Example YAML configuration for the adapter pattern.</pre><pre># It defines a main application container which writes<br># the current date and system usage information to a log file <br># every five seconds.</pre><pre># The adapter container reads what the application has written and<br># reformats it into a structure that a hypothetical monitoring <br># service requires. </pre><pre># To run:<br>#   kubectl apply -f pod.yaml</pre><pre># Once the pod is running:<br>#   <br>#   (Connect to the application pod)<br>#   kubectl exec pod-with-adapter -c app-container -it sh<br># <br>#   (Take a look at what the application is writing.)<br>#   cat /var/log/top.txt<br>#   <br>#   (Take a look at what the adapter has reformatted it to.)<br>#   cat /var/log/status.txt<br></pre><pre>apiVersion: v1<br>kind: Pod<br>metadata:<br>  name: pod-with-adapter<br>spec:<br>  # Create a volume called &#39;shared-logs&#39; that the<br>  # app and adapter share.<br>  volumes:<br>  - name: shared-logs <br>    emptyDir: {}</pre><pre>  containers:</pre><pre>  # Main application container<br>  - name: app-container<br>    # This application writes system usage information (`top`) to a status <br>    # file every five seconds.<br>    image: alpine<br>    command: [&quot;/bin/sh&quot;]<br>    args: [&quot;-c&quot;, &quot;while true; do date &gt; /var/log/top.txt &amp;&amp; top -n 1 -b &gt;&gt; /var/log/top.txt; sleep 5;done&quot;]</pre><pre>    # Mount the pod&#39;s shared log file into the app <br>    # container. The app writes logs here.<br>    volumeMounts:<br>    - name: shared-logs<br>      mountPath: /var/log</pre><pre>  # Adapter container<br>  - name: adapter-container<br>    # This sidecar container takes the output format of the application<br>    # (the current date and system usage information), simplifies<br>    # and reformats it for the monitoring service to come and collect.<br>    <br>    # In this example, our monitoring service requires status files<br>    # to have the date, then memory usage, then CPU percentage each <br>    # on a new line.<br>    <br>    # Our adapter container will inspect the contents of the app&#39;s top file,<br>    # reformat it, and write the correctly formatted output to the status file.<br>    image: alpine<br>    command: [&quot;/bin/sh&quot;]</pre><pre>    # A long command doing a simple thing: read the `top.txt` file that the<br>    # application wrote to and adapt it to fit the status file format.<br>    # Get the date from the first line, write to `status.txt` output file.<br>    # Get the first memory usage number, write to `status.txt`.<br>    # Get the first CPU usage percentage, write to `status.txt`.</pre><pre>    args: [&quot;-c&quot;, &quot;while true; do (cat /var/log/top.txt | head -1 &gt; /var/log/status.txt) &amp;&amp; (cat /var/log/top.txt | head -2 | tail -1 | grep<br> -o -E &#39;\\d+\\w&#39; | head -1 &gt;&gt; /var/log/status.txt) &amp;&amp; (cat /var/log/top.txt | head -3 | tail -1 | grep<br>-o -E &#39;\\d+%&#39; | head -1 &gt;&gt; /var/log/status.txt); sleep 5; done&quot;]<br></pre><pre>    # Mount the pod&#39;s shared log file into the adapter<br>    # container.<br>    volumeMounts:<br>    - name: shared-logs<br>      mountPath: /var/log</pre><ul><li>Example: Visualize a translator like gRPC Gateway seamlessly handling communication gaps. Consider microservices using different protocols like JSON and gRPC. This pattern allows you to deploy an adapter container that translates data from one format to another on the fly. Your services remain decoupled from specific protocols, enabling smooth interactions even with diverse communication styles.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/0*IOSbW6nKndCcAnKp" /></figure><ul><li><strong>Init Container Pattern</strong>: Ensuring dependencies are ready before your application starts is crucial. This pattern lets you, for example, initialize a database connection or download configurations before the main container kicks in. It guarantees smooth startup and avoids unexpected errors.</li><li>Example: Picture a meticulous prep team like busy Box ensuring everything is ready before the show starts. Suppose your application relies on a warmed-up database cache for optimal performance. This pattern lets you run a busy Box container to pre-populate the cache before your main application container even launches. No more waiting for cold starts, your application kicks into high gear from the get-go.</li><li><strong>Sidecar Container Pattern</strong>: The Sidecar Container pattern is a container design pattern in Kubernetes that is used to provide additional functionality to a container, such as monitoring or logging. This pattern is used to deploy a secondary container alongside the main container, providing additional functionality.</li><li><strong>Config Map Pattern</strong>: The Config Map pattern is a container design pattern in Kubernetes that is used to store configuration data in a centralized location. This pattern is used to provide a single source of truth for configuration data, making it easier to manage and update.</li><li><strong>Secret Configuration Pattern</strong>: The Secret Configuration pattern is a container design pattern in Kubernetes that is used to store sensitive data, such as passwords or API keys, in a centralized location. This pattern is used to provide a secure location for sensitive data, ensuring that only authorized users have access to it.</li><li><strong>Work Queue Pattern</strong>: The Work Queue pattern is a container design pattern in Kubernetes that is used to manage tasks in a distributed system. This pattern is used to ensure that tasks are evenly distributed across multiple containers, making it easier to scale and manage the system.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/0*aZmrroHsHBfRo9HP" /></figure><h3>Best Practices for Kubernetes Mastery:</h3><ul><li><strong>Embrace Kubernetes-native deployment tools</strong>: Ditch manual deployments for tools like Deployments, ReplicaSets, and StatefulSets. They ensure consistent, reliable deployments across environments, saving time and reducing errors.</li><li><strong>Master horizontal scaling</strong>: Adapt to fluctuating demand with Kubernetes’ horizontal scaling. Add or remove containers (pods) on the fly to handle traffic spikes and maintain performance during peak periods.</li></ul><p>continue reading on <a href="https://foxutech.com/deep-dive-into-kubernetes-design-patterns-building-resilient-and-scalable-applications/">https://foxutech.com/deep-dive-into-kubernetes-design-patterns-building-resilient-and-scalable-applications/</a></p><p>If you like our posts, dont forget to subscribe and share with your friends.</p><p>You can subscribe us on <a href="https://www.youtube.com/@FoxuTech">https://www.youtube.com/@FoxuTech</a></p><p>Follow us on <a href="https://twitter.com/i/flow/login?redirect_after_login=%2Ffoxutech">Twitter </a>&amp; <a href="https://www.instagram.com/foxutech">Instagram</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e6cfc60113ad" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kubernetes, the container orchestration platform of choice for many modern applications, thrives…]]></title>
            <link>https://foxutech.medium.com/kubernetes-the-container-orchestration-platform-of-choice-for-many-modern-applications-thrives-6bbd77b9a9e8?source=rss-bf3548dc6db6------2</link>
            <guid isPermaLink="false">https://medium.com/p/6bbd77b9a9e8</guid>
            <category><![CDATA[k8s-cluster-management]]></category>
            <category><![CDATA[k8s-series]]></category>
            <category><![CDATA[kubernetes-cluster]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[resources]]></category>
            <dc:creator><![CDATA[FoxuTech]]></dc:creator>
            <pubDate>Tue, 19 Dec 2023 14:28:19 GMT</pubDate>
            <atom:updated>2023-12-19T14:28:19.406Z</atom:updated>
            <content:encoded><![CDATA[<h3>What Happens When Kubernetes Pod CPU &amp; Memory Run High</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/0*Mq5BTh3ClKwGrc8f" /></figure><p>Kubernetes, the container orchestration platform of choice for many modern applications, thrives on efficient resource management. But what happens when pods, the fundamental units of deployment, start demanding more CPU or memory than they should? Buckle up, because we’re about to dive into the consequences of resource-hungry pods in the Kubernetes world.</p><p><strong>The Two Biggies: CPU Throttling and OOM Killer</strong></p><p>When a pod’s CPU usage breaches its limits, Kubernetes steps in with CPU throttling. This essentially acts like a dimmer switch, slowing down the container’s processes to ensure other pods get their fair share of CPU cycles. Imagine your pod struggling to run a marathon while wearing heavy boots; that’s CPU throttling in action.</p><p>Memory issues present a different beast. If a pod tries to gobble up more memory than its limit, the OOM killer swings into action. This ruthless entity identifies the most memory-hungry container and brutally terminates it, freeing up resources for other pods. Think of it as the eviction notice your landlord serves when you throw one too many epic house parties.</p><p>Let’s understand bit more in-detail about CPU throttling and Memory OOM.</p><p><strong>Kubernetes CPU throttling</strong></p><p>As mentioned, CPU Throttling is a behavior’s where processes are slowed when they are about to reach some resource limits.</p><p>Similar to the memory case, these limits could be:</p><ul><li>A Kubernetes Limit set on the container.</li><li>A Kubernetes ResourceQuota set on the namespace.</li><li>The node’s actual Memory size.</li></ul><p>Think of the following analogy. We have a highway with some traffic where:</p><ul><li>CPU is the road.</li><li>Vehicles represent the process, where each one has a different size.</li><li>Multiple lanes represent having several cores.</li><li>A request would be an exclusive road, like a bike lane.</li></ul><p>Throttling here is represented as a traffic jam: eventually, all processes will run, but everything will be slower.</p><p><strong>CPU process in Kubernetes</strong></p><p>CPU is handled in Kubernetes with shares. Each CPU core is divided into 1024 shares, then divided between all processes running by using the cgroups (control groups) feature of the Linux kernel.</p><p>If the CPU can handle all current processes, then no action is needed. If processes are using more than 100% of the CPU, then shares come into place. As any Linux Kernel, Kubernetes uses the CFS (Completely Fair Scheduler) mechanism, so the processes with more shares will get more CPU time.</p><p><em>Unlike memory, Kubernetes won’t kill Pods because of throttling.</em></p><p><strong>CPU overcommitment</strong></p><p>As we saw in the limits and requests article, it’s important to set <a href="https://foxutech.com/kubernetes-namespace-resource-quota-and-limits/">limits or requests</a> when we want to restrict the resource consumption of our processes. Nevertheless, beware of setting up total requests larger than the actual CPU size, as this means that every container should have a guaranteed amount of CPU.</p><p><strong>Monitoring Kubernetes CPU throttling</strong></p><p>You can check how close a process is to the Kubernetes limits using following promQL:</p><pre>(sum by (namespace,pod,container)(rate(container_cpu_usage_seconds_total{container!=&quot;&quot;}[5m])) / sum by (namespace,pod,container)(kube_pod_container_resource_limits{resource=&quot;cpu&quot;})) &gt; 0.8</pre><p>In case we want to track the amount of throttling happening in our cluster, <a href="https://github.com/google/cadvisor">cadvisor </a>provides container_cpu_cfs_throttled_periods_total and container_cpu_cfs_periods_total. With these two, you can easily calculate the % of throttling in all CPU periods.</p><p><strong>Kubernetes OOM</strong></p><p>Every container in a Pod needs memory to run. Kubernetes limits are set per container in either a Pod definition or a Deployment definition.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FO4E-Y5piBbI&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DO4E-Y5piBbI&amp;image=http%3A%2F%2Fi.ytimg.com%2Fvi%2FO4E-Y5piBbI%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/35ff556bd70f54fd86caf3643e361907/href">https://medium.com/media/35ff556bd70f54fd86caf3643e361907/href</a></iframe><p>All modern Unix systems have a way to kill processes in case they need to reclaim memory. This will be marked as Error 137 or OOMKilled. This Exit Code 137 means that the process used more memory than the allowed amount and had to be terminated.</p><p>This is a feature present in Linux, where the kernel sets an oom_score value for the process running in the system. Additionally, it allows setting a value called oom_score_adj, which is used by Kubernetes to allow Quality of Service. It also features an OOM Killer, which will review the process and terminate those that are using more memory than they should.</p><p>Note that in Kubernetes, a process can reach any of these limits:</p><ul><li>A Kubernetes Limit set on the container.</li><li>A Kubernetes ResourceQuota set on the namespace.</li><li>The node’s actual Memory size.</li></ul><p>here’s a use case when the Pod’s memory usage is very high and assume the Pod is a part of a deployment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/0*QTbxS1jFtQPucX4Y" /></figure><p><strong>Memory overcommitment</strong></p><p>Limits can be higher than requests, so the sum of all limits can be higher than node capacity. This is called overcommit and it is very common. In practice, if all containers use more memory than requested, it can exhaust the memory in the node. This usually causes the death of some pods in order to free some memory.</p><p>Continue reading on <a href="https://foxutech.com/what-happens-when-kubernetes-pod-cpu-memory-run-high/">What Happens When Kubernetes Pod CPU &amp; Memory Run High — FoxuTech</a></p><p>If you like our posts, dont forget to subscribe and share with your friends.</p><p>You can subscribe us on <a href="https://www.youtube.com/@FoxuTech">https://www.youtube.com/@FoxuTech</a></p><p>Follow us on <a href="https://twitter.com/i/flow/login?redirect_after_login=%2Ffoxutech">Twitter </a>&amp; <a href="https://www.instagram.com/foxutech">Instagram</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6bbd77b9a9e8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Choosing the Right Architecture for Argo CD]]></title>
            <link>https://foxutech.medium.com/choosing-the-right-architecture-for-argo-cd-667294da013e?source=rss-bf3548dc6db6------2</link>
            <guid isPermaLink="false">https://medium.com/p/667294da013e</guid>
            <category><![CDATA[argoproj]]></category>
            <category><![CDATA[architectural-design]]></category>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[gitops]]></category>
            <category><![CDATA[argo-cd]]></category>
            <dc:creator><![CDATA[FoxuTech]]></dc:creator>
            <pubDate>Tue, 19 Dec 2023 02:57:21 GMT</pubDate>
            <atom:updated>2023-12-19T02:57:21.786Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/696/0*6q8E7O-7zAAZLZXj" /></figure><p><a href="https://foxutech.com/category/kubernetes/argocd/">Argo CD</a> is a popular GitOps tool for managing Kubernetes applications. While it appears simple to use, scaling GitOps practices effectively depends on the chosen architecture. This article explores three common architectures for implementing Argo CD:</p><h4>1. Single Instance:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/526/0*jxTCpOG0petCsw1H" /></figure><p><strong>Advantages</strong>:</p><ul><li>Single view for deployment activity across all clusters.</li><li>Single control plane, simplifying installation and maintenance.</li><li>Single server for easy API/CLI integration.</li></ul><p><strong>Disadvantages</strong>:</p><ul><li>Scaling requires tuning of individual components.</li><li>Single point of failure for deployments.</li><li>Admin credentials for all clusters in one place.</li><li>Requires a separate “management” cluster.</li><li>Significant network traffic between Argo CD and clusters.</li></ul><p><strong><em>This architecture is popular for its simplicity and single view of applications. However, it has limitations regarding scalability, security, and network traffic.</em></strong></p><p><strong>Best for: </strong>Small environments with limited clusters and applications.</p><h4>2. Instance Per Cluster:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/467/0*DoM5p11Yl0qMpiuJ" /></figure><p><strong>Advantages</strong>:</p><ul><li>Distributes load per cluster.</li><li>No direct external access is required.</li><li>Eliminates Argo CD traffic leaving the cluster.</li><li>An outage in one cluster won’t affect other clusters.</li><li>Credentials are scoped per cluster.</li></ul><p><strong>Disadvantages</strong>:</p><ul><li>Requires maintaining multiple instances and duplicating configuration.</li><li>At a particular scale, each instance could still require tuning.</li><li>API/CLI integrations need to specify which instance.</li><li>Negative developer experience</li></ul><p><strong><em>This architecture improves security and reduces network traffic but requires more maintenance and has a more complex developer experience.</em></strong></p><p><strong>Best for</strong>: Environments with many clusters per environment.</p><p>Continue Reading on <a href="https://foxutech.com/choosing-the-right-architecture-for-argo-cd/">https://foxutech.com/choosing-the-right-architecture-for-argo-cd/</a></p><p>If you like our posts, please share with your friends.</p><p>You can subscribe us on <a href="https://www.youtube.com/@FoxuTech">https://www.youtube.com/@FoxuTech</a></p><p>Follow us on <a href="https://twitter.com/i/flow/login?redirect_after_login=%2Ffoxutech">Twitter </a>&amp; <a href="https://www.instagram.com/foxutech">Instagram</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=667294da013e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Microsoft has just released Azure Application Gateway for Containers, a public preview offering…]]></title>
            <link>https://foxutech.medium.com/microsoft-has-just-released-azure-application-gateway-for-containers-a-public-preview-offering-c021bac1c4e0?source=rss-bf3548dc6db6------2</link>
            <guid isPermaLink="false">https://medium.com/p/c021bac1c4e0</guid>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[load-balancing]]></category>
            <category><![CDATA[azure-application-gateway]]></category>
            <dc:creator><![CDATA[FoxuTech]]></dc:creator>
            <pubDate>Mon, 18 Dec 2023 02:57:21 GMT</pubDate>
            <atom:updated>2023-12-18T02:57:21.872Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/696/0*GnrfWByqUg95qP5E" /></figure><p>Microsoft has just released <a href="https://foxutech.com/category/cloud/azure/">Azure </a>Application Gateway for Containers, a public preview offering that promises to simplify and enhance load balancing for containerized applications running on <a href="https://foxutech.com/setup-argocd-on-azure-kubernetes-services/">Azure Kubernetes Service</a> (AKS).</p><p><strong>What is Azure Application Gateway for Containers?</strong></p><p>Azure Application Gateway for Containers is a Layer-7 load balancer specifically designed for containerized applications. It delivers a comprehensive solution for managing and distributing traffic across your containerized workloads, enabling efficient and scalable application deployment.</p><p><strong>Key components:</strong></p><ul><li>Application Gateway for Containers: The core service responsible for load balancing and traffic management.</li><li>Frontends: Represent the entry point for client traffic and provide a unique FQDN that can act as a CNAME record.</li><li>Associations: Define connection points into a virtual network, allowing traffic from the internet to be routed directly to the pods.</li></ul><p><strong>Benefits of AGIC:</strong></p><p>Traffic Management:</p><ul><li>Traffic splitting/Weighted round robin: Distributes traffic evenly across your pods for optimal performance and scalability.</li><li>Health probes: Monitor the health of your pods and automatically route traffic away from unhealthy ones.</li><li>Routing rules: Define complex routing rules based on various criteria such as source IP address, path, and headers.</li></ul><p>Security:</p><ul><li>Mutual authentication: Secure your application by enabling mutual authentication between the application gateway and the backend pods.</li><li>Web Application Firewall (WAF): Protect your application from common web attacks with the integrated WAF capabilities.</li></ul><p>Integration:</p><ul><li>Kubernetes support: Integrates seamlessly with Kubernetes Ingress and Gateway API for easy configuration and management.</li><li>Flexible deployment: Supports deployment through various methods, including ARM templates, PowerShell, CLI, Terraform, Bicep, and Kubernetes-native configurations.</li></ul><p>Performance:</p><ul><li>Near real-time updates: Offers near real-time updates for adding or moving pods, routes, and probes, ensuring efficient traffic management and responsiveness.</li><li>High scalability: Scales seamlessly to accommodate growing application demands.</li></ul><p><strong>An in-depth look at the components:</strong></p><p>Frontends:</p><ul><li>Provide a public entry point (FQDN) for your application, acting as a CNAME record for external clients.</li><li>Serve as the ingress point, receiving traffic and routing it directly to the appropriate pods based on application rules and configurations.</li></ul><p>Associations:</p><ul><li>Define a connection point into your virtual network, enabling internet traffic to be directed to the pods directly.</li><li>Allow for flexible routing rules based on source IP address, path, and other criteria.</li></ul><p>Benefits:</p><ul><li>Simplify configuration and management of your application’s public access point.</li><li>Ensure efficient traffic routing and distribution across your containerized workloads.</li></ul><p>Continue reading on <a href="https://foxutech.com/azure-application-gateway-for-containers-a-powerful-layer-7-load-balancer-for-your-kubernetes-applications/">https://foxutech.com/azure-application-gateway-for-containers-a-powerful-layer-7-load-balancer-for-your-kubernetes-applications/</a></p><p>If you like our posts, please share with your friends.</p><p>You can subscribe us on <a href="https://www.youtube.com/@FoxuTech">https://www.youtube.com/@FoxuTech</a></p><p>Follow us on <a href="https://twitter.com/i/flow/login?redirect_after_login=%2Ffoxutech">Twitter </a>&amp; <a href="https://www.instagram.com/foxutech">Instagram</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c021bac1c4e0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Deployments in Kubernetes: A Behind-the-Scenes Look]]></title>
            <link>https://foxutech.medium.com/understanding-deployments-in-kubernetes-a-behind-the-scenes-look-ac54cc427faa?source=rss-bf3548dc6db6------2</link>
            <guid isPermaLink="false">https://medium.com/p/ac54cc427faa</guid>
            <category><![CDATA[deployment]]></category>
            <category><![CDATA[k8s]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[k8s-series]]></category>
            <category><![CDATA[kubernetes-cluster]]></category>
            <dc:creator><![CDATA[FoxuTech]]></dc:creator>
            <pubDate>Sun, 17 Dec 2023 02:51:31 GMT</pubDate>
            <atom:updated>2023-12-17T02:54:44.857Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/696/0*NYxNu2vGoB7Uxj3b" /></figure><p>Kubernetes <a href="https://foxutech.com/how-to-setup-webserver-on-kubernetes/">Deployments </a>are a fundamental aspect of working with Kubernetes. While the process may seem straightforward, understanding the intricate steps behind the scenes is crucial for <a href="https://www.youtube.com/watch?v=iafrhI-wv1Y&amp;list=PL01zUOot7ccnsUJ75E0RCSFOx7sBrELaC">troubleshooting </a>and gaining a deeper understanding.</p><p><strong>Deployment Request Workflow:</strong></p><p>There are three primary ways to initiate deployments:</p><ul><li>YAML/JSON file: Applying a file containing the deployment manifest using kubectl apply.</li><li>kubectl run command: This simplifies deployment by providing image name and basic configuration in the command line.</li><li>kubectl create command: Offers greater control by specifying detailed deployment parameters.</li></ul><p><strong>Internal Workflow:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/0*ZOk6LFScHqkF9HAl" /></figure><p><strong>Client-Side:</strong></p><ul><li><em>Validation</em>: Ensures resource type, group, and client credentials are valid.</li><li><em>Context &amp; Authentication</em>: Extracts current context, cluster, and authentication information from kubeconfig.</li><li><em>HTTP Request</em>: Forms and sends the deployment request to the API server.</li></ul><p><strong>Server-Side:</strong></p><p><strong>API Server:</strong></p><ul><li><em>Authentication</em>: Verifies client credentials using certificates, tokens, or basic authentication.</li><li><em>Authorization</em>: Evaluates user privileges using RBAC, ABAC, or webhooks.</li><li><em>Admission Control</em>: Validates the request against defined criteria, potentially modifying it before storing it in etcd.</li><li><em>Persistence</em>: Stores the deployment request in etcd.</li></ul><p><strong>Deployment Controller:</strong></p><ul><li><em>ReplicaSet Creation</em>: Watches for new deployments in etcd and creates corresponding ReplicaSet objects.</li></ul><p><strong>ReplicaSet Controller:</strong></p><ul><li><em>Pod Creation</em>: Creates Pod objects based on the ReplicaSet spec.</li></ul><p><strong>Pod Controller:</strong></p><ul><li><em>Pod Scheduling</em>: Waits for the scheduler to update node information and create a binding object.</li></ul><p>Continue Reading on <a href="https://foxutech.com/understanding-deployments-in-kubernetes-a-behind-the-scenes-look/">https://foxutech.com/understanding-deployments-in-kubernetes-a-behind-the-scenes-look/</a></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fj5_mZcRXaPw%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dj5_mZcRXaPw&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fj5_mZcRXaPw%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/334ad075ee3b20139ce3ace01bdf7521/href">https://medium.com/media/334ad075ee3b20139ce3ace01bdf7521/href</a></iframe><p>If you like our posts, please share with your friends.</p><p>You can subscribe us on <a href="https://www.youtube.com/@FoxuTech">https://www.youtube.com/@FoxuTech</a></p><p>Follow us on <a href="https://twitter.com/i/flow/login?redirect_after_login=%2Ffoxutech">Twitter </a>&amp; <a href="https://www.instagram.com/foxutech">Instagram</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ac54cc427faa" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>