<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Kubernetes on Lucas Oliveira</title>
        <link>https://luks.dev.br/en/tags/kubernetes/</link>
        <description>Recent content in Kubernetes on Lucas Oliveira</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en-US</language>
        <copyright>Lucas Oliveira Dantas</copyright>
        <lastBuildDate>Mon, 16 Mar 2020 00:00:00 +0000</lastBuildDate><atom:link href="https://luks.dev.br/en/tags/kubernetes/index.xml" rel="self" type="application/rss+xml" /><item>
        <title>HPA based on CPU and Memory utilization</title>
        <link>https://luks.dev.br/en/p/hpa-based-on-cpu-and-memory-utilization/</link>
        <pubDate>Mon, 16 Mar 2020 00:00:00 +0000</pubDate><guid>https://luks.dev.br/en/p/hpa-based-on-cpu-and-memory-utilization/</guid>
        <description>&lt;p&gt;In this post, I will talk about the &lt;strong&gt;HPA&lt;/strong&gt;, which stands for &amp;ldquo;&lt;em&gt;Horizontal Pod Autoscaler&lt;/em&gt;&amp;rdquo;. It is a Kubernetes resource that automatically adjusts the number of replicas (pods) in a &lt;em&gt;deployment&lt;/em&gt; based on observed &lt;em&gt;CPU&lt;/em&gt; or &lt;em&gt;memory&lt;/em&gt; utilization.&lt;/p&gt;
&lt;h2 id=&#34;why-use-an-hpa&#34;&gt;Why use an HPA&lt;/h2&gt;
&lt;p&gt;The goal of an &lt;strong&gt;HPA&lt;/strong&gt; is to make sure your application has enough resources to handle demand. If resource utilization goes up, the HPA increases the number of replicas (more pods running) so the load is properly distributed. Likewise, if utilization goes down, the HPA reduces the number of replicas, saving resources. This keeps your application scalable and performant automatically and efficiently.&lt;/p&gt;
&lt;script src=&#34;https://gist.github.com/LuksJobs/7d4c9e2c7b1e4d94ac30163c897bf0b9.js&#34;&gt;&lt;/script&gt;
&lt;p&gt;Make sure to replace the name &amp;ldquo;&lt;strong&gt;meu-hpa&lt;/strong&gt;&amp;rdquo; with the name you want for the HPA, and &lt;strong&gt;meu-deployment&lt;/strong&gt; with the name of the deployment the HPA will be applied to. This ensures the HPA automatically adjusts the number of replicas of your deployment based on memory and CPU usage, keeping them at around 80% utilization.&lt;/p&gt;</description>
        </item>
        
    </channel>
</rss>
