<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4912226416400969049</id><updated>2026-04-14T12:38:12.397+01:00</updated><category term="DevOps"/><category term="Software Engineering"/><category term="Linux"/><category term="Ubuntu"/><category term="AWS"/><category term="C++"/><category term="Kubernetes"/><category term="Data Science"/><category term="Docker"/><category term="Terraform"/><category term="Python"/><category term="Go"/><category term="Machine Learning"/><category term="C#"/><category term="JavaScript"/><category term="Networking"/><category term="Windows"/><category term="Computer Vision"/><category term="Elasticsearch"/><category term="Security"/><category term="MFC"/><category term="MySQL"/><category term="Unix"/><category term="AWS EC2"/><category term="AWS EKS"/><category term="Node.js"/><category term="VSCode"/><category term="Visual Studio"/><category term="Amazon Elastic Kubernetes Service"/><category term="GUI"/><category term="NSIS"/><category term="DB"/><category term="Design Patterns"/><category term="IIS"/><category term="Interview"/><category term="Jetson"/><category term="SSH"/><category term="TypeScript"/><category term="VirtualBox"/><category term="Async"/><category term="Computer architecture"/><category term="STL"/><category term="git"/><category term="kubectl"/><category term="AWS IAM"/><category term="Anaconda"/><category term="Ansible"/><category term="Axis2C"/><category term="DNS"/><category term="System Architecture"/><category term="AI"/><category term="Bash"/><category term="GCP"/><category term="Google Cloud"/><category term="Helm"/><category term="Load Balancing"/><category term="NVIDIA"/><category term="PostgreSQL"/><category term="Web Services"/><category term="conda"/><category term="logging"/><category term="makefile"/><category term="video"/><category term=".NET"/><category term="AWS EC2 Auto scaling"/><category term="Autoscaling"/><category term="GNU"/><category term="GitHub"/><category term="HTTP"/><category term="Karpenter"/><category term="Mac"/><category term="Minikube"/><category term="OIDC"/><category term="OpenCV"/><category term="Rollup.js"/><category term="System Design"/><category term="Unit Testing"/><category term="Virtualenv"/><category term="WCF"/><category term="environment variables"/><category term="multithreading"/><category term="osx"/><category term="string"/><category term=".NET Core"/><category term="AWS EBS"/><category term="AWS S3"/><category term="Babel"/><category term="Batch file"/><category term="Boost"/><category term="Coursera"/><category term="DB dump"/><category term="DynamoDB"/><category term="EKS"/><category term="ELK"/><category term="ESLint"/><category term="Firewall"/><category term="Grafana"/><category term="Hardware"/><category term="IP"/><category term="JSON"/><category term="JetPack"/><category term="Jetson Nano"/><category term="Jupyter Notebook"/><category term="Kibana"/><category term="Lambda"/><category term="MacOS"/><category term="NMAKE"/><category term="OpenID"/><category term="R"/><category term="SQL"/><category term="TCP/IP"/><category term="TDD"/><category term="Unicode"/><category term="Wi-Fi"/><category term="Wireshark"/><category term="XML"/><category term="XML Data Binding"/><category term="YAML"/><category term="cryptography"/><category term="docker-compose"/><category term="g++"/><category term="make"/><category term="nvm"/><category term="AWS EFS"/><category term="AWS ELB"/><category term="AWS Lambda"/><category term="AWS RDS"/><category term="AWS VPC"/><category term="Amazon GuardDuty"/><category term="Amazon Kinesis"/><category term="C"/><category term="CAS"/><category term="CI/CD"/><category term="CMake"/><category term="CUDA"/><category term="Cloud Storage"/><category term="CloudWatch"/><category term="Cloudflare"/><category term="Confluence"/><category term="DOS"/><category term="DVD"/><category term="Debugging"/><category term="Deployment"/><category term="Doxygen"/><category term="ECK"/><category term="Endianness"/><category term="Filesystem"/><category term="GPU"/><category term="GParted"/><category term="GitHub Actions"/><category term="Graphviz"/><category term="Hacking"/><category term="IPv6"/><category term="Image Segmentation"/><category term="JupyterLab"/><category term="Linter"/><category term="Meld"/><category term="Merge"/><category term="Metrics"/><category term="Microservices"/><category term="Monitoring"/><category term="MySQL Workbench"/><category term="NUnit"/><category term="Neural Networks"/><category term="Nmap"/><category term="OOP"/><category term="Object Detection"/><category term="Observability"/><category term="PHP"/><category term="Packer"/><category term="Pingdom"/><category term="RStudio"/><category term="Redis"/><category term="Resources"/><category term="SOAP"/><category term="Serverless"/><category term="TPL"/><category term="TeamCity"/><category term="TensorFlow"/><category term="Tools"/><category term="VPC"/><category term="VS Code"/><category term="Vagrant"/><category term="Virtualenvwrapper"/><category term="Vue.js"/><category term="Web Applications"/><category term="Web Server"/><category term="Yarn"/><category term="curl"/><category term="gdb"/><category term="mysqlsh"/><category term="npm"/><category term="psql"/><category term="scp"/><category term="sed"/><category term="vi"/><category term="wget"/><category term="ACL"/><category term="AI Agents"/><category term="AKS"/><category term="API Proxy"/><category term="AWS AMI"/><category term="AWS CLI"/><category term="AWS CodeDeploy"/><category term="AWS ECS"/><category term="AWS Fargate"/><category term="AWS IAM Identity Center"/><category term="AWS S2S VPN"/><category term="AWS SQS"/><category term="AWS Secrets Manager"/><category term="Access Control List"/><category term="Agentic AI"/><category term="Agile"/><category term="Algorithms"/><category term="Alpine"/><category term="Altinity"/><category term="Amazon API Gateway"/><category term="Amazon Bedrock"/><category term="Amazon CloudWatch"/><category term="Amazon ElastiCache"/><category term="Amazon Kinesis Data Streams"/><category term="Amazon Linux"/><category term="Amazon RDS"/><category term="ArgoCD"/><category term="Axios"/><category term="Azure Kubernetes Service"/><category term="Bazel"/><category term="Big  O Notation"/><category term="BitLocker"/><category term="Browserify"/><category term="CDN"/><category term="CI"/><category term="COM"/><category term="CRI"/><category term="Caffe"/><category term="Chromium"/><category term="Claude Code"/><category term="Clickhouse"/><category term="Cloud"/><category term="Cloud CDN"/><category term="Cloud DNS"/><category term="CloudFront"/><category term="Cluster Autoscaler"/><category term="CodeSynthesis"/><category term="Coding Practices"/><category term="Compute Engine"/><category term="Containerization"/><category term="Cygwin"/><category term="DLL"/><category term="Data Binding"/><category term="Diff"/><category term="EBS"/><category term="Eclipse"/><category term="Fast R-CNN"/><category term="Faster R-CNN"/><category term="Fiddler"/><category term="Freeware"/><category term="GKE"/><category term="GPG"/><category term="GStreamer"/><category term="GTK"/><category term="GeminiAI"/><category term="Gimp"/><category term="Ginkgo"/><category term="GitHub CLI"/><category term="GitOps"/><category term="Google"/><category term="Google Colab"/><category term="Google Kubernetes Engine"/><category term="Grafana Loki"/><category term="Gulp"/><category term="Guththila"/><category term="H2O"/><category term="HCP"/><category term="HPA"/><category term="HandBrake"/><category term="HashiCorp Cloud Provider"/><category term="Horizontal Pod Autoscaler"/><category term="IAM"/><category term="IAM Identity Center"/><category term="IEEE802.11"/><category term="INetCfg"/><category term="IPv4"/><category term="IaaS"/><category term="Idiom"/><category term="Image Classification"/><category term="Image Processing"/><category term="Image Recognition"/><category term="Image editor"/><category term="ImageMagick"/><category term="Ingress"/><category term="Instance Segmentation"/><category term="Integration Testing"/><category term="JIRA"/><category term="JQL"/><category term="JSON Spirit"/><category term="Jest"/><category term="Kali Linux"/><category term="Krew"/><category term="KubePug"/><category term="Kubent"/><category term="LAMP"/><category term="LLM"/><category term="Linker"/><category term="Logstash"/><category term="MCP"/><category term="Meetup"/><category term="Memory dump"/><category term="MongoDB"/><category term="NAT"/><category term="NVIDIA DIGITS"/><category term="Ncat"/><category term="NetBIOS"/><category term="Nginx"/><category term="Notepad++"/><category term="Object Localization"/><category term="Object Recognition"/><category term="OpenVpn"/><category term="Overfeat"/><category term="PKA"/><category term="PaaS"/><category term="Pluto"/><category term="Port forwarding"/><category term="Postman"/><category term="Proxy"/><category term="PyDev"/><category term="PyInstaller"/><category term="PyWin32"/><category term="QA"/><category term="Qt"/><category term="R-CNN"/><category term="RawCap"/><category term="Refactoring"/><category term="RegEx"/><category term="RequireJS"/><category term="Router"/><category term="S3"/><category term="SAML"/><category term="SMB"/><category term="SOA"/><category term="SRE"/><category term="SSD"/><category term="SSO"/><category term="Scrapy"/><category term="Security Group"/><category term="Semantic Segmentation"/><category term="Site24x7"/><category term="Sliding Window"/><category term="Software"/><category term="SourceTree"/><category term="Static Code Analysis"/><category term="Stored Procedure"/><category term="TAP"/><category term="TSLint"/><category term="Taskbar"/><category term="TensorRT"/><category term="Terminal"/><category term="Terraform Cloud"/><category term="Tray icon"/><category term="UAC"/><category term="UML"/><category term="Unsupervised Machine Learning"/><category term="VLC"/><category term="VPN"/><category term="VertexAI"/><category term="Viber"/><category term="Virtualization"/><category term="WAF"/><category term="WSDL"/><category term="Web scraping"/><category term="WinDbg"/><category term="Windows API"/><category term="Xerces"/><category term="YOLO"/><category term="airmon-ng"/><category term="brew"/><category term="chmod"/><category term="chown"/><category term="containerd"/><category term="cron"/><category term="crontab"/><category term="ffmpeg"/><category term="functor"/><category term="gSOAP"/><category term="gcc"/><category term="gh"/><category term="heredoc"/><category term="jq"/><category term="kubeadm"/><category term="manipulator"/><category term="map"/><category term="ngrok"/><category term="node-gyp"/><category term="open-source"/><category term="pgAdmin"/><category term="ping"/><category term="pip"/><category term="pip3"/><category term="read"/><category term="tar"/><category term="templates"/><category term="terraform-docs"/><category term="vim"/><category term="webcam"/><category term="wxPython"/><category term="yq"/><title type='text'>My Public Notepad</title><subtitle type='html'>Bits and bobs about computers and programming</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.bojankomazec.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://www.bojankomazec.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Bojan Komazec</name><uri>http://www.blogger.com/profile/05437236807206825832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>512</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4912226416400969049.post-8966977539884962149</id><published>2026-04-10T16:21:00.003+01:00</published><updated>2026-04-10T17:57:35.230+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AI"/><category scheme="http://www.blogger.com/atom/ns#" term="Claude Code"/><title type='text'>How to install and setup Claude Code on MacOS + VS Code</title><content type='html'>&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiC9dW0-zQI2mqq1qBJRsMkBhGn0O8xcS1fg4osrumfurtxCRS2e1zJwZvGQEe4oWpsIKMUuuaB94vqp1AhyphenhyphenqZIGRRItnTV1ZBaHfDTWV_t_vx-esOMA3McQez0Ij7hCVBKCBSnOHBSuVoQukHxyQyBf5yzU6zpqtZc8D79IU2hqX796qFPiKKZVIN1tHE/s1024/claude-color.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1024&quot; data-original-width=&quot;1024&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiC9dW0-zQI2mqq1qBJRsMkBhGn0O8xcS1fg4osrumfurtxCRS2e1zJwZvGQEe4oWpsIKMUuuaB94vqp1AhyphenhyphenqZIGRRItnTV1ZBaHfDTWV_t_vx-esOMA3McQez0Ij7hCVBKCBSnOHBSuVoQukHxyQyBf5yzU6zpqtZc8D79IU2hqX796qFPiKKZVIN1tHE/w640-h640/claude-color.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Let&#39;s follow steps from&amp;nbsp;&lt;a href=&quot;https://code.claude.com/docs/en/quickstart#step-1-install-claude-code&quot;&gt;Quickstart - Claude Code Docs&lt;/a&gt;:&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% &lt;b&gt;curl -fsSL https://claude.ai/install.sh | bash&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;Setting up Claude Code...&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;✔ Claude Code successfully installed!&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; Version: 2.1.100&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; Location: ~/.local/bin/claude&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; Next: Run claude --help to get started&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;⚠ Setup notes:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; • Native installation exists but ~/.local/bin is not in your PATH. Run:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; echo &#39;export PATH=&quot;$HOME/.local/bin:$PATH&quot;&#39; &amp;gt;&amp;gt; ~/.zshrc &amp;amp;&amp;amp; source ~/.zshrc&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;✅ Installation complete!&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Let&#39;s add path to bin to PATH, add it to zsh config and reload it:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% echo &#39;export PATH=&quot;$HOME/.local/bin:$PATH&quot;&#39; &amp;gt;&amp;gt; ~/.zshrc &amp;amp;&amp;amp; source ~/.zshrc&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you use Bash:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;source ~/.bashrc&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Verification:&lt;/h2&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;$HOME/.local/bin&lt;/span&gt; is now in &lt;span style=&quot;font-family: courier;&quot;&gt;$PATH&lt;/span&gt;:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% echo $PATH&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;/Users/bojan/.local/bin:....&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Let&#39;s check Claude version:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% &lt;b&gt;claude --version&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;2.1.100 (Claude Code)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Let&#39;s also see its CLI arguments:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% &lt;b&gt;claude --help&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;Usage: claude [options] [command] [prompt]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;Claude Code - starts an interactive session by default, use -p/--print for non-interactive output&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;Arguments:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; prompt&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Your prompt&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;Options:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; --add-dir &amp;lt;directories...&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Additional directories to allow tool access to&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; --agent &amp;lt;agent&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Agent for the current session. Overrides the &#39;agent&#39; setting.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; --agents &amp;lt;json&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;JSON object defining custom agents (e.g. &#39;{&quot;reviewer&quot;: {&quot;description&quot;: &quot;Reviews code&quot;, &quot;prompt&quot;: &quot;You are a code&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; reviewer&quot;}}&#39;)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; --allow-dangerously-skip-permissions&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Enable bypassing all permission checks as an option, without it being enabled by default. Recommended only for&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sandboxes with no internet access.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; --allowedTools, --allowed-tools &amp;lt;tools...&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Comma or space-separated list of tool names to allow (e.g. &quot;Bash(git:*) Edit&quot;)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; --append-system-prompt &amp;lt;prompt&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Append a system prompt to the default system prompt&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; --bare&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Minimal mode: skip hooks, LSP, plugin sync, attribution, auto-memory, background prefetches, keychain reads, and&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CLAUDE.md auto-discovery. Sets CLAUDE_CODE_SIMPLE=1. Anthropic auth is strictly ANTHROPIC_API_KEY or apiKeyHelper via&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; --settings (OAuth and keychain are never read). 3P providers (Bedrock/Vertex/Foundry) use their own credentials.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Skills still resolve via /skill-name. Explicitly provide context via: --system-prompt[-file],&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; --append-system-prompt[-file], --add-dir (CLAUDE.md dirs), --mcp-config, --settings, --agents, --plugin-dir.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; --betas &amp;lt;betas...&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Beta headers to include in API requests (API key users only)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; --brief&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Enable SendUserMessage tool for agent-to-user communication&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; --chrome&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Enable Claude in Chrome integration&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; -c, --continue&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Continue the most recent conversation in the current directory&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; --dangerously-skip-permissions&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Bypass all permission checks. Recommended only for sandboxes with no internet access.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; -d, --debug [filter]&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Enable debug mode with optional category filtering (e.g., &quot;api,hooks&quot; or &quot;!1p,!file&quot;)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; --debug-file &amp;lt;path&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Write debug logs to a specific file path (implicitly enables debug mode)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; --disable-slash-commands&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Disable all skills&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; --disallowedTools, --disallowed-tools &amp;lt;tools...&amp;gt;&amp;nbsp; Comma or space-separated list of tool names to deny (e.g. &quot;Bash(git:*) Edit&quot;)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; --effort &amp;lt;level&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Effort level for the current session (low, medium, high, max)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; --exclude-dynamic-system-prompt-sections&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Move per-machine sections (cwd, env info, memory paths, git status) from the system prompt into the first user&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; message. Improves cross-user prompt-cache reuse. Only applies with the default system prompt (ignored with&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; --system-prompt). (default: false)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; --fallback-model &amp;lt;model&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Enable automatic fallback to specified model when default model is overloaded (only works with --print)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; --file &amp;lt;specs...&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;File resources to download at startup. Format: file_id:relative_path (e.g., --file file_abc:doc.txt file_def:img.png)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; --fork-session&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; When resuming, create a new session ID instead of reusing the original (use with --resume or --continue)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; --from-pr [value]&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Resume a session linked to a PR by PR number/URL, or open interactive picker with optional search term&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; -h, --help&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Display help for command&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; --ide&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Automatically connect to IDE on startup if exactly one valid IDE is available&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; --include-hook-events&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Include all hook lifecycle events in the output stream (only works with --output-format=stream-json)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; --include-partial-messages&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Include partial message chunks as they arrive (only works with --print and --output-format=stream-json)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; --input-format &amp;lt;format&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Input format (only works with --print): &quot;text&quot; (default), or &quot;stream-json&quot; (realtime streaming input) (choices:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;text&quot;, &quot;stream-json&quot;)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; --json-schema &amp;lt;schema&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; JSON Schema for structured output validation. Example:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&quot;type&quot;:&quot;object&quot;,&quot;properties&quot;:{&quot;name&quot;:{&quot;type&quot;:&quot;string&quot;}},&quot;required&quot;:[&quot;name&quot;]}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; --max-budget-usd &amp;lt;amount&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Maximum dollar amount to spend on API calls (only works with --print)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; --mcp-config &amp;lt;configs...&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Load MCP servers from JSON files or strings (space-separated)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; --mcp-debug&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[DEPRECATED. Use --debug instead] Enable MCP debug mode (shows MCP server errors)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; --model &amp;lt;model&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Model for the current session. Provide an alias for the latest model (e.g. &#39;sonnet&#39; or &#39;opus&#39;) or a model&#39;s full name&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (e.g. &#39;claude-sonnet-4-6&#39;).&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; -n, --name &amp;lt;name&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Set a display name for this session (shown in /resume and terminal title)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; --no-chrome&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Disable Claude in Chrome integration&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; --no-session-persistence&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Disable session persistence - sessions will not be saved to disk and cannot be resumed (only works with --print)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; --output-format &amp;lt;format&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Output format (only works with --print): &quot;text&quot; (default), &quot;json&quot; (single result), or &quot;stream-json&quot; (realtime&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; streaming) (choices: &quot;text&quot;, &quot;json&quot;, &quot;stream-json&quot;)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; --permission-mode &amp;lt;mode&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Permission mode to use for the session (choices: &quot;acceptEdits&quot;, &quot;auto&quot;, &quot;bypassPermissions&quot;, &quot;default&quot;, &quot;dontAsk&quot;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;plan&quot;)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; --plugin-dir &amp;lt;path&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Load plugins from a directory for this session only (repeatable: --plugin-dir A --plugin-dir B) (default: [])&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; -p, --print&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Print response and exit (useful for pipes). Note: The workspace trust dialog is skipped when Claude is run with the&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -p mode. Only use this flag in directories you trust.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; --remote-control-session-name-prefix &amp;lt;prefix&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Prefix for auto-generated Remote Control session names (default: hostname)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; --replay-user-messages&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Re-emit user messages from stdin back on stdout for acknowledgment (only works with --input-format=stream-json and&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; --output-format=stream-json)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; -r, --resume [value]&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Resume a conversation by session ID, or open interactive picker with optional search term&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; --session-id &amp;lt;uuid&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Use a specific session ID for the conversation (must be a valid UUID)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; --setting-sources &amp;lt;sources&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Comma-separated list of setting sources to load (user, project, local).&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; --settings &amp;lt;file-or-json&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Path to a settings JSON file or a JSON string to load additional settings from&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; --strict-mcp-config&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Only use MCP servers from --mcp-config, ignoring all other MCP configurations&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; --system-prompt &amp;lt;prompt&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System prompt to use for the session&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; --tmux&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; --tmux=classic for traditional tmux.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; --tools &amp;lt;tools...&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Specify the list of available tools from the built-in set. Use &quot;&quot; to disable all tools, &quot;default&quot; to use all tools,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; or specify tool names (e.g. &quot;Bash,Edit,Read&quot;).&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; --verbose&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Override verbose mode setting from config&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; -v, --version&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Output the version number&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; -w, --worktree [name]&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Create a new git worktree for this session (optionally specify a name)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;Commands:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; agents [options]&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; List configured agents&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; auth&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Manage authentication&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; auto-mode&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Inspect auto mode classifier configuration&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; doctor&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Check the health of your Claude Code auto-updater. Note: The workspace trust dialog is skipped and stdio servers from&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .mcp.json are spawned for health checks. Only use this command in directories you trust.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; install [options] [target]&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Install Claude Code native build. Use [target] to specify version (stable, latest, or specific version)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; mcp&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Configure and manage MCP servers&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; plugin|plugins&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Manage Claude Code plugins&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; setup-token&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Set up a long-lived authentication token (requires Claude subscription)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; update|upgrade&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Check for updates and install if available&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;And finally, let&#39;s launch it:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% &lt;b&gt;claude&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;Welcome to Claude Code v2.1.100&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;…………………………………………………………………………………………………………………………………………………………&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;*&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;█████▓▓░&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;*&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;███▓░&amp;nbsp; &amp;nbsp; &amp;nbsp;░░&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ░░░░░░&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ███▓░&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; ░░░&amp;nbsp; &amp;nbsp;░░░░░░░░░░&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ███▓░&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp;░░░░░░░░░░░░░░░░░░░&amp;nbsp; &amp;nbsp; *&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ██▓░░&amp;nbsp; &amp;nbsp; &amp;nbsp; ▓&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;░▓▓███▓▓░&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;*&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;░░░░&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;░░░░░░░░&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;░░░░░░░░░░░░░░░░&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;█████████&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; *&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ██▄█████▄██&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; *&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;█████████&amp;nbsp; &amp;nbsp; &amp;nbsp; *&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;…………………█ █&amp;nbsp; &amp;nbsp;█ █………………………………………………………………………………………………………………&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;Let&#39;s get started.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;Choose the text style that looks best with your terminal&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;To change this later, run /theme&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;❯ 1. Dark mode ✔&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp;2. Light mode&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp;3. Dark mode (colorblind-friendly)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp;4. Light mode (colorblind-friendly)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp;5. Dark mode (ANSI colors only)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp;6. Light mode (ANSI colors only)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; 1&amp;nbsp; function greet() {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; 2 -&amp;nbsp; console.log(&quot;Hello, World!&quot;);&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; 2 +&amp;nbsp; console.log(&quot;Hello, Claude!&quot;);&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; 3&amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; Syntax theme: Monokai Extended (ctrl+t to disable)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;After that we need to select a login method:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp;❯ 1. Claude account with subscription · Pro, Max, Team, or Enterprise&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;2. Anthropic Console account · API usage billing&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;3. 3rd-party platform · Amazon Bedrock, Microsoft Foundry, or Vertex AI&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Option 1 - &lt;b&gt;&lt;u&gt;Claude Accounts&lt;/u&gt;&lt;/b&gt; are for the &lt;b&gt;consumer/pro web interface&lt;/b&gt; (&lt;u&gt;claude.ai&lt;/u&gt;) which is seat-based.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Option 2 - &lt;u&gt;&lt;b&gt;Anthropic Console&lt;/b&gt; &lt;/u&gt;account should be selected if your organization is on an &lt;b&gt;API plan&lt;/b&gt; (pay-as-you-go billing based on token usage).&amp;nbsp;&lt;b&gt;Anthropic Console&lt;/b&gt;&amp;nbsp;(&lt;u&gt;platform.claude.com&lt;/u&gt;) is the hub for managing API keys, billing, and developer organizations.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Option 3 - &lt;b&gt;&lt;u&gt;3rd-party platforms&lt;/u&gt;&lt;/b&gt; are only for when you want to route Claude&#39;s &quot;brain&quot; through your existing AWS (Bedrock) or Google Cloud (Vertex) bills.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;After selecting Anthropic Console, you&#39;ll be taken to page which shows the following:&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;blockquote style=&quot;border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;&quot;&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div&gt;&lt;i&gt;Claude Code would like to connect to your Anthropic organization MYORG&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div&gt;&lt;i&gt;YOUR ACCOUNT WILL BE USED TO:&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;Generate API keys on your behalf&lt;/i&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;Access your Anthropic profile information&lt;/i&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;Upload files on your behalf&lt;/i&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;blockquote style=&quot;border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;&quot;&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div&gt;&lt;i&gt;Logged in as user@myorg.com&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div&gt;&lt;i&gt;Switch account&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;After clicking on Authorize button, you&#39;ll be redirected to a page which shows:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;blockquote style=&quot;border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;&quot;&gt;&lt;div&gt;&lt;div&gt;&lt;i&gt;Build something great&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;i&gt;You’re all set up for Claude Code.&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;i&gt;You can now close this window.&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Back in terminal, you&#39;ll see:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;Logged in as user@myorg.com&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;Login successful. Press Enter to continue…&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;After pressing Enter:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;Security notes:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;1. Claude can make mistakes&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; You should always review Claude&#39;s responses, especially when&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; running code.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;2. Due to prompt injection risks, only use it with code you trust&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; For more details see:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; https://code.claude.com/docs/en/security&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;Press Enter to continue…&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;After clicking on Enter:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;Use Claude Code&#39;s terminal setup?&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;For the optimal coding experience, enable the recommended settings&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;for your terminal: Shift+Enter for newlines&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;❯ 1. Yes, use recommended settings&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp;2. No, maybe later with /terminal-setup&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;Enter to confirm · Esc to skip&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;After choosing 1 - recommended settings:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;Accessing workspace:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;/Users/bojan/path/to/project&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;Quick safety check: Is this a project you created or one you trust? (Like your own code, a well-known open source project, or work from your team). If not, take a&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;moment to review what&#39;s in this folder first.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;Claude Code&#39;ll be able to read, edit, and execute files here.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;Security guide&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;❯ 1. Yes, I trust this folder&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp;2. No, exit&amp;nbsp; &amp;nbsp;&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;Enter to confirm · Esc to cancel&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;After selecting 1:&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;╭─── Claude Code v2.1.100───────────────────────────────────────────────────────────────────────────────────────╮&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;│&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; │ Tips for getting started&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;│&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Welcome back User!&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;│ Run /init to create a CLAUDE.md file with instructions for Claude│&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;│&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; │ ─────────────────────────────────────────────────────────────────│&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;│&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;▐▛███▜▌&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; │ Recent activity&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; │&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;│&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ▝▜█████▛▘&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;│ No recent activity&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;│&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;│&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ▘▘ ▝▝&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;│&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;│&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; │&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; │&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;│&amp;nbsp; &amp;nbsp;Sonnet 4.6 · API Usage Billing · MYORG&amp;nbsp; &amp;nbsp;│&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;│&amp;nbsp; &amp;nbsp;~/…/path/to/project&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; │&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────╯&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;─────────────────────────────────────────────────────────────────────────────────────────────────────────────────&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;❯&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;─────────────────────────────────────────────────────────────────────────────────────────────────────────────────&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; ? for shortcuts&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;● high · /effort&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier; font-size: xx-small;&quot;&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;We can now run various commands, like:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;────────────────────────────────────────────────────────────&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;❯ /stats&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;────────────────────────────────────────────────────────────&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;/stats&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Show your Claude Code usage statistics and activity&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;/status&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Show Claude Code status including version, model, account, API connectivity, and tool statuses&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;/statusline&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Set up Claude Code&#39;s status line UI&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;/ide&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Manage IDE integrations and show status&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If we execute &lt;span style=&quot;font-family: courier;&quot;&gt;/stats&lt;/span&gt; at this point, the output will show:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;❯ /stats&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;────────────────────────────────────────────────────────────&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;Status&amp;nbsp; &amp;nbsp;Config&amp;nbsp; &amp;nbsp;Usage&amp;nbsp; &amp;nbsp;Stats&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;No stats available yet. Start using Claude Code!&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In my case Status tab showed, among other things:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: red; font-family: courier;&quot;&gt;&amp;nbsp; IDE: ✘ Error installing VS Code extension: 1: Command failed with ERR_STREAM_PREMATURE_CLOSE: code --force --install-extension anthropic.claude-code&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: red; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Premature close&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: red; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Please restart your IDE and try again.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I restarted VS Code to no avail. I then manually installed Claude Code for VS Code plugin and restarted VD Code but the same error appeared again. There is a related bug, still with Open status:&amp;nbsp;&lt;a href=&quot;https://github.com/anthropics/claude-code/issues/34639&quot;&gt;[BUG] Claude code VS Code extension error in MacOS · Issue #34639 · anthropics/claude-code&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If we try&amp;nbsp;&lt;span style=&quot;font-family: courier;&quot;&gt;/cost&lt;/span&gt;:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;❯ /stats&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; ⎿&amp;nbsp; Status dialog dismissed&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;❯ /cost&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; ⎿&amp;nbsp; Total cost:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $0.0000&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Total duration (API):&amp;nbsp; 0s&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Total duration (wall): 1h 16m 21s&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Total code changes:&amp;nbsp; &amp;nbsp; 0 lines added, 0 lines removed&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Usage:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 input, 0 output, 0 cache read, 0 cache write&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.bojankomazec.com/feeds/8966977539884962149/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4912226416400969049/8966977539884962149' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/8966977539884962149'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/8966977539884962149'/><link rel='alternate' type='text/html' href='http://www.bojankomazec.com/2026/04/how-to-install-claude-code-on-macos.html' title='How to install and setup Claude Code on MacOS + VS Code'/><author><name>Bojan Komazec</name><uri>http://www.blogger.com/profile/05437236807206825832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiC9dW0-zQI2mqq1qBJRsMkBhGn0O8xcS1fg4osrumfurtxCRS2e1zJwZvGQEe4oWpsIKMUuuaB94vqp1AhyphenhyphenqZIGRRItnTV1ZBaHfDTWV_t_vx-esOMA3McQez0Ij7hCVBKCBSnOHBSuVoQukHxyQyBf5yzU6zpqtZc8D79IU2hqX796qFPiKKZVIN1tHE/s72-w640-h640-c/claude-color.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4912226416400969049.post-5879915728250357660</id><published>2026-04-08T12:36:00.010+01:00</published><updated>2026-04-08T13:12:18.326+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AI"/><category scheme="http://www.blogger.com/atom/ns#" term="MCP"/><title type='text'>Model Context Protocol (MCP)</title><content type='html'>&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8A60re2nD4AwHHSi7LJHj4v0mh7ZeoLzo28cm_iEfN3RTIDA4OyuCTEQL5vs7MR3f4xqW4zxWdYkl-iVA3JoMPWwP4HMsqPseSrtxThyphenhyphenZv7s_4lToQLXv14sFA_kX8HPBNxRP5b0-oJnAMJFx1recQJBziBHM_q78eZUTHLf2rwgn_SzS4gF18TSAevE/s1190/Screenshot%202026-04-08%20at%2012.30.13.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;872&quot; data-original-width=&quot;1190&quot; height=&quot;468&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8A60re2nD4AwHHSi7LJHj4v0mh7ZeoLzo28cm_iEfN3RTIDA4OyuCTEQL5vs7MR3f4xqW4zxWdYkl-iVA3JoMPWwP4HMsqPseSrtxThyphenhyphenZv7s_4lToQLXv14sFA_kX8HPBNxRP5b0-oJnAMJFx1recQJBziBHM_q78eZUTHLf2rwgn_SzS4gF18TSAevE/w640-h468/Screenshot%202026-04-08%20at%2012.30.13.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Model Context Protocol (MCP)&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The Model Context Protocol (MCP):&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Open-source standard&lt;/li&gt;&lt;li&gt;Enables AI models to seamlessly connect with external data sources, tools, and software systems&lt;/li&gt;&lt;li&gt;Acts as a universal &quot;USB-C port&quot; for AI, allowing LLMs to securely access local files, databases, and APIs to enhance context-aware responses.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Introduced by Anthropic in late 2024&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Key Aspects of MCP:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;Purpose&lt;/b&gt;: Replaces fragmented, custom integrations with a single, open standard, making it easier to connect &lt;u&gt;AI assistants&lt;/u&gt; to &lt;u&gt;enterprise data&lt;/u&gt;, &lt;u&gt;tools&lt;/u&gt;, and &lt;u&gt;development environments&lt;/u&gt;.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Components&lt;/b&gt;: Consists of:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;MCP Clients&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;MCP Hosts&lt;/b&gt;&amp;nbsp;- AI apps like Claude or coding agents&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;b&gt;MCP Servers&lt;/b&gt;&amp;nbsp;- programs that bridge specific data sources&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;Security&lt;/b&gt;: MCP supports secure, two-way connections, allowing developers to control exactly what data is exposed to the AI.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Functionality&lt;/b&gt;: Enables models to read files, query databases, use search engines, and call external APIs, providing live, relevant context for tasks.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Open Standard&lt;/b&gt;: Hosted by the Linux Foundation, the protocol is designed for broad industry adoption.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;MCP differs from RAG (Retrieval-Augmented Generation) by focusing on active, two-way interaction with systems, whereas RAG is focused on retrieving documents for context.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For developers, it provides SDKs in Python and TypeScript.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;MCP clients&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;MCP clients are the components within AI applications (AI Hosts) that manage one-to-one connections with MCP servers, translating AI requests into protocol-standardized messages.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Popular MCP Client Applications&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Several major AI-powered platforms and editors have integrated MCP client support to allow users to pull in their own tools and context:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;Claude Desktop&lt;/b&gt;: Anthropic’s flagship app provides a built-in interface for managing local and remote MCP servers (e.g., Google Drive, Slack, GitHub).&lt;/li&gt;&lt;li&gt;&lt;b&gt;Cursor&lt;/b&gt;: An AI-native code editor that uses MCP to give its internal AI models direct access to project files, local databases, and custom developer tools.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Windsurf Editor&lt;/b&gt;: A developer environment that supports tool invocation through MCP servers, allowing it to seamlessly interact with external scripts and APIs during coding sessions.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Visual Studio Code (Agent Mode)&lt;/b&gt;: Developers can use extensions to register MCP servers, enabling chat assistants to interact with internal enterprise tools directly within the editor.&lt;/li&gt;&lt;li&gt;&lt;b&gt;JetBrains IDEs&lt;/b&gt;: Platforms like IntelliJ IDEA feature an MCP-client UI where users can paste server configurations to bring external tool catalogues into the AI Assistant pane.&lt;/li&gt;&lt;li&gt;&lt;b&gt;BeeAI&lt;/b&gt;: An open-source desktop AI assistant from IBM that supports tool integration via built-in or custom MCP servers.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Core Client Features&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In the MCP architecture, clients don&#39;t just consume data; they provide specific features that enable complex, &quot;agentic&quot; workflows:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Sampling: Allows a server to request that the client (and its LLM) generate a completion, enabling the AI to &quot;ask back&quot; for clarification or more information.&lt;/li&gt;&lt;li&gt;Elicitation: Provides a structured way for servers to ask users for specific information (like a password or preference) through the client’s UI.&lt;/li&gt;&lt;li&gt;Roots: Allows the client to define specific file system boundaries, telling servers which directories they are permitted to access for safety and context scoping.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Developer SDKs for Building Clients&amp;nbsp;&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you are building your own AI application, you can implement an MCP client using official software development kits:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;TypeScript/Node.js SDK: The most comprehensive SDK for building web-based or local Node.js clients using standard JSON-RPC 2.0.&lt;/li&gt;&lt;li&gt;Python SDK: Ideal for data science or automation workflows, allowing easy integration with Python-based AI agents.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;MCP Hosts&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Model Context Protocol (MCP) hosts are AI applications or environments that manage, connect, and run MCP clients to interact with external data sources (servers). Key examples include Claude Desktop, Claude Code, Zed, Replit, Cursor, and Sourcegraph.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Key Roles of MCP Hosts:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Orchestration: Act as the container for AI models to coordinate and communicate with multiple MCP servers.&lt;/li&gt;&lt;li&gt;Security &amp;amp; Permissions: Manage user consent and enforce security policies (e.g., in sandboxed iframes) to control what data servers can access.&lt;/li&gt;&lt;li&gt;Workflow Management: Aggregate user prompts, conversation state, and tool results from various sources to enable seamless interaction.&lt;/li&gt;&lt;li&gt;Session Control: Initialize, maintain, and terminate connections between LLMs and tools via the MCP client.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;Primary MCP Host Examples:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Claude Desktop: Anthropic&#39;s desktop application is a primary implementation of an MCP host, allowing the Claude model to utilize local tools and data.&lt;/li&gt;&lt;li&gt;Claude Code: An AI agentic coding tool that acts as a host to interact with development-focused MCP servers.&lt;/li&gt;&lt;li&gt;AI IDEs (Zed, Cursor, Replit): Integrated Development Environments that use MCP to connect coding assistants with files, documentation, and databases.&lt;/li&gt;&lt;li&gt;Platforms &amp;amp; Agents: Other platforms like Workato or custom agents that orchestrate data access via the protocol.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;What&#39;s the difference between mcp host and mcp client?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In the Model Context Protocol (MCP), the Host is the overall application you interact with, while the Client is the specific component inside that application that handles the technical connection to a server.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Key Differences at a Glance&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;What it is&lt;/li&gt;&lt;ul&gt;&lt;li&gt;MCP Host: The end-user application (e.g., Claude Desktop, Cursor).&lt;/li&gt;&lt;li&gt;MCP Client: A protocol handler or &quot;adapter&quot; inside the host.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Primary Role&lt;/li&gt;&lt;ul&gt;&lt;li&gt;MCP Host: Manages the user interface and coordinates multiple clients.&lt;/li&gt;&lt;li&gt;MCP Client: Maintains a 1:1 connection with a single MCP server.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Responsibility&lt;/li&gt;&lt;ul&gt;&lt;li&gt;MCP Host: Security policies, user consent, and aggregating data for the AI model&lt;/li&gt;&lt;li&gt;MCP Client: Translating protocol messages (JSON-RPC) between the host and server.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Hierarchy&lt;/li&gt;&lt;ul&gt;&lt;li&gt;MCP Host: A single Host can contain multiple Clients.&lt;/li&gt;&lt;li&gt;MCP Client: A Client is a subsidiary of the Host.&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;The &quot;Restaurant&quot; Analogy&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To make it simpler, imagine a restaurant setting:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;The Host is the Executive Chef: They decide what needs to be cooked and oversee everything, but they don&#39;t leave the kitchen to buy ingredients.&lt;/li&gt;&lt;li&gt;The Client is the Waiter: They take the Chef&#39;s specific order, run to the source (the Server), and bring back exactly what was requested in a format the Chef can use.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Why the distinction matters&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;While you will often hear people refer to applications like Claude Desktop as &quot;the client,&quot; technically they are hosts. This architecture allows one app to connect to many different data sources (like Google Drive, Slack, and local files) simultaneously by instantiating a separate client for each one.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;What is a MCP Client in Claude Desktop?&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;In Claude Desktop, the MCP client is the internal software layer that allows the app to &quot;talk&quot; to the tools you&#39;ve added. While you might call the whole app &quot;the client,&quot; it actually functions as a host that manages multiple individual client connections.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;How it works in Claude Desktop&lt;/span&gt;&lt;/h4&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;The Translator: When you ask Claude to &quot;read a file,&quot; the client translates that human request into a technical JSON-RPC message that the Filesystem server understands.&lt;/li&gt;&lt;li&gt;The Connection Manager: Claude Desktop can run several clients at once. For example, one client might be connected to a GitHub server while another is connected to a Google Drive server.&lt;/li&gt;&lt;li&gt;Permission Gatekeeper: The client facilitates the security handshake. Before a tool executes, the client triggers the UI popup in Claude Desktop asking for your explicit permission.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;How to see them&lt;/p&gt;&lt;div&gt;You can see your active MCP clients and their available tools by clicking the &quot;hammer&quot; or &quot;plug&quot; icon (the MCP server indicator) in the bottom-right corner of the chat input box.&amp;nbsp;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Configuration&lt;/p&gt;&lt;div&gt;Claude Desktop&#39;s clients are configured via a local JSON file (claude_desktop_config.json). This file tells the internal clients exactly how to launch and communicate with your servers.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Config File Location:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;macOS: ~/Library/Application Support/Claude/claude_desktop_config.json&lt;/li&gt;&lt;li&gt;Windows: %APPDATA%\Claude\claude_desktop_config.json&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;MCP Servers&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;Model Context Protocol (MCP) servers:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Lightweight programs that connect&amp;nbsp;&lt;b&gt;AI models&lt;/b&gt;&amp;nbsp;(like Claude or ChatGPT) to&lt;b&gt;&amp;nbsp;external data sources and tools&lt;/b&gt;, such as local files, databases, GitHub, or Slack&lt;/li&gt;&lt;li&gt;Provide a standardized interface, enabling AI agents to securely access, read, and manipulate&amp;nbsp;&lt;u&gt;data beyond their training sets&lt;/u&gt;.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Key Aspects of MCP Servers:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Functionality&lt;/b&gt;: They expose specific capabilities—resources, prompts, and tools—to AI applications.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Use Cases&lt;/b&gt;: Common implementations include file system access for documentation, database querying, and API interactions for services like GitHub or Google Tasks.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Security&lt;/b&gt;: They provide controlled, authorized access to local or remote resources, with user permission required for actions.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Architecture&lt;/b&gt;: As part of the Model Context Protocol, they act as the &quot;server&quot; in a client-server model, connecting to &quot;hosts&quot; like desktop apps.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Common MCP Server Examples:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Local File System&lt;/b&gt;: Allows AI to read, write, and organize local documents.&lt;/li&gt;&lt;li&gt;&lt;b&gt;GitHub/GitLab&lt;/b&gt;: Enables AI to manage repositories, create issues, and pull code.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Database/API Connectors&lt;/b&gt;: Connects AI to SQL databases, HubSpot CRM, or AWS services.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Developer Tools&lt;/b&gt;: Includes servers for Terraform, Angular CLI, and Home Assistant.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can build your own MCP server using Python or TypeScript, often utilizing tools like uv for environment setup.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.bojankomazec.com/feeds/5879915728250357660/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4912226416400969049/5879915728250357660' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/5879915728250357660'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/5879915728250357660'/><link rel='alternate' type='text/html' href='http://www.bojankomazec.com/2026/04/model-context-protocol-mcp.html' title='Model Context Protocol (MCP)'/><author><name>Bojan Komazec</name><uri>http://www.blogger.com/profile/05437236807206825832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8A60re2nD4AwHHSi7LJHj4v0mh7ZeoLzo28cm_iEfN3RTIDA4OyuCTEQL5vs7MR3f4xqW4zxWdYkl-iVA3JoMPWwP4HMsqPseSrtxThyphenhyphenZv7s_4lToQLXv14sFA_kX8HPBNxRP5b0-oJnAMJFx1recQJBziBHM_q78eZUTHLf2rwgn_SzS4gF18TSAevE/s72-w640-h468-c/Screenshot%202026-04-08%20at%2012.30.13.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4912226416400969049.post-8926137244429965471</id><published>2026-04-08T12:18:00.001+01:00</published><updated>2026-04-08T12:18:36.734+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Agentic AI"/><category scheme="http://www.blogger.com/atom/ns#" term="AI"/><category scheme="http://www.blogger.com/atom/ns#" term="AI Agents"/><category scheme="http://www.blogger.com/atom/ns#" term="DevOps"/><title type='text'>How to start using Agentic AI in DevOps and Platform Engineering</title><content type='html'>&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzEizcTut4CUALNC7kusHybE0C7j__caL5uqFdI1-Yy8MHt6_elpRkasMxJY4Liw-_N_o5vsOlutTtBFlyfDKJaO5YV0R60cmQpx6EuXzb5rwP70HSWfmUBkHKYf3-4CxB8r8lrV6SUT-NF54iQeCZiAa9jxcWU_2WXD-Gyxvhk7nGU0bO_SaLOBwLCrM/s2298/agentic_ai_in_devops_gemini.heic&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1856&quot; data-original-width=&quot;2298&quot; height=&quot;516&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzEizcTut4CUALNC7kusHybE0C7j__caL5uqFdI1-Yy8MHt6_elpRkasMxJY4Liw-_N_o5vsOlutTtBFlyfDKJaO5YV0R60cmQpx6EuXzb5rwP70HSWfmUBkHKYf3-4CxB8r8lrV6SUT-NF54iQeCZiAa9jxcWU_2WXD-Gyxvhk7nGU0bO_SaLOBwLCrM/w640-h516/agentic_ai_in_devops_gemini.heic&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;div&gt;The next frontier of DevOps and Platform Engineering is &lt;b&gt;Agentic AI&lt;/b&gt;. We need to learn how autonomous agents reason and adapt to reduce cognitive load and accelerate the SDLC as we want to move beyond simple automation to build self-optimizing ecosystems that scale with confidence, innovation, and enterprise governance. &lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We should be able to:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Explain the shift from automation to agentic AI and articulate what makes an AI system truly&lt;/li&gt;&lt;li&gt;“agentic”&lt;/li&gt;&lt;li&gt;Design agent-aware workflows in GitHub Actions, integrating LLMs with events, logs, APIs, and quality gates to create intelligent CI/CD pipelines&lt;/li&gt;&lt;li&gt;Build AI-powered diagnostic loops that ingest failure context, reason about root causes, and generate structured remediation proposals or self-healing fixes&lt;/li&gt;&lt;li&gt;Implement intelligent release decisions using multi-signal quality gates (test coverage, performance, security, cost) and generate auditable release rationale reports&lt;/li&gt;&lt;li&gt;Deploy our own end-to-end platform engineering agent, capable of diagnosing pipeline failures, evaluating release readiness, and autonomously opening a fix PR or escalating with structured context.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Learning while Doing&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Identify Platform engineering pain points and the AI opportunity&lt;/li&gt;&lt;ul&gt;&lt;li&gt;How can we get from static scripts and CI/CD automation to agentic AI&lt;/li&gt;&lt;li&gt;Make a comparison of manual vs. AI-driven diagnosis&lt;/li&gt;&lt;li&gt;Understand how platform engineering is evolving from static automation toward AI-driven systems that proactively diagnose and resolve operational issues&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Agentic AI fundamentals - how agents reason and act?&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Learn about core agent components (LLMs, memory, and tools)&lt;/li&gt;&lt;li&gt;Compare event-driven vs. polling architectures&lt;/li&gt;&lt;li&gt;Balance autonomous actions with human oversight&lt;/li&gt;&lt;li&gt;Understand how agentic systems combine reasoning, memory, and tools to perceive events, make decisions, and act within engineering workflows&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;How to setup the environment and create our first agentic workflow&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Set up an agentic runtime that responds to CI/CD events&lt;/li&gt;&lt;li&gt;Connect an AI agent to our pipeline&#39;s event stream and context&lt;/li&gt;&lt;li&gt;Trigger our first agent run and interpret its reasoning logs&lt;/li&gt;&lt;li&gt;Learn how to connect AI agents to CI/CD events and platform context to trigger automated reasoning and actions in real time&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;AI-powered diagnosis and remediation&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Compare manual vs. AI-driven incident diagnosis&amp;nbsp;&lt;/li&gt;&lt;li&gt;Build agents that read logs, reason about failures, and propose fixes&amp;nbsp;&lt;/li&gt;&lt;li&gt;Define escalation boundaries: when the agent self-heals vs. asks a human&lt;/li&gt;&lt;li&gt;Understand how AI agents analyze logs, diagnose failures, and determine whether to self-heal or escalate issues to humans&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Intelligent CI/CD &amp;amp; adaptive delivery&lt;/li&gt;&lt;ul&gt;&lt;li&gt;How to move beyond pass/fail pipelines to AI-driven release decision&lt;/li&gt;&lt;li&gt;Automate rollback decisions using AI quality gates&lt;/li&gt;&lt;li&gt;Query pipeline state and release history using natural language&lt;/li&gt;&lt;li&gt;How AI transforms CI/CD pipelines into adaptive systems that make context-aware release and rollback decisions&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Operational intelligence &amp;amp; conversational observability&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Replace complex dashboards with AI anomaly detection&lt;/li&gt;&lt;li&gt;Check platform health via chat interfaces&lt;/li&gt;&lt;li&gt;Shift from reactive alerts to predictive management&lt;/li&gt;&lt;li&gt;Understand how AI enables conversational access to platform health and detects anomalies to support proactive operations.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Multi-agent coordination &amp;amp; implementation strategy&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Architect multi-agent systems for our platform workflows&lt;/li&gt;&lt;li&gt;Handle agent conflicts, failures, and graceful degradation&amp;nbsp;&lt;/li&gt;&lt;li&gt;Design a phased enterprise rollout with guardrails and audit trails&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Build our platform engineering agent&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Learn how to design coordinated multi-agent systems that handle complex platform workflows with governance and reliability&lt;/li&gt;&lt;li&gt;Wire together diagnosis, quality gates, and observability into one agent pipeline&lt;/li&gt;&lt;li&gt;Implement self-healing PRs with confidence thresholds&lt;/li&gt;&lt;li&gt;Shift our role from platform operator to AI supervisor&lt;/li&gt;&lt;li&gt;Learn how to combine diagnosis, delivery intelligence, and observability into a unified agent that automates key platform workflows&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;---&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.bojankomazec.com/feeds/8926137244429965471/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4912226416400969049/8926137244429965471' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/8926137244429965471'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/8926137244429965471'/><link rel='alternate' type='text/html' href='http://www.bojankomazec.com/2026/04/how-to-start-using-agentic-ai-in-devops.html' title='How to start using Agentic AI in DevOps and Platform Engineering'/><author><name>Bojan Komazec</name><uri>http://www.blogger.com/profile/05437236807206825832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzEizcTut4CUALNC7kusHybE0C7j__caL5uqFdI1-Yy8MHt6_elpRkasMxJY4Liw-_N_o5vsOlutTtBFlyfDKJaO5YV0R60cmQpx6EuXzb5rwP70HSWfmUBkHKYf3-4CxB8r8lrV6SUT-NF54iQeCZiAa9jxcWU_2WXD-Gyxvhk7nGU0bO_SaLOBwLCrM/s72-w640-h516-c/agentic_ai_in_devops_gemini.heic" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4912226416400969049.post-622365749798614224</id><published>2026-04-02T11:08:00.006+01:00</published><updated>2026-04-02T11:22:40.371+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DevOps"/><category scheme="http://www.blogger.com/atom/ns#" term="Kubernetes"/><title type='text'>Kubernetes StatefulSet</title><content type='html'>&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEi8WwmUAx8p5XNQtaUg3CDEWtdFb70hoHgNBw3rxEbkiGpH-WPnvz0Ya09qE8B5a82wYui3oJ641ylIM-pXNUY6EV3C1uovGGLNe3oZ-LJQgWPS8HNi89nVLlTlCQRsniIwRaEsbxSAJq6rdmJap9mDX91dAYDb5UBicVZfrFk-hOrcwifBx8K36NVD3Nk&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;639&quot; data-original-width=&quot;638&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEi8WwmUAx8p5XNQtaUg3CDEWtdFb70hoHgNBw3rxEbkiGpH-WPnvz0Ya09qE8B5a82wYui3oJ641ylIM-pXNUY6EV3C1uovGGLNe3oZ-LJQgWPS8HNi89nVLlTlCQRsniIwRaEsbxSAJq6rdmJap9mDX91dAYDb5UBicVZfrFk-hOrcwifBx8K36NVD3Nk=w640-h640&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;In Kubernetes, a StatefulSet is a specialized workload API object designed to manage stateful applications. Unlike standard Deployments, where Pods are interchangeable &quot;cattle,&quot; StatefulSets treat Pods as unique &quot;pets&quot; with a persistent identity that is maintained even if they are rescheduled or restarted.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Key Features&lt;/h2&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;Stable Network Identity&lt;/b&gt;: Each Pod is assigned a unique, ordinal index (e.g., web-0, web-1) and a corresponding stable DNS name through a Headless Service.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Stable Storage&lt;/b&gt;: By using volumeClaimTemplates, each Pod is automatically paired with its own PersistentVolume. If a Pod dies, the replacement Pod with the same identity will automatically remount the same storage.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Ordered Deployment&lt;/b&gt;: Pods are created and scaled sequentially from 0 to N-1. Kubernetes ensures that the previous Pod is &quot;Running and Ready&quot; before starting the next one.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Ordered Termination&lt;/b&gt;: Scaling down or deleting the StatefulSet occurs in reverse order, starting from the highest ordinal (e.g., web-2 is deleted before web-1).&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;When to Use StatefulSets&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;StatefulSets are the standard choice for applications that require consistent data and unique identities, such as:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;Databases&lt;/b&gt;: Systems like MySQL, PostgreSQL, MongoDB, and Cassandra.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Distributed Systems&lt;/b&gt;: Tools like ZooKeeper, Kafka, and Elasticsearch that need a quorum or master election.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Clustered Applications&lt;/b&gt;: Any software where instances need to know each other’s specific addresses to sync data.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Comparison: StatefulSet vs. Deployment&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Feature &lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; StatefulSet&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Deployment&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;----------&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;--------------&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;---------------&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Pod Identity:&lt;/b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;Unique and stable (ordinal names)&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Randomly generated and ephemeral&lt;/div&gt;&lt;div&gt;&lt;b&gt;Storage:&lt;/b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dedicated volume per Pod (via template)&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;Typically shared or transient&lt;/div&gt;&lt;div&gt;&lt;b&gt;Network:&lt;/b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;Fixed DNS per Pod (via Headless Service)&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;Single Load Balancer for the whole set&lt;/div&gt;&lt;div&gt;&lt;b&gt;Scaling:&lt;/b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Sequential (0, then 1, then 2...)&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Parallel (multiple Pods at once)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Best Practices&lt;/h2&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;Use Headless Services&lt;/b&gt;: Always pair our StatefulSet with a Service that has &lt;b&gt;clusterIP: None&lt;/b&gt; to ensure Pods are individually addressable.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Persistent Storage&lt;/b&gt;: Ensure our StorageClass is correctly configured for dynamic provisioning so that each Pod gets its own disk automatically.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Manual Data Sync&lt;/b&gt;: Note that while Kubernetes manages the infrastructure, we are still responsible for configuring internal application logic like data replication or master/slave sync.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;YAML manifest example for a basic MySQL StatefulSet&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Below is a standard YAML manifest for a MySQL StatefulSet. It includes a Headless Service for network identity and a volumeClaimTemplate to automatically provision unique storage for each replica.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;apiVersion: v1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kind: &lt;b&gt;Service&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;metadata:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; name: mysql&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; labels:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; app: mysql&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; ports:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; - port: 3306&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; name: mysql&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &lt;b&gt;clusterIP: None&lt;/b&gt; # Defines this as a &lt;b&gt;Headless Service&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; selector:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; app: mysql&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;---&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;apiVersion: apps/v1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kind: &lt;b&gt;StatefulSet&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;metadata:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; name: mysql&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; selector:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; matchLabels:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; app: mysql&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; serviceName: &quot;mysql&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; replicas: 3&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; template:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; metadata:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; labels:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; app: mysql&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; containers:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; - name: mysql&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; image: mysql:8.0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; env:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - name: MYSQL_ROOT_PASSWORD&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value: &quot;password&quot; # Use Secrets in production!&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ports:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - containerPort: 3306&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; name: mysql&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; volumeMounts:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - name: mysql-data&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mountPath: /var/lib/mysql&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &lt;b&gt;volumeClaimTemplates&lt;/b&gt;:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; - metadata:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; name: mysql-data&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; accessModes: [ &quot;ReadWriteOnce&quot; ]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; resources:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; requests:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; storage: 1Gi&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Why this works:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;Stable DNS&lt;/b&gt;: Each Pod gets a predictable name: mysql-0.mysql, mysql-1.mysql, etc.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Unique Storage&lt;/b&gt;: Kubernetes creates three separate PersistentVolumeClaims. mysql-0 will always mount the first disk, even after a reboot.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Ordered Startup&lt;/b&gt;: Pods launch one after another (0, then 1, then 2), which is critical for forming database clusters.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To use a Kubernetes Secret (like mysql-secret) instead of hardcoding passwords, we need to create a Secret object and then reference it in our StatefulSet. This is the standard practice for distributing credentials securely in Kubernetes.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;1. Create the Secret&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We can define our password in a YAML file. Note that values in the data field must be base64 encoded.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;apiVersion: v1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kind: Secret&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;metadata:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; name: mysql-secret&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;type: Opaque&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;data:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; # &#39;password&#39; encoded in base64 is &#39;cGFzc3dvcmQ=&#39;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; root-password: cGFzc3dvcmQ=&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Alternatively, we can use stringData to provide the password in plain text; Kubernetes will handle the encoding for us when we apply it:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;apiVersion: v1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kind: Secret&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;metadata:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; name: mysql-secret&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;type: Opaque&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;stringData:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; root-password: &quot;our-secure-password&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;2. Update the StatefulSet&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Modify the env section of our MySQL container to use valueFrom and secretKeyRef. This tells the Pod to pull the value of MYSQL_ROOT_PASSWORD from the secret we just created.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;containers:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; - name: mysql&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; image: mysql:8.0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; env:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - name: MYSQL_ROOT_PASSWORD&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; valueFrom:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; secretKeyRef:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; name: mysql-secret&amp;nbsp; &amp;nbsp;# Name of our Secret object&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; key: root-password&amp;nbsp; &amp;nbsp;# The specific key inside the Secret&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Key Considerations&lt;/h4&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Initialization Only: For MySQL, the MYSQL_ROOT_PASSWORD environment variable is typically only used during the first-time initialization of the data directory. Changing the Secret later will not automatically update the root password in an existing database.&lt;/li&gt;&lt;li&gt;Security: Ensure our cluster has encryption at rest enabled for Secrets to truly protect sensitive data.&lt;/li&gt;&lt;li&gt;Alternative for Multiple Variables: If we have many credentials (user, password, DB name), we can use envFrom to map all keys in a Secret to environment variables at once.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Changing Storage Spec&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Changing spec.volumeClaimTemplate updates the StatefulSet template but will not resize already-created PVCs. If the goal is to fix an existing CrashLoopBackOff due to disk-full, we still need to expand the current PVC(s) (and ensure the general StorageClass allows volume expansion), or recreate the PVC/StatefulSet so the new size takes effect.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;References:&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/&quot;&gt;StatefulSets | Kubernetes&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.bojankomazec.com/feeds/622365749798614224/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4912226416400969049/622365749798614224' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/622365749798614224'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/622365749798614224'/><link rel='alternate' type='text/html' href='http://www.bojankomazec.com/2026/04/kubernetes-statefulset.html' title='Kubernetes StatefulSet'/><author><name>Bojan Komazec</name><uri>http://www.blogger.com/profile/05437236807206825832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEi8WwmUAx8p5XNQtaUg3CDEWtdFb70hoHgNBw3rxEbkiGpH-WPnvz0Ya09qE8B5a82wYui3oJ641ylIM-pXNUY6EV3C1uovGGLNe3oZ-LJQgWPS8HNi89nVLlTlCQRsniIwRaEsbxSAJq6rdmJap9mDX91dAYDb5UBicVZfrFk-hOrcwifBx8K36NVD3Nk=s72-w640-h640-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4912226416400969049.post-4969955158946284640</id><published>2026-03-19T13:56:56.248+00:00</published><updated>2026-03-19T15:05:10.799+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AWS"/><category scheme="http://www.blogger.com/atom/ns#" term="AWS EBS"/><category scheme="http://www.blogger.com/atom/ns#" term="AWS EKS"/><category scheme="http://www.blogger.com/atom/ns#" term="Cloud Storage"/><category scheme="http://www.blogger.com/atom/ns#" term="DevOps"/><category scheme="http://www.blogger.com/atom/ns#" term="Kubernetes"/><title type='text'> Amazon EBS CSI Driver </title><content type='html'>&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUSoHhTkdMp-bDFAzL3ZsMkP5CQCufHkAtoqZ11WbkUIC1vmqr_Firvb1cXlfY5E_GWl69UF700wGpbYCbph90IOlmfZrRtwJ75EKGjAzhC8lDcBsLG3iMGFI5cO0RT2vXOTqMb2kd49PeS0DEnwwBgIeuPf_g2nmA-Ursgv-ClOPpJ3RysBu5E6y-eUg/s320/eks.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;320&quot; data-original-width=&quot;320&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUSoHhTkdMp-bDFAzL3ZsMkP5CQCufHkAtoqZ11WbkUIC1vmqr_Firvb1cXlfY5E_GWl69UF700wGpbYCbph90IOlmfZrRtwJ75EKGjAzhC8lDcBsLG3iMGFI5cO0RT2vXOTqMb2kd49PeS0DEnwwBgIeuPf_g2nmA-Ursgv-ClOPpJ3RysBu5E6y-eUg/s1600/eks.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div&gt;The Amazon EBS CSI Driver is a standard interface that allows Amazon Elastic Kubernetes Service (EKS) clusters to manage the full lifecycle of Amazon EBS volumes as persistent storage for containers. It replaces the older, deprecated &quot;in-tree&quot; Kubernetes storage plugin with a more flexible, decoupled model.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Key Features&lt;/h2&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Dynamic Provisioning: Automatically creates and attaches EBS volumes when a PersistentVolumeClaim (PVC) is made.&lt;/li&gt;&lt;li&gt;Volume Lifecycle Management: Handles the creation, attachment, mounting, and deletion of volumes.&lt;/li&gt;&lt;li&gt;Resizing &amp;amp; Snapshots: Supports online volume resizing (for gp3 and others) and taking volume snapshots for data backup.&lt;/li&gt;&lt;li&gt;EKS Auto Mode Support: In EKS Auto Mode, routine block storage tasks are automated, and you don&#39;t even need to manually install the driver.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Deployment Methods&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can install and manage the driver through several channels:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;EKS Managed Add-on (Recommended): Simplifies installation and updates via the AWS Console, CLI, or Terraform.&lt;/li&gt;&lt;li&gt;Helm Chart: Provides highly customizable installation options.&lt;/li&gt;&lt;li&gt;Kustomize: Direct deployment using manifests from the official GitHub repository.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Core Requirements&lt;/h2&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;IAM Permissions: The driver requires an IAM role with the AmazonEBSCSIDriverPolicy to interact with EBS resources.&lt;/li&gt;&lt;li&gt;Service Accounts: Typically uses IAM Roles for Service Accounts (IRSA) to securely provide AWS credentials to the driver pods.&lt;/li&gt;&lt;li&gt;Compatibility: Supports Linux and Windows worker nodes, as well as ARM64 architectures.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Driver Components&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The driver is typically deployed into the kube-system namespace and consists of two main parts:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Controller Deployment: Runs as a set of replicas (ebs-csi-controller) to communicate with the AWS EC2 API and manage volume operations.&lt;/li&gt;&lt;li&gt;Node DaemonSet: Runs on every worker node (ebs-csi-node) to handle the actual mounting and unmounting of volumes to pods on that specific host.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;In the Amazon EBS CSI driver architecture, the ebs-csi-controller and ebs-csi-node are the two primary components that work together to manage the lifecycle of EBS volumes in a Kubernetes cluster.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Core Feature Differences&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;ebs-csi-controller&lt;/h4&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Deployment Type:&amp;nbsp;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Deployment&lt;/b&gt; (typically 2 replicas for HA)&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Main Function:&amp;nbsp;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Control Plane operations: Creating, deleting, attaching, and detaching volumes&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;AWS Interaction:&amp;nbsp;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Calls the AWS EC2 API to manage EBS resources&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;IAM Permissions:&amp;nbsp;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Requires an IAM role with permissions like ec2:CreateVolume and ec2:AttachVolume&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;ebs-csi-node&lt;/h4&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Deployment Type:&amp;nbsp;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;DaemonSet (runs on every worker node)&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Main Function:&amp;nbsp;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Node-level operations: Mounting and unmounting volumes to the local filesystem&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;AWS Interaction:&amp;nbsp;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Interacts with the local OS (privileged system calls) to handle block devices&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;IAM Permissions:&amp;nbsp;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Generally requires fewer/no AWS API permissions, as it mostly performs local mount actions&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;How They Work Together&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Provisioning &amp;amp; Attachment: When you create a PersistentVolumeClaim (PVC), the ebs-csi-controller watches the request and calls the AWS API to create the EBS volume and attach it to the correct EC2 instance.&lt;/li&gt;&lt;li&gt;Mounting: Once the volume is physically attached to the EC2 instance, the ebs-csi-node pod running on that specific node detects the new block device and mounts it into the container’s path so your application can use it.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Key Considerations&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Security: For better security, you can schedule the ebs-csi-controller on hardened management nodes, while the ebs-csi-node must run everywhere your workloads need storage.&lt;/li&gt;&lt;li&gt;Fargate: You can run the controller on Fargate nodes, but the ebs-csi-node (as a DaemonSet) only runs on EC2 instances.&lt;/li&gt;&lt;li&gt;Troubleshooting: If a volume fails to &quot;attach,&quot; check the controller logs; if it fails to &quot;mount&quot; or &quot;format,&quot; check the node logs.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Pods for both the ebs-csi-controller and ebs-csi-node typically share the same value for the app.kubernetes.io/name label.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In standard deployments (such as via the official Helm chart or EKS add-on), both components use this label to identify that they belong to the same overarching application: the Amazon EBS CSI Driver.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Label Comparisons&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;While they share the same application name, they use the app.kubernetes.io/component label to distinguish between their specific roles.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;Label Key &lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ebs-csi-controller Pods&amp;nbsp; &amp;nbsp; &amp;nbsp;ebs-csi-node Pods&lt;/b&gt;&lt;/div&gt;&lt;div&gt;------------&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ------------------------------&amp;nbsp; &amp;nbsp; ----------------------&lt;/div&gt;&lt;div&gt;app.kubernetes.io/name&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; aws-ebs-csi-driver&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; aws-ebs-csi-driver&lt;/div&gt;&lt;div&gt;app.kubernetes.io/instance&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; aws-ebs-csi-driver&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; aws-ebs-csi-driver&lt;/div&gt;&lt;div&gt;app.kubernetes.io/component&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; csi-driver (or controller)&amp;nbsp; &amp;nbsp; &amp;nbsp;csi-driver (or node)&lt;/div&gt;&lt;div&gt;app (Legacy label)&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ebs-csi-controller&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ebs-csi-node&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;How to Verify in Your Cluster&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can check these labels yourself using kubectl. This is useful if you are writing Prometheus rules or network policies that need to target the entire driver or just one part of it.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To see labels for all EBS CSI pods:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl get pods -n kube-system -l app.kubernetes.io/name=aws-ebs-csi-driver --show-labels&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To target only the controller:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl get pods -n kube-system -l app=ebs-csi-controller&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;---&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.bojankomazec.com/feeds/4969955158946284640/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4912226416400969049/4969955158946284640' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/4969955158946284640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/4969955158946284640'/><link rel='alternate' type='text/html' href='http://www.bojankomazec.com/2026/03/amazon-ebs-csi-driver.html' title=' Amazon EBS CSI Driver '/><author><name>Bojan Komazec</name><uri>http://www.blogger.com/profile/05437236807206825832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUSoHhTkdMp-bDFAzL3ZsMkP5CQCufHkAtoqZ11WbkUIC1vmqr_Firvb1cXlfY5E_GWl69UF700wGpbYCbph90IOlmfZrRtwJ75EKGjAzhC8lDcBsLG3iMGFI5cO0RT2vXOTqMb2kd49PeS0DEnwwBgIeuPf_g2nmA-Ursgv-ClOPpJ3RysBu5E6y-eUg/s72-c/eks.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4912226416400969049.post-3971438138599901568</id><published>2026-03-19T10:37:52.290+00:00</published><updated>2026-03-19T10:37:52.291+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DevOps"/><category scheme="http://www.blogger.com/atom/ns#" term="Monitoring"/><category scheme="http://www.blogger.com/atom/ns#" term="Observability"/><title type='text'>Monitoring and Observability</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgABnRMS8MEYULk3ZzfCFcQTMLdhmorAk7-EaraXAGQuxBCPPy-uEUhx_tNpsnKY0idB6o-zJe-xIGYl8v9_SPcwwRmkz7cK57pdbhVsd2JNz4eanhuHEzb88i3HceUGD2agH9fGqlXOqST2FVefC41THvmMRV2xks0JrJ7H3dLnWDMjCYK9rUTT6qDT3M/s612/magnifier-612x612.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;612&quot; data-original-width=&quot;612&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgABnRMS8MEYULk3ZzfCFcQTMLdhmorAk7-EaraXAGQuxBCPPy-uEUhx_tNpsnKY0idB6o-zJe-xIGYl8v9_SPcwwRmkz7cK57pdbhVsd2JNz4eanhuHEzb88i3HceUGD2agH9fGqlXOqST2FVefC41THvmMRV2xks0JrJ7H3dLnWDMjCYK9rUTT6qDT3M/w640-h640/magnifier-612x612.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;h2 style=&quot;clear: both; text-align: left;&quot;&gt;Monitoring vs Observability&lt;/h2&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;In the world of IT and DevOps, monitoring and observability are two related but distinct concepts used to manage system health and performance.&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;clear: both; text-align: left;&quot;&gt;Core Difference&lt;/h4&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;The simplest way to distinguish them is:&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Monitoring tells you what is happening (and when). It is reactive and focuses on known problems using predefined metrics.&lt;/li&gt;&lt;li&gt;Observability tells you why it is happening. It is proactive and uses the system&#39;s outputs to understand its internal state, especially for &quot;unknown unknowns&quot;.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;clear: both; text-align: left;&quot;&gt;Key Comparison Table&lt;/h4&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;b&gt;Feature &lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Monitoring&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Observability&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;----------&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;---------------&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -----------------&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;Purpose&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Detect known issues&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;Diagnose root causes&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;Perspective&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;External (symptoms)&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;Internal (system state)&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;Question&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;Is the system healthy?&quot;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&quot;Why is it behaving this way?&quot;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;Approach&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;Reactive&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Proactive&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;Focus&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;Known knowns&quot;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;Unknown unknowns&quot;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;Data Types&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;Metrics, logs&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Metrics, logs, and traces&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;clear: both; text-align: left;&quot;&gt;Analogy: The Car&lt;/h4&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Monitoring is your dashboard. It has dials for speed and fuel, and a &quot;check engine&quot; light. It tells you if you are speeding or if something is broken.&lt;/li&gt;&lt;li&gt;Observability is the mechanic’s diagnostic tool. When the &quot;check engine&quot; light comes on, the mechanic plugs in a tool to see exactly which sensor failed and why, without having to take the entire engine apart.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;clear: both; text-align: left;&quot;&gt;Common Tools&lt;/h3&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Monitoring Tools: Nagios, Zabbix, &lt;b&gt;Prometheus&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;Observability Platforms: Datadog, New Relic, Honeycomb, Dynatrace.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;clear: both; text-align: left;&quot;&gt;Three Pillars of Observability&lt;/h2&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;The three pillars of observability—metrics, logs, and traces—are essential &lt;u&gt;telemetry data types &lt;/u&gt;used to understand the internal state of complex, distributed systems. They enable teams to detect, investigate, and resolve performance issues by providing high-level trends, granular event details, and full request-flow paths.&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;clear: both; text-align: left;&quot;&gt;Metrics&lt;/h3&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;Quantitative measurements over time (e.g., CPU usage, error rates).&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;Numerical measurements that describe the health, performance, and behavior of a system over time (e.g., CPU usage, error rates, throughput). They are ideal for alerting, capacity planning, and spotting trends or symptoms.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;clear: both; text-align: left;&quot;&gt;Logs&lt;/h3&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;Granular, timestamped records of discrete events.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;Timestamped, granular records of discrete events. They provide the detailed context (text or structured data) necessary to understand exactly what happened within an application or service.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;clear: both; text-align: left;&quot;&gt;Traces&lt;/h3&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;End-to-end journeys of a single request through a distributed system, showing how different&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;Records showing the journey of a single request as it travels through a distributed system, encompassing multiple services. They are critical for pinpointing bottlenecks, latency, or failures in microservices architectures.&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;clear: both; text-align: left;&quot;&gt;Why They Are Used Together&lt;/h3&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;While metrics indicate that a problem exists, logs provide the context of why it happened, and traces show where it is occurring. Correlating these three data types provides actionable insights rather than just raw data.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;---&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.bojankomazec.com/feeds/3971438138599901568/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4912226416400969049/3971438138599901568' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/3971438138599901568'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/3971438138599901568'/><link rel='alternate' type='text/html' href='http://www.bojankomazec.com/2026/03/monitoring-and-observability.html' title='Monitoring and Observability'/><author><name>Bojan Komazec</name><uri>http://www.blogger.com/profile/05437236807206825832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgABnRMS8MEYULk3ZzfCFcQTMLdhmorAk7-EaraXAGQuxBCPPy-uEUhx_tNpsnKY0idB6o-zJe-xIGYl8v9_SPcwwRmkz7cK57pdbhVsd2JNz4eanhuHEzb88i3HceUGD2agH9fGqlXOqST2FVefC41THvmMRV2xks0JrJ7H3dLnWDMjCYK9rUTT6qDT3M/s72-w640-h640-c/magnifier-612x612.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4912226416400969049.post-3852292873815390165</id><published>2026-03-16T17:29:00.001+00:00</published><updated>2026-03-16T18:02:39.956+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DevOps"/><category scheme="http://www.blogger.com/atom/ns#" term="Kubernetes"/><category scheme="http://www.blogger.com/atom/ns#" term="System Architecture"/><title type='text'>How to architecture highly available and fault tolerant AWS EKS Kubernetes cluster</title><content type='html'>&lt;div style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEi8WwmUAx8p5XNQtaUg3CDEWtdFb70hoHgNBw3rxEbkiGpH-WPnvz0Ya09qE8B5a82wYui3oJ641ylIM-pXNUY6EV3C1uovGGLNe3oZ-LJQgWPS8HNi89nVLlTlCQRsniIwRaEsbxSAJq6rdmJap9mDX91dAYDb5UBicVZfrFk-hOrcwifBx8K36NVD3Nk&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;639&quot; data-original-width=&quot;638&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEi8WwmUAx8p5XNQtaUg3CDEWtdFb70hoHgNBw3rxEbkiGpH-WPnvz0Ya09qE8B5a82wYui3oJ641ylIM-pXNUY6EV3C1uovGGLNe3oZ-LJQgWPS8HNi89nVLlTlCQRsniIwRaEsbxSAJq6rdmJap9mDX91dAYDb5UBicVZfrFk-hOrcwifBx8K36NVD3Nk=w640-h640&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;We should follow a layered approach—from the network up to the application.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;The &quot;Highly Available EKS&quot; Design Framework&lt;/h3&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;1. Networking &amp;amp; Control Plane (The Foundation)&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;Multi-AZ VPC&lt;/b&gt;:&amp;nbsp;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Design a VPC with&lt;u&gt; at least 3 Private Subnets across 3 different Availability Zones (AZs)&lt;/u&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;EKS Endpoint (API server endpoint) Access&lt;/b&gt;:&amp;nbsp;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Enable &quot;Private Access&quot; for the EKS control plane so &lt;u&gt;worker nodes communicate with API sever within the VPC, reducing exposure and latency&lt;/u&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9T7si_mhhqroPKODQQuv-UQ_bY0TYFJHTfY4OKV8EjdER9FhWxnXJAuS4pISShsAKflmll3wAhMmVNXPrmqDMtNr-7aMvVHznQPaBGelrrwsPXiTSA1w06Xc9SoyVKM5iA8Xw19GwQdtsbZEcpL8oQt3E0IJM5qPFp_q_TGTwmOGl2i6iR7dyA6bHOp4/s630/Screenshot%202026-03-16%20at%2017.46.53.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;206&quot; data-original-width=&quot;630&quot; height=&quot;210&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9T7si_mhhqroPKODQQuv-UQ_bY0TYFJHTfY4OKV8EjdER9FhWxnXJAuS4pISShsAKflmll3wAhMmVNXPrmqDMtNr-7aMvVHznQPaBGelrrwsPXiTSA1w06Xc9SoyVKM5iA8Xw19GwQdtsbZEcpL8oQt3E0IJM5qPFp_q_TGTwmOGl2i6iR7dyA6bHOp4/w640-h210/Screenshot%202026-03-16%20at%2017.46.53.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;NAT Gateways&lt;/b&gt;:&amp;nbsp;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Use &lt;u&gt;one NAT Gateway per AZ &lt;/u&gt;(3 total) to ensure that if one AZ fails, the nodes in other zones still have outbound internet access for image pulls. This means that we need to have 3 public subnets, one per each AZ.&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;span&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;To use a NAT Gateway, you must place it in a public subnet (a subnet with a route to an Internet Gateway). If your goal is to have one NAT Gateway per Availability Zone (AZ) for high availability, you need a corresponding public subnet in each of those three AZs to host them.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Why this structure is necessary&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The architecture follows a specific &quot;dependency chain&quot; to ensure that an issue in one data center doesn&#39;t take down your entire outbound connectivity:&lt;/div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;AZ Independence&lt;/b&gt;: NAT Gateways are zone-redundant by design, but they physically reside in a specific AZ. If AZ-a goes down, the NAT Gateway inside it goes down too.&lt;/li&gt;&lt;li&gt;&lt;b&gt;The Public Subnet Requirement&lt;/b&gt;: A NAT Gateway needs a Public IP (EIP) and a route to the Internet Gateway (IGW). Only subnets configured as &quot;public&quot; can provide this.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Cross-Zone Resilience&lt;/b&gt;: By having three public subnets (one in each AZ), you can place a NAT Gateway in each. Then, you point the private subnets in AZ-a to the NAT Gateway in AZ-a, the private subnets in AZ-b to the one in AZ-b, and so on.&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The Standard Setup&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you are following the recommendation for a 3-AZ deployment, your VPC structure will typically look like this:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Component&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AZ-1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AZ-2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AZ-3&lt;/b&gt;&lt;/div&gt;&lt;div&gt;-----------------&amp;nbsp; &amp;nbsp;----------------------&amp;nbsp; &amp;nbsp;---------------------&amp;nbsp; &amp;nbsp; ---------------------&lt;/div&gt;&lt;div&gt;Public Subnet&amp;nbsp; &amp;nbsp;Subnet-Pub-1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Subnet-Pub-2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Subnet-Pub-3&lt;/div&gt;&lt;div&gt;NAT Gateway&amp;nbsp; &amp;nbsp;NAT-GW-1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NAT-GW-2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NAT-GW-3&lt;/div&gt;&lt;div&gt;Private Subnet&amp;nbsp; &amp;nbsp;Nodes/Workloads&amp;nbsp; &amp;nbsp;Nodes/Workloads&amp;nbsp; &amp;nbsp;Nodes/Workloads&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Note on Cost:&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;While this is the &quot;Gold Standard&quot; for reliability (preventing &quot;cross-zone data charges&quot; and ensuring 100% uptime during an AZ failure), keep in mind that AWS charges per hour for each NAT Gateway. Running three of them is significantly more expensive than running one.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;A Common Misconception&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You could technically have 3 private subnets and only 1 public subnet (with 1 NAT Gateway). In that case, all nodes in all 3 AZs would send their traffic to that single NAT Gateway.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The Risk: If the AZ containing that lone NAT Gateway fails, your nodes in the other two healthy AZs will lose their ability to pull images or talk to the internet, effectively &quot;breaking&quot; your cluster even though the nodes themselves are fine.&lt;/div&gt;&lt;span&gt;&lt;!--more--&gt;&lt;/span&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;2. Compute &amp;amp; Data Plane (The Muscle)&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;Managed Node Groups&lt;/b&gt;:&amp;nbsp;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Node groups implement basic compute scaling through EC2 Auto Scaling groups.&lt;/li&gt;&lt;li&gt;Use EKS Managed Node Groups spread across those 3 subnets.&amp;nbsp;Select multiple subnets for a node group to &lt;u&gt;provision nodes across multiple Availability Zones&lt;/u&gt;.&lt;/li&gt;&lt;li&gt;Amazon EKS managed node groups make it easy to provision compute capacity for your cluster. managed node groups consist of one or more Amazon EC2 instances running the latest EKS-optimized AMIs. All nodes are provisioned as part of an Amazon EC2 Auto Scaling group that is managed for you by Amazon EKS and all resources including EC2 instances and autoscaling groups run within your AWS account.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;Auto Scaling Groups (ASG)&lt;/b&gt;:&amp;nbsp;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;u&gt;Set the &lt;span style=&quot;font-family: courier;&quot;&gt;min_size&lt;/span&gt; to 3&lt;/u&gt;. This ensures that &lt;u&gt;even if a node fails, the ASG replaces it immediately.&lt;/u&gt;&amp;nbsp;&lt;/li&gt;&lt;li&gt;This is NOT Kubernetes Cluster Autoscaler (or Karpenter), which, if we want to use it, needs to be installed separately.&amp;nbsp;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;CAS and ASG both control same node groups and can get in conflict. Solution: disable scaling policies on the ASG so CAS takes control&lt;/li&gt;&lt;li&gt;Karpenter and ASG might get in conflict only if they control the same nodes. But in a well-architected EKS cluster, we usually have two different &quot;families&quot; of nodes:&amp;nbsp;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;static: for&amp;nbsp;small, fixed-size Managed Node Group&amp;nbsp;To run &quot;System&quot; pods (CoreDNS, CNI, Karpenter itself)&lt;/li&gt;&lt;li&gt;dynamic: Karpenter-managed node group which runs actual workload, with dynamic number of nodes, depending on the current usage&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;Instance Diversity&lt;/b&gt;:&amp;nbsp;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Mention using multiple instance types (e.g., m5.large and m6g.large) to avoid &quot;insufficient capacity&quot; errors in a specific AWS zone.&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;3. Traffic Management (The Entry Point)&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;AWS Load Balancer Controller&lt;/b&gt;:&amp;nbsp;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Use the &lt;span style=&quot;font-family: courier;&quot;&gt;aws-load-balancer-controller&lt;/span&gt; to provision an &lt;b&gt;Application Load Balancer (ALB)&lt;/b&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;Cross-Zone Load Balancing&lt;/b&gt;:&amp;nbsp;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Ensure this is enabled so the ALB can &lt;u&gt;route traffic to healthy pods in any AZ&lt;/u&gt;, even if the &quot;local&quot; node in its own zone is struggling.&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;4. Pod-Level Availability (The Brains)&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;Pod Anti-Affinity&lt;/b&gt;:&amp;nbsp;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;To ensure replicas don&#39;t land on the same node.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;Topology Spread Constraints&lt;/b&gt;:&amp;nbsp;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;To force an equal distribution of pods across the 3 AZs.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;Pod Disruption Budgets (PDB)&lt;/b&gt;:&amp;nbsp;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;To prevent the Cluster Autoscaler or AWS maintenance from taking down too many replicas at once.&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;3 Pillars of High Availability&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Component:&amp;nbsp;&lt;b&gt;Multi-AZ ASG&lt;/b&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Layer: Infrastructure&lt;/li&gt;&lt;li&gt;Goal: Survive an entire AWS Data Center outage.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Component:&amp;nbsp;&lt;b&gt;PDBs &amp;amp; Rollouts&lt;/b&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Layer: Orchestration&lt;/li&gt;&lt;li&gt;Goal: Survive maintenance and human error (updates).&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Component:&amp;nbsp;&lt;b&gt;Spread Constraints&lt;/b&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Layer: Application&lt;/li&gt;&lt;li&gt;Goal: Survive individual EC2 instance crashes.&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;---&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.bojankomazec.com/feeds/3852292873815390165/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4912226416400969049/3852292873815390165' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/3852292873815390165'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/3852292873815390165'/><link rel='alternate' type='text/html' href='http://www.bojankomazec.com/2026/03/how-to-architecture-highly-available.html' title='How to architecture highly available and fault tolerant AWS EKS Kubernetes cluster'/><author><name>Bojan Komazec</name><uri>http://www.blogger.com/profile/05437236807206825832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEi8WwmUAx8p5XNQtaUg3CDEWtdFb70hoHgNBw3rxEbkiGpH-WPnvz0Ya09qE8B5a82wYui3oJ641ylIM-pXNUY6EV3C1uovGGLNe3oZ-LJQgWPS8HNi89nVLlTlCQRsniIwRaEsbxSAJq6rdmJap9mDX91dAYDb5UBicVZfrFk-hOrcwifBx8K36NVD3Nk=s72-w640-h640-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4912226416400969049.post-483828855240935203</id><published>2026-03-09T18:24:00.132+00:00</published><updated>2026-03-15T19:37:56.620+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DevOps"/><category scheme="http://www.blogger.com/atom/ns#" term="Kubernetes"/><title type='text'>Application Pod Disruption Budget (PDB) in Kubernetes</title><content type='html'>&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEi8WwmUAx8p5XNQtaUg3CDEWtdFb70hoHgNBw3rxEbkiGpH-WPnvz0Ya09qE8B5a82wYui3oJ641ylIM-pXNUY6EV3C1uovGGLNe3oZ-LJQgWPS8HNi89nVLlTlCQRsniIwRaEsbxSAJq6rdmJap9mDX91dAYDb5UBicVZfrFk-hOrcwifBx8K36NVD3Nk&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;639&quot; data-original-width=&quot;638&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEi8WwmUAx8p5XNQtaUg3CDEWtdFb70hoHgNBw3rxEbkiGpH-WPnvz0Ya09qE8B5a82wYui3oJ641ylIM-pXNUY6EV3C1uovGGLNe3oZ-LJQgWPS8HNi89nVLlTlCQRsniIwRaEsbxSAJq6rdmJap9mDX91dAYDb5UBicVZfrFk-hOrcwifBx8K36NVD3Nk=w640-h640&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;A &lt;b&gt;Pod Disruption Budget (PDB)&lt;/b&gt; in Kubernetes:&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;It&#39;s an API object&lt;/li&gt;&lt;li&gt;Sets for an &lt;u&gt;application&lt;/u&gt; deployed in cluster:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Either&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Minimum number of pods an application needs to function smoothly...&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Or&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Maximum number of replicated pods that are down simultaneously...&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;...during &lt;b&gt;voluntary disruptions &lt;/b&gt;(e.g., node upgrades, maintenance, draining)&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Ensures &lt;u&gt;high availability&lt;/u&gt; by guaranteeing a minimum number or percentage of pods remain active.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Key Aspects of PDBs:&lt;/h2&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;In general, disruptions can be:&lt;/div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b style=&quot;font-weight: bold;&quot;&gt;voluntary&lt;/b&gt;, such as maintenance operations or node scaling, or&lt;/li&gt;&lt;li&gt;&lt;b style=&quot;font-weight: bold;&quot;&gt;involuntary&lt;/b&gt;, such as hardware failures or system crashes&lt;/li&gt;&lt;/ul&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Voluntary Focus&lt;/b&gt;: &lt;u&gt;PDBs only protect against voluntary disruptions&lt;/u&gt;, such as kubectl drain or node repairs, not against involuntary, unavoidable failures.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;b&gt;Configuration&lt;/b&gt;: You define a PDB using either&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;u&gt;either&lt;/u&gt; &lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;b&gt;minAvailable&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;minimum pods that must run&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;u&gt;or&lt;/u&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt; &lt;b&gt;maxUnavailable&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;maximum pods allowed to be down&lt;/li&gt;&lt;li&gt;PDB configuration setting defining the maximum number of pods that can be voluntarily taken down simultaneously.&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;b&gt;Use Case&lt;/b&gt;: Ideal for quorum-based applications (e.g., Elasticsearch, Zookeeper) to ensure quorum is never lost during node maintenance.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;b&gt;Mechanism&lt;/b&gt;: When a cluster administrator drains a node, the system checks the PDB. If removing a pod violates the budget, the action is delayed until enough replicas are available elsewhere.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Example PDB Configuration:&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;apiVersion: policy/v1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kind: PodDisruptionBudget&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;metadata:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; name: web-pdb&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &lt;b&gt;minAvailable&lt;/b&gt;: 2 &lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;# At least 2 pods must remain running&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; selector:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;b&gt;matchLabels&lt;/b&gt;:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; app: web-app&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Name is usually set to refer to the application for which PDB is created (&quot;web&quot; in the example above).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Best Practice:&amp;nbsp;&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Use PDBs in conjunction with pod anti-affinity rules to ensure pods are spread across nodes.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;How to check PDB in cluster?&lt;/h2&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Example:&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% &lt;b&gt;kubectl get pdb -A&amp;nbsp;&lt;/b&gt; &lt;/span&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;NAMESPACE&amp;nbsp; &amp;nbsp; &amp;nbsp;NAME&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;MIN AVAILABLE&amp;nbsp; &amp;nbsp;MAX UNAVAILABLE&amp;nbsp; &amp;nbsp;ALLOWED DISRUPTIONS&amp;nbsp;&lt;/b&gt; &amp;nbsp;AGE&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;clickhouse&amp;nbsp; &amp;nbsp; chi-clickhouse-ch&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;N/A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;132d&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;kube-system&amp;nbsp; &amp;nbsp;ws-cluster-autoscaler&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;N/A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;133d&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;kube-system&amp;nbsp; &amp;nbsp;coredns&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;N/A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;140d&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;kube-system&amp;nbsp; &amp;nbsp;ebs-csi-controller&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; N/A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;140d&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;kube-system&amp;nbsp; &amp;nbsp;karpenter&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;N/A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;139d&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;b&gt;ALLOWED DISRUPTIONS:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;dynamic value, constantly re-calculated by the&amp;nbsp;&lt;b&gt;disruption controller&lt;/b&gt;&lt;/li&gt;&lt;li&gt;the real-time status indicator&amp;nbsp;&lt;/li&gt;&lt;li&gt;showing how many pods can currently be evicted without violating the set&amp;nbsp;&lt;b&gt;maxUnavailable&lt;/b&gt;&amp;nbsp;or&amp;nbsp;&lt;b&gt;minAvailable&lt;/b&gt;&amp;nbsp;constraints&lt;/li&gt;&lt;li&gt;The non-zero value means that the disruption controller has seen the pods, counted the matching pods, and updated the status of the PDB&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To see the number of current and desired healthy pods (and how &lt;span style=&quot;font-family: courier;&quot;&gt;ALLOWED DISRUPTIONS&lt;/span&gt; is actually calculated) run this command (in the example below it was for &lt;span style=&quot;font-family: courier;&quot;&gt;karpenter&lt;/span&gt; application):&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% &lt;b&gt;kubectl get poddisruptionbudgets karpenter -n kube-system -o yaml&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;apiVersion: policy/v1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kind: PodDisruptionBudget&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;metadata:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; annotations:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; meta.helm.sh/release-name: karpenter&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; meta.helm.sh/release-namespace: kube-system&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; creationTimestamp: &quot;2025-10-21T14:05:33Z&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; generation: 1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; labels:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; app.kubernetes.io/instance: karpenter&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; app.kubernetes.io/managed-by: Helm&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; app.kubernetes.io/name: karpenter&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; app.kubernetes.io/version: 1.3.2&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; helm.sh/chart: karpenter-1.3.2&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; name: karpenter&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; namespace: kube-system&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; resourceVersion: &quot;2664456&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; uid: 2b58340a-fd07-4567-95a9-2a43b5dd4bca&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; maxUnavailable: 1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; selector:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; matchLabels:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; app.kubernetes.io/instance: karpenter&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; app.kubernetes.io/name: karpenter&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;status:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; conditions:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; - lastTransitionTime: &quot;2025-10-27T10:52:01Z&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; message: &quot;&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; observedGeneration: 1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; reason: SufficientPods&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; status: &quot;True&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; type: DisruptionAllowed&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;b&gt;&amp;nbsp; currentHealthy: 2&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;b&gt;&amp;nbsp; desiredHealthy: 1&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;b&gt;&amp;nbsp; disruptionsAllowed: 1&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;b&gt;&amp;nbsp; expectedPods: 2&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;b&gt;&amp;nbsp; observedGeneration: 1&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;PDB and Rolling Update of Node Group&lt;/h2&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;b&gt;ALLOWED DISRUPTIONS = 1&lt;/b&gt;&lt;/span&gt; is generally the safest and most standard setting for a rolling node group update (which can be triggered if we e.g. upgrade k8s version of &lt;a href=&quot;https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/eks_node_group&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;aws_eks_node_group&lt;/a&gt;), especially for high-availability workloads.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Key Considerations for maxUnavailable: 1&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Safety First&lt;/b&gt;: &lt;u&gt;This setting ensures only one node is updated at a time (node - if all pod replicas are distribute across all nodes)&lt;/u&gt;. This is ideal for maintaining quorum in stateful applications like databases (e.g., Consul or ZooKeeper) where losing multiple nodes&amp;nbsp;&lt;/div&gt;&lt;div&gt;simultaneously could cause data loss or service failure.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Default Behavior&lt;/b&gt;: In Amazon EKS managed node groups, &lt;span style=&quot;font-family: courier;&quot;&gt;maxUnavailable&lt;/span&gt; defaults to 1 if not specified.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Resource Availability&lt;/b&gt;: For this to work, your cluster must have enough spare capacity (CPU/Memory) on the remaining nodes to host the pods evicted from the node being updated.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Update Speed&lt;/b&gt;: While safe, updating one node at a time is the slowest method. For very large clusters, you might consider a higher absolute number or a percentage (e.g., 10%) to speed up the process.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;When 1 is NOT Enough&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Blocking Drains&lt;/b&gt;: If you have a Pod Disruption Budget (PDB) where &lt;span style=&quot;font-family: courier;&quot;&gt;minAvailable&lt;/span&gt; equals your total replicas, the node drain will be blocked, and the update will stall because no pods can be legally moved.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Timeouts&lt;/b&gt;: Amazon EKS has a 15-minute timeout for draining pods. If pods take too long to terminate, the update may fail unless you have configured pre-stop hooks or adjusted your PDBs.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;In-Depth Explanation&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;In a Pod Disruption Budget (PDB), the setting ALLOWED DISRUPTIONS = 1 (which results from either maxUnavailable: 1 or a minAvailable value that leaves one &quot;slot&quot; free) acts as a safety valve that synchronizes infrastructure changes with application health.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here is exactly how it makes a rolling node group update safe:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;1. It Hooks into the &quot;Eviction API&quot;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;When a node group update begins, the automation doesn&#39;t just &quot;kill&quot; pods; it calls the Kubernetes Eviction API.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The Check: &lt;u&gt;Before a pod is removed from a node being updated, the Eviction API checks your PDB&lt;/u&gt;.&lt;/div&gt;&lt;div&gt;The Logic: &lt;u&gt;If ALLOWED DISRUPTIONS is 1, the API allows exactly one pod to be terminated. Once that pod is gone, the &quot;Allowed Disruptions&quot; counter drops to 0.&amp;nbsp;&lt;/u&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;2. It Forces a Sequential Wait&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This is the most critical safety feature. If a second pod eviction is requested while the first one is still being replaced:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;The Block: &lt;u&gt;The API sees ALLOWED DISRUPTIONS = 0 and rejects the eviction request&lt;/u&gt;.&lt;/li&gt;&lt;li&gt;The Wait: &lt;u&gt;The node &quot;drain&quot; process pauses and retries. It will stay paused until the first pod&#39;s replacement is scheduled on a different node and passes its Readiness Probe.&lt;/u&gt;&lt;/li&gt;&lt;li&gt;The Reset: Only when the new pod is &quot;Ready&quot; does the ALLOWED DISRUPTIONS count return to 1, allowing the next pod to be safely evicted.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;3. It Prevents &quot;Brain-Dead&quot; Automation&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Without this PDB setting, a node group update might try to drain a node that holds all replicas of your app.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Without PDB: The node drains, kills all pods at once, and you have a total outage.&lt;/li&gt;&lt;li&gt;With ALLOWED DISRUPTIONS = 1: The automation is physically unable to kill the second pod until the first one is safely back online elsewhere, ensuring your app always has at least some capacity.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Summary of the &quot;Safety Loop&quot;&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Step&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;Action&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PDB State (Allowed Disruptions)&lt;/div&gt;&lt;div&gt;1&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;Node update starts; first pod eviction requested&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;1 → Eviction granted&lt;/div&gt;&lt;div&gt;2&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;First pod is terminating; replacement is starting&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;0 → All further evictions blocked&lt;/div&gt;&lt;div&gt;3&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;Replacement pod passes Readiness Probe&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 → 1 → Block lifted&lt;/div&gt;&lt;div&gt;4&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;Next pod eviction requested&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 → Process repeats&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Important Note: If your app only has 1 replica total, a PDB with minAvailable: 1 will block the node update forever because it can never safely evict that single pod. You generally need at least 2 replicas for this safety mechanism to work without stalling your updates.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Can pod disruption budget be defined in deployment manifest?&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;No, a Pod Disruption Budget (PDB) cannot be defined directly inside a Deployment manifest. In Kubernetes, a PDB is a separate API resource (Kind: PodDisruptionBudget) that exists independently of the Deployment.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;While they are separate resources, they are linked by a Label Selector. You define the PDB to target specific pods by matching the labels specified in your Deployment&#39;s pod template.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Why they are separate?&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Decoupled Lifecycle: You can create, update, or delete a PDB without needing to redeploy your application or trigger a rolling update of your pods.&lt;/li&gt;&lt;li&gt;Multiple Controllers: A single PDB can protect pods across multiple Deployments, ReplicaSets, or StatefulSets as long as they share the same labels.&lt;/li&gt;&lt;li&gt;Administrative Control: Cluster administrators may manage PDBs separately from application developers to ensure cluster-wide stability during maintenance like node drains.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;How to link them?&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To make them work together, ensure the spec.selector.matchLabels in your PDB YAML matches the spec.template.metadata.labels in your Deployment YAML.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Deployment snippet:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;metadata:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; labels:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; app: my-app&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; template:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; metadata:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; labels:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #ffa400; font-family: courier;&quot;&gt;app: my-app&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;PDB snippet:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; selector:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;b&gt;matchLabels&lt;/b&gt;:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #ffa400; font-family: courier;&quot;&gt;app: my-app&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &lt;b&gt;minAvailable&lt;/b&gt;: 2&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here is an example of a complete multi-resource YAML that includes both the Deployment and the PDB:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;apiVersion: apps/v1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kind: Deployment&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;metadata:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; name: web-server&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; labels:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #ffa400; font-family: courier;&quot;&gt;app: nginx&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; replicas: 3&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; selector:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; matchLabels:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; app: nginx&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; template:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; metadata:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; labels:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; app: nginx&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; containers:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; - name: nginx&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; image: nginx:latest&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ports:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - containerPort: 80&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;---&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;apiVersion: policy/v1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kind: PodDisruptionBudget&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;metadata:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; name: web-server-pdb&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; # The PDB finds the pods using this selector&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; selector:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; matchLabels:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #ffa400; font-family: courier;&quot;&gt;app: nginx&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; # Ensures at least 2 pods stay up during voluntary disruptions&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &lt;b&gt;minAvailable&lt;/b&gt;: 2&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Key Takeaways:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;The Link&lt;/b&gt;: The spec.selector.matchLabels in the PDB must exactly match the spec.template.metadata.labels in the Deployment.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Voluntary Disruptions&lt;/b&gt;: This PDB will protect your pods during actions like node drains or cluster upgrades, but it won&#39;t prevent &quot;involuntary&quot; issues like a hardware crash.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Using &lt;span style=&quot;font-family: courier;&quot;&gt;maxUnavailable&lt;/span&gt; is often better for autoscaling environments because it scales with your replica count. Instead of saying &quot;I need X pods alive,&quot; you’re saying &quot;I can afford to lose X pods.&quot;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here is the updated manifest:&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;apiVersion: apps/v1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kind: Deployment&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;metadata:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; name: web-server&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; replicas: 5&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; selector:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; matchLabels:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; app: nginx&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; template:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; metadata:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; labels:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; app: nginx&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; containers:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; - name: nginx&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; image: nginx:latest&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;---&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;apiVersion: policy/v1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kind: PodDisruptionBudget&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;metadata:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; name: web-server-pdb&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; selector:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; matchLabels:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; app: nginx&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; # Only 1 pod can be taken down at a time during maintenance&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &lt;b&gt;maxUnavailable&lt;/b&gt;: 1&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Pro Tips for &lt;span style=&quot;font-family: courier;&quot;&gt;maxUnavailable&lt;/span&gt;:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;Absolute Number&lt;/b&gt;: Using 1 ensures that even if you have 100 replicas, Kubernetes will only drain one node at a time for this app.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Percentage:&lt;/b&gt; You can use a string like &quot;25%&quot; if you want the &quot;allowed downtime&quot; to grow or shrink as your Deployment scales.&lt;/li&gt;&lt;li&gt;&lt;b&gt;The &quot;One&quot; Rule&lt;/b&gt;: You cannot use both &lt;span style=&quot;font-family: courier;&quot;&gt;minAvailable&lt;/span&gt; and &lt;span style=&quot;font-family: courier;&quot;&gt;maxUnavailable&lt;/span&gt; in the same PDB; you have to pick one strategy.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;How to use a percentage to make the PDB more flexible for Horizontal Pod Autoscaling (HPA)?&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Using percentages for a Pod Disruption Budget (PDB) is highly recommended when combined with a Horizontal Pod Autoscaler (HPA). This allows the disruption budget to scale dynamically as your application grows or shrinks based on traffic.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Dynamic YAML Example (Deployment + HPA + PDB)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This configuration ensures that no matter how many replicas the HPA creates, at least 80% of them will always remain available during maintenance.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;apiVersion: apps/v1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kind: Deployment&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;metadata:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; name: dynamic-app&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; replicas: 2 # Initial count&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; selector:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; matchLabels:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; app: web&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; template:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; metadata:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; labels:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; app: web&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; containers:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; - name: nginx&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; image: nginx:latest&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;---&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;apiVersion: autoscaling/v2&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kind: HorizontalPodAutoscaler&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;metadata:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; name: web-hpa&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; scaleTargetRef:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; apiVersion: apps/v1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; kind: Deployment&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; name: dynamic-app&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; minReplicas: 2&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; maxReplicas: 10&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; metrics:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; - type: Resource&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; resource:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; name: cpu&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; target:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; type: Utilization&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; averageUtilization: 50&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;---&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;apiVersion: policy/v1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kind: PodDisruptionBudget&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;metadata:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; name: web-pdb&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; selector:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; matchLabels:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; app: web&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; # Scales with HPA: if HPA scales to 10 pods, 8 must stay up.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; minAvailable: 80%&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Key Behaviours to Note:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Rounding Logic: Kubernetes always rounds up the result of the percentage to the nearest integer. For example, if you have 7 pods and set minAvailable: 50%, Kubernetes requires 4 pods to remain available.&lt;/li&gt;&lt;li&gt;Maintenance Blockers: Be careful with 100% or 0%. Setting minAvailable: 100% or maxUnavailable: 0% will completely block node drains, preventing cluster administrators from performing upgrades or maintenance.&lt;/li&gt;&lt;li&gt;Single Replica Limitation: If your HPA scales down to 1 replica, a PDB with minAvailable: 1 or 100% will prevent that single pod from being evicted, which can stall cluster maintenance.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;How to troubleshoot a node drain that is stuck because of a PDB?&lt;/h2&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;A kubectl drain typically gets stuck because the ALLOWED DISRUPTIONS for a specific PDB is 0. This means evicting even one more pod would violate your availability rules.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;1. Identify the Blocking PDB&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Run this command to see which PDB is preventing the drain:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl get pdb -A&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Look for any PDB where &lt;span style=&quot;font-family: courier;&quot;&gt;ALLOWED DISRUPTIONS&lt;/span&gt; is 0. If it’s 0, the &lt;u&gt;eviction API&lt;/u&gt; will &lt;u&gt;reject any attempt to move those pods&lt;/u&gt;, and the &lt;u&gt;drain will wait indefinitely&lt;/u&gt;.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;2. Common Reasons for &quot;Allowed Disruptions: 0&quot;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;Too Few Replicas&lt;/b&gt;: You have &lt;span style=&quot;font-family: courier;&quot;&gt;minAvailable: 1&lt;/span&gt; but only 1 pod is currently running.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Unhealthy Pods&lt;/b&gt;: Your PDB requires 3 pods to be &lt;u&gt;healthy&lt;/u&gt;, but one is crashing or not yet &quot;Ready.&quot; The &lt;u&gt;PDB won&#39;t allow any more to be removed until that one is fixed&lt;/u&gt;.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Misconfiguration&lt;/b&gt;: You set &lt;span style=&quot;font-family: courier;&quot;&gt;minAvailable&lt;/span&gt; equal to your total replicas (e.g., 3 out of 3), meaning you&#39;ve effectively told Kubernetes &quot;never take a pod down&quot;.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;3. How to Unstick the Drain&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Depending on your situation, use one of these three strategies:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Strategy: Scale Up&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Command:&amp;nbsp; kubectl scale deployment &amp;lt;name&amp;gt; --replicas=&amp;lt;current+1&amp;gt;&lt;/li&gt;&lt;li&gt;Best For: Safest: Adds a new pod on a different node so the PDB is satisfied.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Strategy:&amp;nbsp;Relax PDB&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Command: kubectl edit pdb &amp;lt;pdb-name&amp;gt;&lt;/li&gt;&lt;li&gt;Best For:&amp;nbsp;Cleanest: Temporarily lower minAvailable or increase maxUnavailable.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Strategy:&amp;nbsp;Temporary Delete&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Command: kubectl delete pdb &amp;lt;pdb-name&amp;gt;&lt;/li&gt;&lt;li&gt;Best For:&amp;nbsp;Emergency: Delete the PDB, finish the drain, then re-apply the PDB later.&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Warning: The &quot;Force&quot; Flag&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Using kubectl drain &amp;lt;node&amp;gt; --force does not bypass PDBs. It only forces the deletion of pods not managed by a controller (like standalone pods) or pods using emptyDir. To truly bypass a PDB, you must either delete the PDB or manually kubectl delete pod the blocking pods&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;How to&amp;nbsp;find all pods on a specific node that are currently protected by a PDB?&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;To find pods on a specific node that are protected by a Pod Disruption Budget (PDB), you need to cross-reference the pods on that node with the label selectors defined in your PDBs.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Option 1: The Quickest Way (Manual Check)&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The most direct way to see all pods on a node and identify their labels is to use the describe node command.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl describe node &amp;lt;node-name&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Look for the &lt;b&gt;Non-terminated&lt;/b&gt; Pods section. You can then check if those pods&#39; labels match your PDB selectors.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Option 2: Filtered Search (Best for Large Nodes)&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If the node has many pods, use this command to list all pods on that node along with their labels:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl get pods -A \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp;-o wide \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp;--field-selector spec.nodeName=&amp;lt;node-name&amp;gt; \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp;--show-labels&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;-A: Searches across all namespaces.&lt;/div&gt;&lt;div&gt;--field-selector spec.nodeName: Limits results to the specific node.&lt;/div&gt;&lt;div&gt;--show-labels: Displays the labels you need to compare against your PDB&#39;s spec.selector.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Option 3: Identifying the PDB Selector&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To see exactly what labels a PDB is looking for, run:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl get pdb &amp;lt;pdb-name&amp;gt; \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp;-o jsonpath=&#39;{.spec.selector.matchLabels}&#39;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Any pod on your node that has these exact labels is protected by that PDB.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Summary of Useful Flags&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Flag &lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Purpose&lt;/b&gt;&lt;/div&gt;&lt;div&gt;-----------------&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;----------&lt;/div&gt;&lt;div&gt;-o wide&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Shows the NODE column to verify where pods are running.&lt;/div&gt;&lt;div&gt;--field-selector&lt;span style=&quot;white-space: pre;&quot;&gt;         &lt;/span&gt;Filters the list server-side by the node name.&lt;/div&gt;&lt;div&gt;-l or --selector&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Filters pods by specific labels (e.g., kubectl get pods -l app=nginx).&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;---&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.bojankomazec.com/feeds/483828855240935203/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4912226416400969049/483828855240935203' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/483828855240935203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/483828855240935203'/><link rel='alternate' type='text/html' href='http://www.bojankomazec.com/2026/03/application-pod-disruption-budget-pdb.html' title='Application Pod Disruption Budget (PDB) in Kubernetes'/><author><name>Bojan Komazec</name><uri>http://www.blogger.com/profile/05437236807206825832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEi8WwmUAx8p5XNQtaUg3CDEWtdFb70hoHgNBw3rxEbkiGpH-WPnvz0Ya09qE8B5a82wYui3oJ641ylIM-pXNUY6EV3C1uovGGLNe3oZ-LJQgWPS8HNi89nVLlTlCQRsniIwRaEsbxSAJq6rdmJap9mDX91dAYDb5UBicVZfrFk-hOrcwifBx8K36NVD3Nk=s72-w640-h640-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4912226416400969049.post-1710786838978241612</id><published>2026-03-05T11:50:00.006+00:00</published><updated>2026-03-05T13:20:04.951+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Altinity"/><category scheme="http://www.blogger.com/atom/ns#" term="Clickhouse"/><category scheme="http://www.blogger.com/atom/ns#" term="DevOps"/><category scheme="http://www.blogger.com/atom/ns#" term="Kubernetes"/><title type='text'>How to install Clickhouse in AWS EKS cluster via Altinity Helm charts and Terraform</title><content type='html'>&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIoJUC3ruc8P4B4sQhb-4Uzyxm5MDkD-Lc_s7bTOQZc2gkcS2jJcCof0St5glwjSviWGw1TjWZ1xIQfHPkNupq9vNTfdifpBSzDY1ZYjcKRku5SgmV_flV6OxkQ7OHIxus0ME748BxHjdhyphenhyphenQK2xDewGE2xP9WEcHCVZ1g8dDFHDCyH8XhpaEMg4Rk_E70/s1344/Screenshot%202026-03-05%20at%2011.46.05.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;972&quot; data-original-width=&quot;1344&quot; height=&quot;462&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIoJUC3ruc8P4B4sQhb-4Uzyxm5MDkD-Lc_s7bTOQZc2gkcS2jJcCof0St5glwjSviWGw1TjWZ1xIQfHPkNupq9vNTfdifpBSzDY1ZYjcKRku5SgmV_flV6OxkQ7OHIxus0ME748BxHjdhyphenhyphenQK2xDewGE2xP9WEcHCVZ1g8dDFHDCyH8XhpaEMg4Rk_E70/w640-h462/Screenshot%202026-03-05%20at%2011.46.05.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Installing ClickHouse on an AWS EKS cluster using Terraform and the Altinity Helm charts typically involves two stages:&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Installing the Altinity ClickHouse Operator&lt;/li&gt;&lt;li&gt;Deploying a ClickHouse Installation (CHI)&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;The Altinity Helm repository is located at &lt;a href=&quot;https://helm.altinity.com&quot;&gt;https://helm.altinity.com&lt;/a&gt;.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Prerequisites&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Ensure your Terraform environment is configured with the following providers:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;aws&lt;/span&gt;: To manage EKS and underlying infrastructure.&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;kubernetes&lt;/span&gt;: To interact with the EKS cluster.&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;helm&lt;/span&gt;: To install the operator.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Terraform Configuration&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The following example uses the &lt;span style=&quot;font-family: courier;&quot;&gt;helm_release&lt;/span&gt; resource to install the operator and the &lt;span style=&quot;font-family: courier;&quot;&gt;kubernetes_manifest&lt;/span&gt; resource to deploy the actual ClickHouse cluster.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Step A: Install the Altinity Operator&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The operator is the &quot;brain&quot; that &lt;u&gt;manages ClickHouse instances&lt;/u&gt; on Kubernetes.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;resource &quot;helm_release&quot; &quot;clickhouse_operator&quot; {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; name&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= &quot;clickhouse-operator&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; repository&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= &quot;https://helm.altinity.com&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; chart&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = &quot;altinity-clickhouse-operator&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; namespace&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = &quot;clickhouse-operator&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; create_namespace = true&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; # Optional: Enable metrics for Prometheus&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; set {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; name&amp;nbsp; = &quot;metrics.enabled&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; value = &quot;true&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Step B: Deploy a ClickHouse Cluster (CHI)&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Once the operator is running, you define your &lt;i&gt;ClickHouse cluster&lt;/i&gt; using a Custom Resource (CRD). In Terraform, you use &lt;span style=&quot;font-family: courier;&quot;&gt;kubernetes_manifest&lt;/span&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;resource &quot;kubernetes_manifest&quot; &quot;clickhouse_cluster&quot; {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; depends_on = [helm_release.clickhouse_operator]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; manifest = {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; apiVersion = &quot;clickhouse.altinity.com/v1&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; kind&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= &quot;ClickHouseInstallation&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; metadata = {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; name&amp;nbsp; &amp;nbsp; &amp;nbsp; = &quot;simple-clickhouse&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; namespace = &quot;clickhouse-operator&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; spec = {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; configuration = {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; clusters = [&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; name = &quot;cluster1&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; layout = {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; shardsCount&amp;nbsp; &amp;nbsp;= 1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; replicasCount = 1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Production Considerations for EKS&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;When running ClickHouse on EKS, you should consider storage and networking:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;Storage Class&lt;/b&gt;: Use AWS gp3 volumes for a good balance of price and performance. You can specify a &lt;span style=&quot;font-family: courier;&quot;&gt;volumeClaimTemplate&lt;/span&gt; in your &lt;span style=&quot;font-family: courier;&quot;&gt;kubernetes_manifest&lt;/span&gt;.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Node Affinity&lt;/b&gt;: It is recommended to run ClickHouse on specific node groups (e.g., using &lt;span style=&quot;font-family: courier;&quot;&gt;i3&lt;/span&gt; or &lt;span style=&quot;font-family: courier;&quot;&gt;r5&lt;/span&gt; instances) to ensure it doesn&#39;t compete with other workloads for IOPS.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Zookeeper/Keeper&lt;/b&gt;: For multi-node shards or replicas, you will need a Zookeeper cluster or the ClickHouse Keeper (also available via Altinity charts).&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;EKS Module&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Altinity maintains a dedicated Terraform EKS ClickHouse module that automates the entire VPC, EKS, and ClickHouse setup if you prefer a pre-packaged solution.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;How to view Clickhouse Installation Configuration?&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% &lt;b&gt;kubectl get chi -n clickhouse -o yaml&amp;nbsp;&lt;/b&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;apiVersion: v1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;items:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;- apiVersion: &lt;b&gt;clickhouse.altinity.com/v1&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; kind: &lt;b&gt;ClickHouseInstallation&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; metadata:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; annotations:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; kubectl.kubernetes.io/last-applied-configuration: |&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp;{&quot;apiVersion&quot;:&quot;clickhouse.altinity.com/v1&quot;,&quot;kind&quot;:&quot;ClickHouseInstallation&quot;,&quot;metadata&quot;:....}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; creationTimestamp: &quot;2025-01-28T14:35:46Z&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; finalizers:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; - finalizer.clickhouseinstallation.altinity.com&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; generation: 12&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; name: clickhouse&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; namespace: clickhouse&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; resourceVersion: &quot;67251031&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; uid: 9fxxxx1-81e7-429b-9cf7-ffxxxxxxef&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; configuration:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; clusters:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; - layout:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; replicasCount: 1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; shardsCount: 1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; name: ch&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; templates:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dataVolumeClaimTemplate: ch-data&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; podTemplate: ch-pod&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; serviceTemplate: ch-svc&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; users:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; admin/grants/query: GRANT ALL ON *.*&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; admin/networks/ip: 0.0.0.0/0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;admin/password&lt;/b&gt;: my-admin-password&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;(or&amp;nbsp; &amp;nbsp; &amp;nbsp;admin/password_sha256_hex:&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: small;&quot;&gt;my-admin-password-in-sha256&lt;/span&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; admin/profile: xxxx&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; admin/quota: xxxxx&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; admin/settings/enable_http_compression: 1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;default/k8s_secret_password_sha256_hex&lt;/b&gt;: &amp;lt;namespace/secretName/key&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; default/profile: default&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; default/quota: default&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; templates:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; podTemplates:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; - name: ch-pod&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; containers:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - image: altinity/clickhouse-server:24.8.14.10544.altinitystable&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; name: clickhouse&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - args:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - server&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; env:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - name: LOG_LEVEL&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value: info&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - name: API_LISTEN&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value: 0.0.0.0:7171&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - name: API_CREATE_INTEGRATION_TABLES&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value: &quot;true&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - name: REMOTE_STORAGE&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value: s3&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - name: BACKUPS_TO_KEEP_REMOTE&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value: &quot;2&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - name: S3_BUCKET&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value: my-clickhouse-backups&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - name: S3_REGION&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value: us-east-1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - name: CLICKHOUSE_HOST&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value: localhost&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - name: CLICKHOUSE_USERNAME&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value: xxxxx&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - name: CLICKHOUSE_PASSWORD&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value: xxxx&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; image: altinity/clickhouse-backup:latest&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; imagePullPolicy: IfNotPresent&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; name: clickhouse-backup&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; serviceAccountName: clickhouse-backup&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tolerations:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - effect: NoSchedule&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; key: karpenter/clickhouse&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; operator: Exists&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; serviceTemplates:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; - metadata:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; annotations:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; service.beta.kubernetes.io/aws-load-balancer-ip-address-type: ipv4&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; service.beta.kubernetes.io/aws-load-balancer-name: my-clickhouse-nlb&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: ip&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; service.beta.kubernetes.io/aws-load-balancer-scheme: internal&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; service.beta.kubernetes.io/aws-load-balancer-type: nlb&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; name: clickhouse&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; name: ch-svc&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ports:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - name: http&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; port: 8123&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; targetPort: 8123&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - name: native&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; port: 9000&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; targetPort: 9000&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; type: LoadBalancer&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; volumeClaimTemplates:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; - name: ch-data&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; accessModes:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - ReadWriteOnce&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; resources:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; requests:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; storage: 100Gi&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; status:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; chop-commit: 9abcd12&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; chop-date: 2025-01-24T08:40:12&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; chop-ip: 10.x.x.x&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; chop-version: 0.25.5&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; clusters: 1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; endpoint: clickhouse-clickhouse.clickhouse.svc.cluster.local&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; fqdns:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; - chi-clickhouse-ch-0-0.clickhouse.svc.cluster.local&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; hosts: 1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; hostsWithTablesCreated:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; - chi-clickhouse-ch-0-0.clickhouse.svc.cluster.local&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; pods:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; - chi-clickhouse-ch-0-0-0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; shards: 1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; status: Completed&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; taskID: auto-1xxxxd2-5ba4-4c3a-9daa-baxxxxx850&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; taskIDsCompleted:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; - auto-1fxxxxxd2-5ba4-4c3a-9daa-baxxxxxx50&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ...&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; - auto-bbxxxx6-31e3-4a4c-b04b-e5xxxxxx91&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; taskIDsStarted:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; - auto-31xxxxx37-492f-4109-b515-4axxxxxx6c8&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ...&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; - auto-b8xxxxx7-0396-41e0-b5d1-95xxxxd48&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;kind: List&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;metadata:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; resourceVersion: &quot;&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Users section shows users config in form &lt;span style=&quot;font-family: courier;&quot;&gt;USER_NAME/ATTRIBUTE&lt;/span&gt;. In the example above we have two users: &lt;span style=&quot;font-family: courier;&quot;&gt;admin&lt;/span&gt; and &lt;span style=&quot;font-family: courier;&quot;&gt;default&lt;/span&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;USER_NAME/password&lt;/span&gt; values is plain text password. This is very convenient for debugging (though usually a security &quot;no-no&quot; for production, especially if that&#39;s &lt;span style=&quot;font-family: courier;&quot;&gt;admin&lt;/span&gt; or &lt;span style=&quot;font-family: courier;&quot;&gt;default&lt;/span&gt; user!).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;USER_NAME/password_sha256_hex&lt;/span&gt; is a SHA256 hashed password.&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;USER_NAME/k8s_secret_password_sha256_hex: &amp;lt;namespace/SECRET_NAME/KEY_NAME&amp;nbsp;&amp;gt;&lt;/span&gt;&amp;nbsp;shows that&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: courier; font-weight: normal;&quot;&gt;USER_NAME&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;ClickHouse user is secured using a Kubernetes Secret. This maps the default user&#39;s password to a specific Kubernetes Secret.&amp;nbsp;&lt;/span&gt;&lt;/h4&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;USER_NAME/k8s_secret_password_sha256_hex&lt;/span&gt;: Specifies that for the user named USER_NAME, the password should be read from a Kubernetes Secret as a SHA256 hex string.&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;lt;namespace/&lt;span style=&quot;font-family: Times;&quot;&gt;SECRET_NAME&lt;/span&gt;/&lt;span style=&quot;font-family: Times;&quot;&gt;KEY_NAME&amp;nbsp;&lt;/span&gt;&amp;gt;&lt;/span&gt;: This is the reference to the &lt;b&gt;secret&lt;/b&gt; itself, structured as &lt;span style=&quot;font-family: courier;&quot;&gt;namespace/SECRET_NAME/KEY_NAME&lt;/span&gt;.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Purpose&lt;/b&gt;: This allows for secure, GitOps-friendly password management, preventing plain-text passwords from appearing in Kubernetes manifests.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Implementation&lt;/b&gt;: The ClickHouse Operator reads this secret and places the hashed password into the users.xml file for the ClickHouse server.&amp;nbsp;Operator reads the secret, hashes the password (if necessary), and writes it into a file called /etc/clickhouse-server/users.d/chop-generated-users.xml inside your ClickHouse pod.&amp;nbsp;If you have External Secrets installed, this secret is likely being pulled from AWS Secrets Manager.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Alternative&lt;/b&gt;: You can also use &lt;span style=&quot;font-family: courier;&quot;&gt;k8s_secret_env_password_sha256_hex&lt;/span&gt; to load the password via an environment variable.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In the Altinity Operator, the syntax&amp;nbsp;&lt;span style=&quot;font-family: courier;&quot;&gt;USER_NAME&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;/k8s_secret_password_sha256_hex &lt;/span&gt;is a pointer. It tells the operator to look into a specific secret to find the password hash for the&amp;nbsp;&lt;span style=&quot;font-family: courier;&quot;&gt;USER_NAME&lt;/span&gt;&amp;nbsp;user.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To get the password:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% kubectl get secret &amp;lt;SECRET_NAME&amp;gt; \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;-n &amp;lt;NAMESPACE&amp;gt; \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;-o jsonpath=&quot;{.data.&amp;lt;KEY_NAME&amp;gt;}&quot; \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;| base64 -d&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;NAMESPACE is usually &lt;span style=&quot;font-family: courier;&quot;&gt;clickhouse&lt;/span&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;How to check Clickhouse health?&lt;/h2&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Since ClickHouse is running in our cluster, the best way to verify it&#39;s &quot;working fine&quot; is to move beyond just checking the Pod status and actually query the database engine itself.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here is a 3-step approach to verify health, connectivity, and data integrity.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;1. The &quot;Internal&quot; Health Check&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The quickest way is to execute a command directly inside the pod using the clickhouse-client. This bypasses networking issues and tells you if the engine is responsive. Run this command:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl exec -it chi-clickhouse-ch-0-0 \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;-n clickhouse \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;-- clickhouse-client &lt;/span&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;--query &quot;SELECT version(), uptime()&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;chi-clickhouse-ch-0-0&lt;/span&gt; is the name of the pod, it can also be like &lt;span style=&quot;font-family: courier;&quot;&gt;chi-clickhouse-ch-0-0-0&lt;/span&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;If this returns data, it means ClickHouse is successfully reading from its system tables on the EBS volume.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;What to look for: It should return the version string and the number of seconds the server has been up. If this fails, the DB engine itself is hung.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you are using &lt;span style=&quot;font-family: courier;&quot;&gt;default&lt;/span&gt; user which has a password, or, &lt;span style=&quot;font-family: courier;&quot;&gt;default&lt;/span&gt; user was disabled, the output might show the error similar to this:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% kubectl exec -it chi-clickhouse-ch-0-0-0 -n clickhouse -- clickhouse-client --query &quot;SELECT version(), uptime()&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: red; font-family: courier; font-size: x-small;&quot;&gt;Defaulted container &quot;clickhouse&quot; out of: clickhouse, clickhouse-backup&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: red; font-family: courier; font-size: x-small;&quot;&gt;Code: 516. DB::Exception: Received from localhost:9000. DB::Exception: default: Authentication failed: password is incorrect, or there is no user with such name.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: red; font-family: courier; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: red; font-family: courier; font-size: x-small;&quot;&gt;If you have installed ClickHouse and forgot password you can reset it in the configuration file.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: red; font-family: courier; font-size: x-small;&quot;&gt;The password for default user is typically located at /etc/clickhouse-server/users.d/default-password.xml&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: red; font-family: courier; font-size: x-small;&quot;&gt;and deleting this file will reset the password.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: red; font-family: courier; font-size: x-small;&quot;&gt;See also /etc/clickhouse-server/users.xml on the server where ClickHouse is installed.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: red; font-family: courier; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: red; font-family: courier; font-size: x-small;&quot;&gt;. (AUTHENTICATION_FAILED)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: red; font-family: courier; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: red; font-family: courier; font-size: x-small;&quot;&gt;command terminated with exit code 4&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Seeing an &lt;span style=&quot;font-family: courier;&quot;&gt;AUTHENTICATION_FAILED&lt;/span&gt; error instead of a &lt;span style=&quot;font-family: courier;&quot;&gt;Connection Refused&lt;/span&gt; error is actually a positive result for this check:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Networking works: Your kubectl exec reached the pod.&lt;/li&gt;&lt;li&gt;Process is alive: The ClickHouse server is running and actively rejecting bad logins.&lt;/li&gt;&lt;li&gt;Storage is mounted: ClickHouse can&#39;t check credentials if it can&#39;t read its config files from disk.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;If we know the Clickhouse credentials, we can perform the health check:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% kubectl exec -it chi-clickhouse-ch-0-0-0 -n clickhouse -- clickhouse-client --user USER --password PASS --query &quot;SELECT version(), uptime(), name FROM system.clusters&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;Defaulted container &quot;clickhouse&quot; out of: clickhouse, clickhouse-backup&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;24.8.14.10544.altinitystable&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;501389&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;all-clusters&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;24.8.14.10544.altinitystable&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;501389&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;all-replicated&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;24.8.14.10544.altinitystable&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;501389&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;all-sharded&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;24.8.14.10544.altinitystable&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;501389&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;ch&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;24.8.14.10544.altinitystable&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;501389&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;default&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The output above is exactly what we wanted to see. The database is responsive, healthy, and has an uptime of ~5.8 days (501,389 seconds). The version 24.8.14.10544.altinitystable indicates we are on a very recent, stable Altinity build.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;2. Check Replication and Disk Health&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Since you are using the Altinity Operator, ClickHouse is likely managing data across disks. You want to ensure the &quot;System&quot; tables report no errors. Run this to check if the disks are mounted and have space:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% &lt;b&gt;kubectl exec -it chi-clickhouse-ch-0-0-0 \&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;b&gt;-n clickhouse \&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;b&gt;-- clickhouse-client&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;b style=&quot;color: #38761d; font-family: courier;&quot;&gt;--user USER --password PASS \&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b style=&quot;color: #38761d; font-family: courier;&quot;&gt;--query &quot;SELECT name, path, formatReadableSize(free_space) AS free, formatReadableSize(total_space) AS total FROM system.disks&quot;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;Defaulted container &quot;clickhouse&quot; out of: clickhouse, clickhouse-backup&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;default&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;/var/lib/clickhouse/&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;89.60 GiB&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;95.80 GiB&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you have multiple replicas (e.g., a ch-0-1 pod), check for replication lag:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% &lt;b&gt;kubectl exec -it chi-clickhouse-ch-0-0-0 \&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;b&gt;-n clickhouse \&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;b&gt;-- clickhouse-client --user&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;USER&lt;/span&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;--password&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;PASS&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;b&gt;&amp;nbsp;\&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;b&gt;--query &quot;SELECT type, last_exception, num_tries FROM system.replication_queue WHERE last_exception != &#39;&#39;&quot;&lt;/b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;Defaulted container &quot;clickhouse&quot; out of: clickhouse, clickhouse-backup&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Result: This should ideally be empty (or as above) . If you see exceptions here, your nodes aren&#39;t syncing correctly.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;3. Verify the &quot;Operator&quot; View&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The Altinity Operator provides a &quot;Status&quot; field in its Custom Resource that summarizes the health of the entire installation.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% &lt;b&gt;kubectl get chi -n clickhouse&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;NAME&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CLUSTERS&amp;nbsp; &amp;nbsp;HOSTS&amp;nbsp; &amp;nbsp;STATUS&amp;nbsp; &amp;nbsp; &amp;nbsp; HOSTS-COMPLETED&amp;nbsp; &amp;nbsp;AGE&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;clickhouse&amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;b&gt;Completed&lt;/b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;123d&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;What to look for: Look for the &lt;span style=&quot;font-family: courier;&quot;&gt;STATUS&lt;/span&gt; column. It should say &lt;span style=&quot;font-family: courier;&quot;&gt;Completed&lt;/span&gt;. &lt;u&gt;If it says &lt;span style=&quot;font-family: courier;&quot;&gt;InProgress&lt;/span&gt; or &lt;span style=&quot;font-family: courier;&quot;&gt;Error&lt;/span&gt;, the Operator is struggling to configure the cluster.&lt;/u&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;4. Check the Backup (Safety Net)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Since you saw clickhouse-backup pods earlier, verify that the last backup actually succeeded. This is your &quot;point of no return&quot; check before the upgrade.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl logs -n clickhouse -l job-name=clickhouse-backup-cron-&amp;lt;TIMESTAMP&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;(Replace &amp;lt;TIMESTAMP&amp;gt; with one of the strings from your previous get all output, e.g., 29543400).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Look for: &lt;span style=&quot;font-family: courier;&quot;&gt;Done&lt;/span&gt;, &lt;span style=&quot;font-family: courier;&quot;&gt;Success&lt;/span&gt;, or &lt;span style=&quot;font-family: courier;&quot;&gt;Upload finished&lt;/span&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;5. Check the Status of All Replicas&amp;nbsp;&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To be absolutely sure the cluster is &quot;Green&quot; before you start the EKS upgrade, run this to check the status of all replicas in the cluster:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% kubectl exec -it chi-clickhouse-ch-0-0-0 -n clickhouse -- clickhouse-client --user USER --password PASS --query &quot;SELECT replica_path, is_leader, is_readonly, future_parts FROM system.replicas&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;is_readonly&lt;/span&gt;: Should be 0. If it&#39;s 1, the node can&#39;t write data (usually a Zookeeper issue).&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;is_leader&lt;/span&gt;: One of your replicas should be 1.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Summary Checklist&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;b&gt;Test&amp;nbsp; &amp;nbsp; &amp;nbsp; Command Goal&amp;nbsp; &amp;nbsp; &amp;nbsp;Good Result&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;Ping&amp;nbsp; &amp;nbsp; &amp;nbsp; SELECT&amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;Uptime&amp;nbsp; &amp;nbsp; SELECT uptime()&amp;nbsp; &amp;gt;0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;Storage&amp;nbsp; &amp;nbsp;system.disks&amp;nbsp; &amp;nbsp; &amp;nbsp;Free space &amp;gt; 10%&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;Operator&amp;nbsp; kubectl get chi&amp;nbsp; Completed&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Resources:&lt;/h2&gt;&lt;div&gt;&lt;a href=&quot;https://altinity.com/&quot;&gt;Altinity | Run Open Source ClickHouse® Better&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.bojankomazec.com/feeds/1710786838978241612/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4912226416400969049/1710786838978241612' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/1710786838978241612'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/1710786838978241612'/><link rel='alternate' type='text/html' href='http://www.bojankomazec.com/2026/03/how-to-install-clickhouse-in-aws-eks.html' title='How to install Clickhouse in AWS EKS cluster via Altinity Helm charts and Terraform'/><author><name>Bojan Komazec</name><uri>http://www.blogger.com/profile/05437236807206825832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIoJUC3ruc8P4B4sQhb-4Uzyxm5MDkD-Lc_s7bTOQZc2gkcS2jJcCof0St5glwjSviWGw1TjWZ1xIQfHPkNupq9vNTfdifpBSzDY1ZYjcKRku5SgmV_flV6OxkQ7OHIxus0ME748BxHjdhyphenhyphenQK2xDewGE2xP9WEcHCVZ1g8dDFHDCyH8XhpaEMg4Rk_E70/s72-w640-h462-c/Screenshot%202026-03-05%20at%2011.46.05.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4912226416400969049.post-7356867261205328947</id><published>2026-03-05T00:46:00.007+00:00</published><updated>2026-03-07T00:28:27.034+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ArgoCD"/><category scheme="http://www.blogger.com/atom/ns#" term="DevOps"/><category scheme="http://www.blogger.com/atom/ns#" term="GitOps"/><category scheme="http://www.blogger.com/atom/ns#" term="Kubernetes"/><title type='text'>Introduction to ArgoCD</title><content type='html'>&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh57Cb8KVuMGmR6-zI6g4vdXhvMvMb5a_oTCHcJf8JMoiR_EIceQ481St7I0upE-Ml-SQWSbyv0ZW5L4a8t-A-BqONVBw0Cvqrk71SDL75lDEmapvdGCq7d41rF9BG9gfbCDFwZjQihMvFKLzCyEwnYPX7f5Pd9-2sGWVT7tAgIUa_zVrTMjXnQr3Ndb2Y/s600/argocd.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;600&quot; data-original-width=&quot;600&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh57Cb8KVuMGmR6-zI6g4vdXhvMvMb5a_oTCHcJf8JMoiR_EIceQ481St7I0upE-Ml-SQWSbyv0ZW5L4a8t-A-BqONVBw0Cvqrk71SDL75lDEmapvdGCq7d41rF9BG9gfbCDFwZjQihMvFKLzCyEwnYPX7f5Pd9-2sGWVT7tAgIUa_zVrTMjXnQr3Ndb2Y/w640-h640/argocd.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;a href=&quot;https://argo-cd.readthedocs.io/en/stable/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;ArgoCD&lt;/a&gt; is a tool for deploying applications in Kubernetes cluster following the GitOps principles.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div&gt;Argo CD is a declarative, GitOps-based continuous delivery (CD) tool designed specifically for Kubernetes. It acts as a controller that monitors running applications, compares their live state to the desired state defined in a Git repository, and automatically syncs them to ensure consistency.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Key Aspects of an Argo CD Application:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;GitOps Source of Truth&lt;/b&gt;: Git repositories hold the desired state (manifests, Helm charts, Kustomize configs), which Argo CD pulls to apply to clusters.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Automated Synchronization&lt;/b&gt;: It automatically detects &quot;OutOfSync&quot; applications—where the live cluster state differs from Git—and can automatically or manually sync them to match.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Continuous Monitoring&lt;/b&gt;: It acts as a Kubernetes controller that continuously monitors applications.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Visualization &amp;amp; Management&lt;/b&gt;: It provides a web UI to visualize application structure, monitor status, and manage rollbacks.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Key Capabilities&lt;/b&gt;: Supports automated deployment, drift detection, and easy rollbacks.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Argo CD is often used to ensure that the actual state of a Kubernetes cluster matches the configuration stored in a Git repository, making the deployment process more reliable and transparent.&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;ArgoCD GitOps flow:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Commit and push infra code changes (Terraform, Helm values etc) to the &lt;b&gt;main&lt;/b&gt; branch of your GitHub repository.&lt;/li&gt;&lt;li&gt;ArgoCD Sync:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Manual: Log in to our ArgoCD Dashboard and click the &quot;Sync&quot; or &quot;Refresh&quot; button on the psmdb-default-sharded application.&lt;/li&gt;&lt;li&gt;Automatic: If &quot;Self-Heal&quot; or &quot;Auto-Sync&quot; is enabled, ArgoCD will detect the Git change within ~3 minutes and apply it to the cluster automatically.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Monitor the Operator: Once ArgoCD syncs, infra will get changed e.g. operators will see the updated custom resources and then trigger the further actions.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Installation&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Installing ArgoCD in a Kubernetes cluster is primarily done using manifests or Helm charts. The most common and recommended approach for beginners is using the Official Argo CD Manifests.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Prerequisites:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;A running Kubernetes cluster (v1.22 or later).&lt;/li&gt;&lt;li&gt;kubectl command-line tool installed and configured to your cluster.&lt;/li&gt;&lt;li&gt;At least 2GB of available memory in your cluster.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Applications&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;ArgoCD defines custom Kubernetes objects like&amp;nbsp;&lt;span style=&quot;font-family: courier;&quot;&gt;Application&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;font-family: courier;&quot;&gt;AppProject&lt;/span&gt;, settings...which can be defined declaratively using Kubernetes manifests and deployed via&amp;nbsp;&lt;span style=&quot;font-family: courier;&quot;&gt;kubectl apply&lt;/span&gt;&amp;nbsp;to the ArgoCD namespace which is&amp;nbsp;&lt;span style=&quot;font-family: courier;&quot;&gt;argocd&lt;/span&gt;&amp;nbsp;by default.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To check ArgoCD applications:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% kubectl get applications -A&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;NAMESPACE&amp;nbsp; &amp;nbsp;NAME&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SYNC STATUS&amp;nbsp; &amp;nbsp;HEALTH STATUS&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;argocd&amp;nbsp; &amp;nbsp; &amp;nbsp; my-app&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Synced&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Progressing&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Dashboard&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;If you don&#39;t know the url of the ArgoCD dashboard, find the IP of the ArgoCD server and port-forward it:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% kubectl get svc argocd-server -n argocd&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;NAME&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TYPE&amp;nbsp; &amp;nbsp; &amp;nbsp; CLUSTER-IP&amp;nbsp; &amp;nbsp; EXTERNAL-IP PORT(S)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AGE&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;argocd-server ClusterIP 172.21.103.127 &amp;lt;none&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;80/TCP,443/TCP 1d&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;By default, ArgoCD includes a built-in &lt;span style=&quot;font-family: courier;&quot;&gt;admin&lt;/span&gt; user with full super-user access. For better security practices, it is recommended that you use the admin account only for the initial configuration, then disable it once all required users have been added.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For this example, we can stick to this default &lt;span style=&quot;font-family: courier;&quot;&gt;admin&lt;/span&gt; user. Its password can be obtain via this command:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% kubectl get secret \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;argocd-initial-admin-secret \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;-n argocd \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;-o jsonpath=&quot;{.data.password}&quot; \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;| base64 -d&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Port forwarding:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% kubectl port-forward svc/argocd-server -n argocd 8080:443&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;Forwarding from 127.0.0.1:8080 -&amp;gt; 8080&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;Forwarding from [::1]:8080 -&amp;gt; 8080&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;Handling connection for 8080&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;Handling connection for 8080&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;Handling connection for 8080&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;Handling connection for 8080&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;Handling connection for 8080&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;Handling connection for 8080&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We can now open the address &lt;span style=&quot;font-family: courier;&quot;&gt;http://localhost:8080/&lt;/span&gt; in the browser to get the ArgoCD dashboard and log in with credentials above.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If there are no application registered with ArgoCD, we will see something like this:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7c2Z_irXgj2-B9W5RfTT1E0BthgIn3pxU2JLIxFkWVCJay_jI9M7ZksCd9cyTvP6xTAltDuQ1cSCFRtkFK1_5G-bL1rm83fZiOk2qGWJoXsmbinlt1w8milOwGvmJxrVnotDIPdDnoFoD_nEQqpPcltotUvFzW4Wpb3m9f2f3ejAhsHAq7WE4e-HJ6LY/s1920/Screenshot%202026-03-04%20at%2018.13.28.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;557&quot; data-original-width=&quot;1920&quot; height=&quot;186&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7c2Z_irXgj2-B9W5RfTT1E0BthgIn3pxU2JLIxFkWVCJay_jI9M7ZksCd9cyTvP6xTAltDuQ1cSCFRtkFK1_5G-bL1rm83fZiOk2qGWJoXsmbinlt1w8milOwGvmJxrVnotDIPdDnoFoD_nEQqpPcltotUvFzW4Wpb3m9f2f3ejAhsHAq7WE4e-HJ6LY/w640-h186/Screenshot%202026-03-04%20at%2018.13.28.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;---&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Resources:&lt;/h2&gt;&lt;div&gt;&lt;a href=&quot;https://argo-cd.readthedocs.io/en/stable/&quot;&gt;Argo CD - Declarative GitOps CD for Kubernetes&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://docs.aws.amazon.com/eks/latest/userguide/argocd.html&quot;&gt;Continuous Deployment with Argo CD - Amazon EKS&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.bojankomazec.com/feeds/7356867261205328947/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4912226416400969049/7356867261205328947' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/7356867261205328947'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/7356867261205328947'/><link rel='alternate' type='text/html' href='http://www.bojankomazec.com/2026/03/introduction-to-argocd.html' title='Introduction to ArgoCD'/><author><name>Bojan Komazec</name><uri>http://www.blogger.com/profile/05437236807206825832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh57Cb8KVuMGmR6-zI6g4vdXhvMvMb5a_oTCHcJf8JMoiR_EIceQ481St7I0upE-Ml-SQWSbyv0ZW5L4a8t-A-BqONVBw0Cvqrk71SDL75lDEmapvdGCq7d41rF9BG9gfbCDFwZjQihMvFKLzCyEwnYPX7f5Pd9-2sGWVT7tAgIUa_zVrTMjXnQr3Ndb2Y/s72-w640-h640-c/argocd.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4912226416400969049.post-7241423173796574006</id><published>2026-02-26T15:42:00.001+00:00</published><updated>2026-02-26T15:47:42.490+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DevOps"/><category scheme="http://www.blogger.com/atom/ns#" term="kubectl"/><category scheme="http://www.blogger.com/atom/ns#" term="KubePug"/><category scheme="http://www.blogger.com/atom/ns#" term="Kubernetes"/><title type='text'>Introduction to KubePug (Kubernetes tool)</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkIR8lF1DIWDWeizFBBYSUqIzvoFP5rglXWGsybk_bh3byjh5cKFdy933jrItHUh0h2YW74461QtBPD7eQxRuYAvNUOJuP3AFyz3Jcqwanm1rbFBAezG0LvrVQtRIxpbGXyH0v8UnX6rh6bLBdH0hWCqEkyrXoct9v_jjiv_qlgSQQI1w2uGAHonLn8LA/s366/kubepug.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;262&quot; data-original-width=&quot;366&quot; height=&quot;458&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkIR8lF1DIWDWeizFBBYSUqIzvoFP5rglXWGsybk_bh3byjh5cKFdy933jrItHUh0h2YW74461QtBPD7eQxRuYAvNUOJuP3AFyz3Jcqwanm1rbFBAezG0LvrVQtRIxpbGXyH0v8UnX6rh6bLBdH0hWCqEkyrXoct9v_jjiv_qlgSQQI1w2uGAHonLn8LA/w640-h458/kubepug.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;What is KubePug?&lt;/h2&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div&gt;KubePug (Kubernetes PreUpGrade Checker) is an open-source kubectl plugin and CLI tool designed to identify deprecated or deleted APIs in your Kubernetes cluster or manifest files before you perform an upgrade.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Key Features&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;Deprecation Detection&lt;/b&gt;: Scans your live cluster or static YAML manifests to find resources using APIs that are slated for removal in future Kubernetes versions.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Replacement Guidance&lt;/b&gt;: Not only flags outdated APIs but also suggests the recommended replacement API and specifies the exact version where the deprecation or deletion occurs.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Version Targeting&lt;/b&gt;: Allows you to specify a target Kubernetes version (e.g., v1.31) to validate your current resources against that specific future release.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Flexible Data Source&lt;/b&gt;: It automatically downloads a frequently updated API definition file (every 30 minutes) to stay current with the latest Kubernetes releases.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Why Use It?&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;As Kubernetes evolves, APIs are moved from alpha/beta to stable (GA), and older versions are eventually removed. If you upgrade your cluster without updating your manifests, those resources will fail to deploy or operate. KubePug provides a &quot;pre-flight&quot; check to prevent these breaking changes from reaching production.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Installation &amp;amp; Usage&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can install KubePug via Krew (where it is listed under the name deprecations) or as a standalone binary.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Method&amp;nbsp;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Command&lt;/div&gt;&lt;div&gt;---------&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -------------&lt;/div&gt;&lt;div&gt;Install via Krew&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;kubectl krew install deprecations&lt;/div&gt;&lt;div&gt;Scan Live Cluster&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;kubectl deprecations --k8s-version=v1.30&lt;/div&gt;&lt;div&gt;Scan Manifest File&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;kubepug --input-file=./my-manifest.yaml&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Installation via Krew&lt;/h3&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% &lt;b&gt;kubectl krew install deprecations&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;Updated the local copy of plugin index.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;Installing plugin: deprecations&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;Installed plugin: deprecations&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;\&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;| Use this plugin:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;| &lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;kubectl deprecations&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;| Documentation:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;| &lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;https://github.com/rikatz/kubepug&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;| Caveats:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;| \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;|&amp;nbsp; | * By default, deprecations finds deprecated object relative to the current kubernetes&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;|&amp;nbsp; | master branch. To target a different kubernetes release, use the --k8s-version&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;|&amp;nbsp; | argument.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;|&amp;nbsp; |&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;|&amp;nbsp; | * Deprecations needs permission to GET all objects in the Cluster&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;| /&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;/&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #ffa400; font-family: courier;&quot;&gt;WARNING: You installed plugin &quot;deprecations&quot; from the krew-index plugin repository.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #ffa400; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp;These plugins are not audited for security by the Krew maintainers.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #ffa400; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp;Run them at your own risk.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Execution&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Once installed, the plugin is invoked using &lt;span style=&quot;font-family: courier;&quot;&gt;kubectl deprecations&lt;/span&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Scan Current Cluster&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Check your live cluster for deprecated APIs against a specific target Kubernetes version:&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;%&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl deprecations --k8s-version=v1.33&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: red; font-family: courier;&quot;&gt;Error: failed to get apiservices: apiservices.apiregistration.k8s.io is forbidden: User &quot;sso:user&quot; cannot list resource &quot;apiservices&quot; in API group &quot;apiregistration.k8s.io&quot; at the cluster scope&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: red; font-family: courier;&quot;&gt;time=&quot;2026-02-26T14:20:19Z&quot; level=error msg=&quot;An error has occurred: failed to get apiservices: apiservices.apiregistration.k8s.io is forbidden: User \&quot;sso:user\&quot; cannot list resource \&quot;apiservices\&quot; in API group \&quot;apiregistration.k8s.io\&quot; at the cluster scope&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;KubePug requires running user to have &quot;list&quot; permissions on resource &quot;apiservices&quot; in API group &quot;apiregistration.k8s.io&quot; at the cluster scope as otherwise the above error will appear.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If required permissions are in place:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% &lt;b&gt;kubectl deprecations --k8s-version=v1.33&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;No deprecated or deleted APIs found&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;Kubepug validates the APIs using Kubernetes markers. To know what are the deprecated and deleted APIS it checks, please go to https://kubepug.xyz/status/&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Scan Local Manifest Files&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Validate static YAML files before applying them to a cluster:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl deprecations --input-file=./my-manifests/&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;View Results in Different Formats&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Output the findings in json or yaml for automated processing:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl deprecations --format=json&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Check for Help and Flags&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;See all available configuration options, such as using a custom database file or setting error codes:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl deprecations --help&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Key Parameters&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;--k8s-version&lt;/span&gt;: The Kubernetes release you intend to upgrade to (defaults to the latest stable).&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;--error-on-deprecated&lt;/span&gt;: Forces the command to exit with an error code if deprecated APIs are found, which is useful for CI/CD pipelines.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;---&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.bojankomazec.com/feeds/7241423173796574006/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4912226416400969049/7241423173796574006' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/7241423173796574006'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/7241423173796574006'/><link rel='alternate' type='text/html' href='http://www.bojankomazec.com/2026/02/introduction-to-kubepug-kubernetes-tool.html' title='Introduction to KubePug (Kubernetes tool)'/><author><name>Bojan Komazec</name><uri>http://www.blogger.com/profile/05437236807206825832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkIR8lF1DIWDWeizFBBYSUqIzvoFP5rglXWGsybk_bh3byjh5cKFdy933jrItHUh0h2YW74461QtBPD7eQxRuYAvNUOJuP3AFyz3Jcqwanm1rbFBAezG0LvrVQtRIxpbGXyH0v8UnX6rh6bLBdH0hWCqEkyrXoct9v_jjiv_qlgSQQI1w2uGAHonLn8LA/s72-w640-h458-c/kubepug.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4912226416400969049.post-6942889768486125371</id><published>2026-02-26T14:15:00.008+00:00</published><updated>2026-02-26T14:15:55.195+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DevOps"/><category scheme="http://www.blogger.com/atom/ns#" term="Krew"/><category scheme="http://www.blogger.com/atom/ns#" term="kubectl"/><category scheme="http://www.blogger.com/atom/ns#" term="Kubernetes"/><title type='text'>Introduction to Krew (Kubernetes tool)</title><content type='html'>&lt;div style=&quot;text-align: left;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-8zz_xMb_zIJVWsT1O8qq_3uwCjifRGudwea3z99R_qnccY-s-QRiGG4nFPCbBdSHrnEPoFeHhJp40B66Hda-wmK7oX7HQf63BFuzkacRl4EthdYf0315E2ft-0URBpfUaD6M40KEI5OzOG2zeUaexS3PuLdaVfDb4wr4zjAYOlDWULomA2TGNXH9DcM/s1542/Screenshot%202026-02-26%20at%2014.13.13.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;542&quot; data-original-width=&quot;1542&quot; height=&quot;224&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-8zz_xMb_zIJVWsT1O8qq_3uwCjifRGudwea3z99R_qnccY-s-QRiGG4nFPCbBdSHrnEPoFeHhJp40B66Hda-wmK7oX7HQf63BFuzkacRl4EthdYf0315E2ft-0URBpfUaD6M40KEI5OzOG2zeUaexS3PuLdaVfDb4wr4zjAYOlDWULomA2TGNXH9DcM/w640-h224/Screenshot%202026-02-26%20at%2014.13.13.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div&gt;Krew is the official plugin manager for the kubectl command-line tool. Much like apt for Debian or Homebrew for macOS, it allows users to easily discover, install, and manage custom extensions that add new subcommands to Kubernetes.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Core Functionality&lt;/h2&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Discovery: Users can search a community-curated index of over 200 plugins designed for tasks like security auditing, resource visualization, and cluster management.&lt;/li&gt;&lt;li&gt;Lifecycle Management: It automates the process of installing, updating, and removing plugins across different operating systems (Linux, macOS, and Windows).&lt;/li&gt;&lt;li&gt;Unified Interface: Once a plugin is installed via Krew, it is invoked directly through kubectl (e.g., kubectl &amp;lt;plugin-name&amp;gt;).&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Installation&lt;/h2&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;MacOS example output:&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% &lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;b&gt;&amp;nbsp; set -x; cd &quot;$(mktemp -d)&quot; &amp;amp;&amp;amp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;b&gt;&amp;nbsp; OS=&quot;$(uname | tr &#39;[:upper:]&#39; &#39;[:lower:]&#39;)&quot; &amp;amp;&amp;amp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;b&gt;&amp;nbsp; ARCH=&quot;$(uname -m | sed -e &#39;s/x86_64/amd64/&#39; -e &#39;s/\(arm\)\(64\)\?.*/\1\2/&#39; -e &#39;s/aarch64$/arm64/&#39;)&quot; &amp;amp;&amp;amp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;b&gt;&amp;nbsp; KREW=&quot;krew-${OS}_${ARCH}&quot; &amp;amp;&amp;amp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;b&gt;&amp;nbsp; curl -fsSLO &quot;https://github.com/kubernetes-sigs/krew/releases/latest/download/${KREW}.tar.gz&quot; &amp;amp;&amp;amp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;b&gt;&amp;nbsp; tar zxvf &quot;${KREW}.tar.gz&quot; &amp;amp;&amp;amp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;b&gt;&amp;nbsp; ./&quot;${KREW}&quot; install krew&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;+-zsh:142&amp;gt; mktemp -d&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;+-zsh:142&amp;gt; cd /var/folders/8j/60m6_18j359_39ls0sr9ccvm0000gp/T/tmp.LKDSyQcO10&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;+-zsh:143&amp;gt; OS=+-zsh:143&amp;gt; uname&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;+-zsh:143&amp;gt; OS=+-zsh:143&amp;gt; tr &#39;[:upper:]&#39; &#39;[:lower:]&#39;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;+-zsh:143&amp;gt; OS=darwin&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;+-zsh:144&amp;gt; ARCH=+-zsh:144&amp;gt; uname -m&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;+-zsh:144&amp;gt; ARCH=+-zsh:144&amp;gt; sed -e s/x86_64/amd64/ -e &#39;s/\(arm\)\(64\)\?.*/\1\2/&#39; -e &#39;s/aarch64$/arm64/&#39;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;+-zsh:144&amp;gt; ARCH=arm64&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;+-zsh:145&amp;gt; KREW=krew-darwin_arm64&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;+-zsh:146&amp;gt; curl -fsSLO https://github.com/kubernetes-sigs/krew/releases/latest/download/krew-darwin_arm64.tar.gz&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;+-zsh:147&amp;gt; tar zxvf krew-darwin_arm64.tar.gz&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;x ./LICENSE&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;x ./krew-darwin_arm64&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;+-zsh:148&amp;gt; ./krew-darwin_arm64 install krew&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;Adding &quot;default&quot; plugin index from https://github.com/kubernetes-sigs/krew-index.git.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;Updated the local copy of plugin index.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;Installing plugin: krew&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;Installed plugin: krew&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;\&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp;| Use this plugin:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp;| &lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;kubectl krew&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp;| Documentation:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp;| &lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;https://krew.sigs.k8s.io/&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp;| Caveats:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp;| \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp;|&amp;nbsp; | krew is now installed! To start using kubectl plugins, you need to add&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp;|&amp;nbsp; | krew&#39;s installation directory to your PATH:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp;|&amp;nbsp; |&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp;|&amp;nbsp; |&amp;nbsp; &amp;nbsp;* macOS/Linux:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp;|&amp;nbsp; |&amp;nbsp; &amp;nbsp; &amp;nbsp;- Add the following to your ~/.bashrc or ~/.zshrc:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp;|&amp;nbsp; |&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;export PATH=&quot;${KREW_ROOT:-$HOME/.krew}/bin:$PATH&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp;|&amp;nbsp; |&amp;nbsp; &amp;nbsp; &amp;nbsp;- Restart your shell.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp;|&amp;nbsp; |&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp;|&amp;nbsp; |&amp;nbsp; &amp;nbsp;* Windows: Add %USERPROFILE%\.krew\bin to your PATH environment variable&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp;|&amp;nbsp; |&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp;|&amp;nbsp; | To list krew commands and to get help, run:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp;|&amp;nbsp; |&amp;nbsp; &amp;nbsp;$ kubectl krew&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp;|&amp;nbsp; | For a full list of available plugins, run:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp;|&amp;nbsp; |&amp;nbsp; &amp;nbsp;$ kubectl krew search&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp;|&amp;nbsp; |&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp;|&amp;nbsp; | You can find documentation at&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp;|&amp;nbsp; |&amp;nbsp; &amp;nbsp;https://krew.sigs.k8s.io/docs/user-guide/quickstart/.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp;| /&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;/&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Add Krew path to PATHs:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% &lt;b&gt;vi ~/.zshrc&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% &lt;b&gt;cat ~/.zshrc&amp;nbsp; &amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;export PATH=&quot;${KREW_ROOT:-$HOME/.krew}/bin:$PATH&quot; &lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;lt;-- added manually&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Reload .zshrc configuration file within the currently running Zsh terminal (or just restart the terminal):&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% &lt;b&gt;source ~/.zshrc&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Installation verification:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% &lt;b&gt;kubectl krew&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;krew is the kubectl plugin manager.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;You can invoke krew through kubectl: &quot;kubectl krew [command]...&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;Usage:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; kubectl krew [command]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;Available Commands:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; help&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Help about any command&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; index&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Manage custom plugin indexes&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; info&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Show information about an available plugin&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; install&amp;nbsp; &amp;nbsp; &amp;nbsp;Install kubectl plugins&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; list&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; List installed kubectl plugins&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; search&amp;nbsp; &amp;nbsp; &amp;nbsp; Discover kubectl plugins&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; uninstall&amp;nbsp; &amp;nbsp;Uninstall plugins&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; update&amp;nbsp; &amp;nbsp; &amp;nbsp; Update the local copy of the plugin index&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; upgrade&amp;nbsp; &amp;nbsp; &amp;nbsp;Upgrade installed plugins to newer versions&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; version&amp;nbsp; &amp;nbsp; &amp;nbsp;Show krew version and diagnostics&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;Flags:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; -h, --help&amp;nbsp; &amp;nbsp; &amp;nbsp; help for krew&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; -v, --v Level&amp;nbsp; &amp;nbsp;number for the log level verbosity&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;Use &quot;kubectl krew [command] --help&quot; for more information about a command.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Common Commands&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To use Krew, you must first install it as a kubectl plugin itself. Key commands include:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;kubectl krew update&lt;/span&gt;: Updates the local list of available plugins.&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;kubectl krew search&lt;/span&gt;: Finds plugins in the official Krew index.&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;kubectl krew install &amp;lt;plugin&amp;gt;&lt;/span&gt;: Installs a specific plugin.&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;kubectl krew list&lt;/span&gt;: Displays all plugins currently installed through Krew.&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;kubectl krew upgrade&lt;/span&gt;: Updates all installed plugins to their latest versions.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Example:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% &lt;b&gt;kubectl krew install deprecations&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;Updated the local copy of plugin index.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;Installing plugin: deprecations&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;Installed plugin: deprecations&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;\&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp;| Use this plugin:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp;| &lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;kubectl deprecations&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp;| Documentation:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp;| &lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;https://github.com/rikatz/kubepug&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp;| Caveats:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp;| \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp;|&amp;nbsp; | * By default, deprecations finds deprecated object relative to the current kubernetes&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp;|&amp;nbsp; | master branch. To target a different kubernetes release, use the --k8s-version&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp;|&amp;nbsp; | argument.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp;|&amp;nbsp; |&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp;|&amp;nbsp; | * Deprecations needs permission to GET all objects in the Cluster&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp;| /&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;/&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #ffa400; font-family: courier; font-size: x-small;&quot;&gt;WARNING: You installed plugin &quot;deprecations&quot; from the krew-index plugin repository.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #ffa400; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;These plugins are not audited for security by the Krew maintainers.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #ffa400; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;Run them at your own risk.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Popular Plugins Managed by Krew&amp;nbsp;&lt;/h2&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;ctx / ns: Rapidly switch between Kubernetes contexts and namespaces.&lt;/li&gt;&lt;li&gt;tree: Visualizes the hierarchy of Kubernetes resources in a tree view.&lt;/li&gt;&lt;li&gt;access-matrix: Displays an RBAC (Role-Based Access Control) matrix for server resources.&lt;/li&gt;&lt;li&gt;get-all: Lists all resources in a namespace, including those often missed by kubectl get all.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Note on Security (!)&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Plugins in the Krew index are community-contributed and are not audited for security by the Kubernetes maintainers; you should only install plugins from sources you trust.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;---&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.bojankomazec.com/feeds/6942889768486125371/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4912226416400969049/6942889768486125371' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/6942889768486125371'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/6942889768486125371'/><link rel='alternate' type='text/html' href='http://www.bojankomazec.com/2026/02/introduction-to-krew-kubernetes-tool.html' title='Introduction to Krew (Kubernetes tool)'/><author><name>Bojan Komazec</name><uri>http://www.blogger.com/profile/05437236807206825832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-8zz_xMb_zIJVWsT1O8qq_3uwCjifRGudwea3z99R_qnccY-s-QRiGG4nFPCbBdSHrnEPoFeHhJp40B66Hda-wmK7oX7HQf63BFuzkacRl4EthdYf0315E2ft-0URBpfUaD6M40KEI5OzOG2zeUaexS3PuLdaVfDb4wr4zjAYOlDWULomA2TGNXH9DcM/s72-w640-h224-c/Screenshot%202026-02-26%20at%2014.13.13.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4912226416400969049.post-773533718585702891</id><published>2026-02-26T13:03:00.001+00:00</published><updated>2026-03-19T15:14:56.410+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DevOps"/><category scheme="http://www.blogger.com/atom/ns#" term="Kubernetes"/><category scheme="http://www.blogger.com/atom/ns#" term="Pluto"/><title type='text'>Introduction to Pluto (Kubernetes tool)</title><content type='html'>&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgctFZO1cikInSdsmgyQvuhLMC4EFcsz_1174ueKDzd1XZ2lnKkVkmnKn9pPG5thoCx2Tgjp03mCuce0B6eVKpSEX5Tyb8EmGxhCXx6JlE2X6j8ND06QZQsrLcwk3ImfSmvqq_ncs6zkfhtq4M38_x0Z-SOSCtNlkiVorHc6lk3_Ei3f8_vDXJB2zMp65U/s914/pluto-logo.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;380&quot; data-original-width=&quot;914&quot; height=&quot;266&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgctFZO1cikInSdsmgyQvuhLMC4EFcsz_1174ueKDzd1XZ2lnKkVkmnKn9pPG5thoCx2Tgjp03mCuce0B6eVKpSEX5Tyb8EmGxhCXx6JlE2X6j8ND06QZQsrLcwk3ImfSmvqq_ncs6zkfhtq4M38_x0Z-SOSCtNlkiVorHc6lk3_Ei3f8_vDXJB2zMp65U/w640-h266/pluto-logo.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;https://github.com/FairwindsOps/pluto?tab=readme-ov-file&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Pluto&lt;/a&gt; is:&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;CLI tool that helps users find deprecated Kubernetes API versions in your code repositories and Helm releases.&amp;nbsp;&lt;/li&gt;&lt;li&gt;It&#39;s especially useful when upgrading Kubernetes clusters, as it identifies resources that need updating before the upgrade.&lt;/li&gt;&lt;li&gt;It works against:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Live clusters&lt;/li&gt;&lt;li&gt;Helm charts&lt;/li&gt;&lt;li&gt;Raw YAML&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Pluto will show which APIs are deprecated or removed, what version they were deprecated in, and what the replacement API should be.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Installation on Mac (https://pluto.docs.fairwinds.com/installation/#homebrew-tap):&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% &lt;b&gt;brew install FairwindsOps/tap/pluto&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Let&#39;s see its CLI arguments:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% &lt;b&gt;pluto&lt;/b&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;You must specify a sub-command.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;A tool to detect Kubernetes apiVersions&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;Usage:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; pluto [flags]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; pluto [command]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;Available Commands:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; completion&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Generate the autocompletion script for the specified shell&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; detect&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Checks a single file or stdin for deprecated apiVersions.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; detect-all-in-cluster run all in-cluster detections&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; detect-api-resources&amp;nbsp; detect-api-resources&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; detect-files&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; detect-files&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; detect-helm&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;detect-helm&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; help&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Help about any command&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; list-versions&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Outputs a JSON object of the versions that Pluto knows about.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; version&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Prints the current version of the tool.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;Flags:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; -f, --additional-versions string&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Additional deprecated versions file to add to the list. Cannot contain any existing versions&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; --columns strings&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A list of columns to print. Mandatory when using --output custom, optional with --output markdown&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; --components strings&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; A list of components to run checks for. If nil, will check for all found in versions.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; -h, --help&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; help for pluto&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; --ignore-deprecations&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Ignore the default behavior to exit 2 if deprecated apiVersions are found. (Only show removed APIs, not just deprecated ones)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; --ignore-removals&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Ignore the default behavior to exit 3 if removed apiVersions are found. (Only show deprecated APIs, not removed ones)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; --ignore-unavailable-replacements&amp;nbsp; &amp;nbsp;Ignore the default behavior to exit 4 if deprecated but unavailable apiVersions are found.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; -H, --no-headers&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; When using the default or custom-column output format, don&#39;t print headers (default print headers).&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; -r, --only-show-removed&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Only display the apiVersions that have been removed in the target version.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &lt;b&gt;-o&lt;/b&gt;, --output string&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;The output format to use. (normal|&lt;b&gt;wide&lt;/b&gt;|custom|json|yaml|markdown|csv) (default &quot;normal&quot;)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; -t, &lt;b&gt;--target-versions&lt;/b&gt; stringToString&amp;nbsp; &amp;nbsp; A map of targetVersions to use. This flag supersedes all defaults in version files. (default [])&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; -v, --v Level&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;number for the log level verbosity&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;Use &quot;pluto [command] --help&quot; for more information about a command.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;detect-files&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If we want to scan local Helm charts or manifest files before they are deployed, we can use &lt;span style=&quot;font-family: courier;&quot;&gt;pluto detect-files&lt;/span&gt; or &lt;span style=&quot;font-family: courier;&quot;&gt;pluto detect&lt;/span&gt;, which do require us to be in the correct directory or provide a file path.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To scan and detect deprecated APIs in manifest files in a directory:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% &lt;b&gt;pluto detect-files -d /path/to/your/manifests&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;detect-files&lt;/span&gt; is for checking YAML files in our repositories/filesystem before deploying them - that&#39;s separate from detect-helm and&amp;nbsp;detect-all-in-cluster cluster commands.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To target particular k8s version:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% &lt;b&gt;pluto detect-files -d . --target-versions k8s=v1.33.0&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If we use Terraform to deploy Helm charts, we might want to keep chart values in separate files (.yaml or .yaml.tpl) as otherwise we won&#39;t be able to use Pluto directly (we&#39;d need to extract values into files first). For more details, see&amp;nbsp;&lt;a href=&quot;https://www.bojankomazec.com/2026/02/where-to-keep-helm-chart-values-in.html&quot;&gt;Where to keep Helm chart values in Terraform projects | My Public Notepad&lt;/a&gt;.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;detect-helm&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To check Helm releases in the cluster (already deployed):&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% &lt;b&gt;pluto detect-helm -owide&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To target particular k8s version:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% &lt;b&gt;pluto detect-helm -owide --target-versions k8s=v1.33.0&amp;nbsp;&lt;/b&gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;There were no resources found with known deprecated apiVersions.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;detect-helm&lt;/span&gt; specifically checks Helm release metadata stored in our cluster (in secrets or configmaps) after Helm chart have been deployed. It looks at the manifests that Helm used to install releases, which might contain deprecated APIs even if they haven&#39;t been applied yet or are stored in Helm&#39;s history.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This command can be run from any directory. This is because the &lt;span style=&quot;font-family: courier;&quot;&gt;detect-helm&lt;/span&gt; command scans live Helm releases currently deployed in our Kubernetes cluster, rather than looking for local files on our machine. Instead of relying on our current working directory, the command depends on our Kubernetes context (the cluster our CLI is currently pointed at) and our local Helm configuration to communicate with the cluster.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;While the directory doesn&#39;t matter, the following must be true for the command to work:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Active Kubernetes Context: Your kubectl context must be set to the target cluster.&lt;/li&gt;&lt;li&gt;Cluster Permissions: You must have sufficient RBAC permissions to read Secrets in the namespaces you wish to scan, as Helm 3 stores release information in cluster secrets.&lt;/li&gt;&lt;li&gt;Target Versioning: The --target-versions k8s=v1.33.0 flag tells Pluto to check for APIs that are deprecated or removed specifically in Kubernetes version 1.33.0, regardless of what version the cluster is actually running&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;detect-all-in-cluster&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To check all resources in the cluster:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% pluto &lt;b&gt;detect-all-in-cluster&lt;/b&gt; -o wide&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;I0226 12:01:02.279788&amp;nbsp; &amp;nbsp;47100 warnings.go:110] &quot;Warning: v1 ComponentStatus is deprecated in v1.19+&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;There were no resources found with known deprecated apiVersions.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;detect-all-in-cluster&lt;/span&gt; scans all live resources currently running in our cluster by querying the Kubernetes API directly. It checks deployments, services, pods, etc. that are actively deployed.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;detect-all-in-cluster&lt;/span&gt; does NOT include &lt;span style=&quot;font-family: courier;&quot;&gt;detect-helm&lt;/span&gt; or &lt;span style=&quot;font-family: courier;&quot;&gt;detect-files&lt;/span&gt;. Here&#39;s why they&#39;re separate:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;detect-all-in-cluster sees the current state of resources&lt;/li&gt;&lt;li&gt;detect-helm sees Helm&#39;s stored templates and history, which may include:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Templated manifests that haven&#39;t been rendered yet&lt;/li&gt;&lt;li&gt;Old release revisions&lt;/li&gt;&lt;li&gt;Chart templates with deprecated APIs&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Run both to get complete coverage!&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Target a specific Kubernetes version:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% pluto detect-all-in-cluster --target-versions k8s=v1.33.0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;I0226 12:02:26.551401&amp;nbsp; &amp;nbsp;47113 warnings.go:110] &quot;Warning: v1 ComponentStatus is deprecated in v1.19+&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;There were no resources found with known deprecated apiVersions.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;The warning message:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #ffa400; font-family: courier;&quot;&gt;Warning: v1 ComponentStatus is deprecated in v1.19+&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This is just Pluto itself triggering a Kubernetes API warning while scanning - it&#39;s not something wrong with our cluster resources.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The main result:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;There were no resources found with known deprecated apiVersions.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This means all our cluster resources are using API versions that are still valid in Kubernetes v1.33.0 (our target version). This means:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Our cluster resources are already compatible with k8s v1.33.0&lt;/li&gt;&lt;li&gt;No manifests need updating before upgrading&lt;/li&gt;&lt;li&gt;No deprecated APIs that would be removed in v1.33.0&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To be thorough before a k8s upgrade, we need to run all three commands:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;detect-files&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;detect-helm&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;detect-all-in-cluster&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;---&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.bojankomazec.com/feeds/773533718585702891/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4912226416400969049/773533718585702891' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/773533718585702891'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/773533718585702891'/><link rel='alternate' type='text/html' href='http://www.bojankomazec.com/2026/02/introduction-to-pluto-kubernetes-tool.html' title='Introduction to Pluto (Kubernetes tool)'/><author><name>Bojan Komazec</name><uri>http://www.blogger.com/profile/05437236807206825832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgctFZO1cikInSdsmgyQvuhLMC4EFcsz_1174ueKDzd1XZ2lnKkVkmnKn9pPG5thoCx2Tgjp03mCuce0B6eVKpSEX5Tyb8EmGxhCXx6JlE2X6j8ND06QZQsrLcwk3ImfSmvqq_ncs6zkfhtq4M38_x0Z-SOSCtNlkiVorHc6lk3_Ei3f8_vDXJB2zMp65U/s72-w640-h266-c/pluto-logo.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4912226416400969049.post-2547510545340306160</id><published>2026-02-26T13:02:00.001+00:00</published><updated>2026-02-26T13:02:33.302+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DevOps"/><category scheme="http://www.blogger.com/atom/ns#" term="Helm"/><category scheme="http://www.blogger.com/atom/ns#" term="Kubernetes"/><category scheme="http://www.blogger.com/atom/ns#" term="Terraform"/><title type='text'>Where to keep Helm chart values in Terraform projects</title><content type='html'>&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiTiPvI-D1ZteSQf2ADyvs1WFtBgeC-S8tPZM1jSMVk-cs7Vs_wsrvckPiG3nnCJwCsJbfaaLEyW1adfeEbB7RJOaZkUOf39eNOo-8rnSe36blaSFeA0FUJTXxhF6CMhxxtaUoFVoO93I4vJN0l8mbIY3qCpyfvZfR88T-uvH1XDbsK0N0aQk5TjrXj7XU&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;512&quot; data-original-width=&quot;512&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiTiPvI-D1ZteSQf2ADyvs1WFtBgeC-S8tPZM1jSMVk-cs7Vs_wsrvckPiG3nnCJwCsJbfaaLEyW1adfeEbB7RJOaZkUOf39eNOo-8rnSe36blaSFeA0FUJTXxhF6CMhxxtaUoFVoO93I4vJN0l8mbIY3qCpyfvZfR88T-uvH1XDbsK0N0aQk5TjrXj7XU=w640-h640&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;If we use Terraform to deploy Helm charts, we might be using one of these strategies to keep chart values:&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Values are in inline YAML string&lt;/li&gt;&lt;li&gt;Values in separate .yaml file&lt;/li&gt;&lt;li&gt;Values in separate&amp;nbsp;YAML Template files (.yaml.tpl)&lt;/li&gt;&lt;li&gt;Use Helm&#39;s set for Dynamic Values&lt;/li&gt;&lt;li&gt;Multiple Values Files&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;(1) Values in inline YAML string&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This is not ideal as problems with Inline YAML in Terraform include:&lt;br /&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;No syntax highlighting or validation - Easy to break YAML formatting&lt;/li&gt;&lt;li&gt;Hard to review in diffs - Changes are messy in PRs&lt;/li&gt;&lt;li&gt;Can&#39;t use standard tooling - No yamllint,&amp;nbsp;&lt;b&gt;Pluto&lt;/b&gt;, or other YAML tools&lt;/li&gt;&lt;li&gt;Mixing concerns - Infrastructure code mixed with application config&lt;/li&gt;&lt;li&gt;Escaping nightmares - Terraform string interpolation conflicts with Helm templating&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Example:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;resource &quot;helm_release&quot; &quot;app&quot; {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; values = [&amp;lt;&amp;lt;-EOT&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; replicaCount: ${var.replicas}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; image:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; repository: myapp&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; tag: ${var.tag}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; service:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; type: LoadBalancer&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; EOT&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; ]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;(2) Separate Values Files&amp;nbsp;&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Keep values in YAML files, reference them in Terraform.&lt;/div&gt;&lt;div&gt;This is a better approach because:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Clean separation&lt;/li&gt;&lt;li&gt;Easy to validate with standard tools&lt;/li&gt;&lt;li&gt;Better diffs&lt;/li&gt;&lt;li&gt;Can use Pluto directly: pluto detect-files -d .&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Example:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;main.tf:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;resource &quot;helm_release&quot; &quot;my_app&quot; {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; name&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= &quot;my-app&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; chart&amp;nbsp; &amp;nbsp; &amp;nbsp; = &quot;my-chart&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; repository = &quot;https://charts.example.com&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; values = [&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; file(&quot;${path.module}/helm-values.yaml&quot;)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; ]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;(3) Templated Values Files&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;p class=&quot;font-claude-response-body break-words whitespace-normal leading-[1.7]&quot;&gt;Use Terraform&#39;s &lt;span style=&quot;font-family: courier;&quot;&gt;templatefile()&lt;/span&gt; to inject dynamic values:&lt;/p&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;helm-values.yaml.tpl:&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;replicaCount: ${replica_count}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;image:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; repository: ${image_repo}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; tag: ${image_tag}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;ingress:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; enabled: ${enable_ingress}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; host: ${hostname}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;main.tf:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;resource &quot;helm_release&quot; &quot;my_app&quot; {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; name&amp;nbsp; = &quot;my-app&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; chart = &quot;my-chart&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; values = [&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; templatefile(&quot;${path.module}/helm-values.yaml.tpl&quot;, {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; replica_count&amp;nbsp; = var.replica_count&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; image_repo&amp;nbsp; &amp;nbsp; &amp;nbsp;= var.image_repository&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; image_tag&amp;nbsp; &amp;nbsp; &amp;nbsp; = var.image_tag&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; enable_ingress = var.enable_ingress&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; hostname&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= var.hostname&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; })&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; ]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;p class=&quot;font-claude-response-body break-words whitespace-normal leading-[1.7]&quot;&gt;Pros:&lt;/p&gt;&lt;ul class=&quot;[li_&amp;amp;]:mb-0 [li_&amp;amp;]:mt-1 [li_&amp;amp;]:gap-1 [&amp;amp;:not(:last-child)_ul]:pb-1 [&amp;amp;:not(:last-child)_ol]:pb-1 list-disc flex flex-col gap-1 pl-8 mb-3&quot;&gt;&lt;li class=&quot;whitespace-normal break-words pl-2&quot;&gt;Still gets variable injection&lt;/li&gt;&lt;li class=&quot;whitespace-normal break-words pl-2&quot;&gt;Can be validated as YAML (with placeholders)&lt;/li&gt;&lt;li class=&quot;whitespace-normal break-words pl-2&quot;&gt;Clean and readable&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;(4) Use Helm&#39;s set for Dynamic Values&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Keep static config in files, override specific values:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;resource &quot;helm_release&quot; &quot;my_app&quot; {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; name&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= &quot;my-app&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; chart&amp;nbsp; &amp;nbsp; &amp;nbsp; = &quot;my-chart&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; # Base values from file&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; values = [&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; file(&quot;${path.module}/helm-values.yaml&quot;)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; ]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; # Override specific values dynamically&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; set {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; name&amp;nbsp; = &quot;image.tag&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; value = var.image_tag&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; set {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; name&amp;nbsp; = &quot;replicaCount&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; value = var.replica_count&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; set_sensitive {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; name&amp;nbsp; = &quot;secret.password&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; value = var.db_password&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Pros:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Clear what&#39;s dynamic vs static&lt;/li&gt;&lt;li&gt;Base values file can be validated&lt;/li&gt;&lt;li&gt;Sensitive values handled properly&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Here is the example how we can migrate inline YAML from the above to templated file:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;helm-values.yaml:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;image:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; repository: myapp&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;service:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; type: LoadBalancer&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;main.tf:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;resource &quot;helm_release&quot; &quot;app&quot; {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; values = [&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; file(&quot;${path.module}/helm-values.yaml&quot;)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; ]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; set {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; name&amp;nbsp; = &quot;replicaCount&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; value = var.replicas&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; set {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; name&amp;nbsp; = &quot;image.tag&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; value = var.tag&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now we can run:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% pluto detect-files -f helm-values.yaml&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;(5) Multiple Values Files&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We can layer our configuration:&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;resource &quot;helm_release&quot; &quot;my_app&quot; {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; name&amp;nbsp; = &quot;my-app&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; chart = &quot;my-chart&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; values = [&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; file(&quot;${path.module}/helm-values-base.yaml&quot;),&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; file(&quot;${path.module}/helm-values-${var.environment}.yaml&quot;)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; ]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;---&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.bojankomazec.com/feeds/2547510545340306160/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4912226416400969049/2547510545340306160' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/2547510545340306160'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/2547510545340306160'/><link rel='alternate' type='text/html' href='http://www.bojankomazec.com/2026/02/where-to-keep-helm-chart-values-in.html' title='Where to keep Helm chart values in Terraform projects'/><author><name>Bojan Komazec</name><uri>http://www.blogger.com/profile/05437236807206825832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEiTiPvI-D1ZteSQf2ADyvs1WFtBgeC-S8tPZM1jSMVk-cs7Vs_wsrvckPiG3nnCJwCsJbfaaLEyW1adfeEbB7RJOaZkUOf39eNOo-8rnSe36blaSFeA0FUJTXxhF6CMhxxtaUoFVoO93I4vJN0l8mbIY3qCpyfvZfR88T-uvH1XDbsK0N0aQk5TjrXj7XU=s72-w640-h640-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4912226416400969049.post-1967285022205863794</id><published>2026-02-26T11:07:00.002+00:00</published><updated>2026-02-26T11:21:01.135+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DevOps"/><category scheme="http://www.blogger.com/atom/ns#" term="Kubent"/><category scheme="http://www.blogger.com/atom/ns#" term="Kubernetes"/><title type='text'>Introduction to Kubent (Kube No Trouble)</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguB41-QWSneCrCvtgpyBbniO0DArgmPNDic2AZzdU4lS8EVVV2U9mLvD0yk0eTLdrkNEN9YG8JxBcutax1G-i6QG6Ch9o0RoHOhBYuebUswUGy1WHY_PZiBghkShaki9YJN-s-eBHBu8dIxPiFsyPxgGLC73qwHSGE1yZshXRl-POtBSqpQguWs8QhQoM/s2206/Screenshot%202026-02-26%20at%2007.50.05.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1320&quot; data-original-width=&quot;2206&quot; height=&quot;382&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguB41-QWSneCrCvtgpyBbniO0DArgmPNDic2AZzdU4lS8EVVV2U9mLvD0yk0eTLdrkNEN9YG8JxBcutax1G-i6QG6Ch9o0RoHOhBYuebUswUGy1WHY_PZiBghkShaki9YJN-s-eBHBu8dIxPiFsyPxgGLC73qwHSGE1yZshXRl-POtBSqpQguWs8QhQoM/w640-h382/Screenshot%202026-02-26%20at%2007.50.05.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;Kubent&amp;nbsp;(Kube No Trouble)&amp;nbsp; [this link was the original repo, see comments below] is a tool which scans k8s cluster and reports resources that use deprecated or removed Kubernetes APIs, based on the target Kubernetes version. It’s especially useful before upgrading (e.g., EKS 1.32 → 1.33)&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;WARNING: Development at project&#39;s original repo (&lt;a href=&quot;https://github.com/doitintl/kube-no-trouble&quot;&gt;https://github.com/doitintl/kube-no-trouble&lt;/a&gt;) is not active anymore as the last commit was in January 2025. The original author announced &lt;a href=&quot;https://github.com/doitintl/kube-no-trouble/issues/732&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt; that they would be moving development to&amp;nbsp;&lt;a href=&quot;https://github.com/dark0dave/kube-no-trouble &quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://github.com/dark0dave/kube-no-trouble &lt;/a&gt;and that repo is ssemingly active as of today (last change was ) BUT&amp;nbsp;&lt;a href=&quot;https://github.com/dark0dave/kube-no-trouble/tree/301e5783904de5966f79b217a956651146630f50/pkg/rules/rego&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://github.com/dark0dave/kube-no-trouble/tree/301e5783904de5966f79b217a956651146630f50/pkg/rules/rego&lt;/a&gt; shows that rulesets only up to v1.32 were added (!).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Kube No Trouble relies on static Rego rule files in the repo. If new Kubernetes versions (e.g., &amp;gt;1.32) don’t have updated rules, then:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;It won’t know about newly deprecated APIs&lt;/li&gt;&lt;li&gt;It won’t know about newly removed APIs&lt;/li&gt;&lt;li&gt;--target-version becomes unreliable for newer releases&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For modern upgrades (especially 1.32 → 1.33+), kubent is no longer the safest tool.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;To install it:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% &lt;b&gt;sh -c &quot;$(curl -sSL https://git.io/install-kubent)&quot;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; kubent installation script &amp;lt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;gt; Detecting latest version&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;gt; Downloading version 0.7.3&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;Target directory (/usr/local/bin) is not writable, trying to use sudo&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;Password:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; % Total&amp;nbsp; &amp;nbsp; % Received % Xferd&amp;nbsp; Average Speed&amp;nbsp; &amp;nbsp;Time&amp;nbsp; &amp;nbsp; Time&amp;nbsp; &amp;nbsp; &amp;nbsp;Time&amp;nbsp; Current&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dload&amp;nbsp; Upload&amp;nbsp; &amp;nbsp;Total&amp;nbsp; &amp;nbsp;Spent&amp;nbsp; &amp;nbsp; Left&amp;nbsp; Speed&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; 0&amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; &amp;nbsp; 0 --:--:-- --:--:-- --:--:--&amp;nbsp; &amp;nbsp; &amp;nbsp;0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;100 12.4M&amp;nbsp; 100 12.4M&amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; 14.7M&amp;nbsp; &amp;nbsp; &amp;nbsp; 0 --:--:-- --:--:-- --:--:-- 13.2M&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;gt; Done. kubent was installed to /usr/local/bin/.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To verify installation:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% &lt;b&gt;kubent --version&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;7:48AM INF version 0.7.3 (git sha 57480c07b3f91238f12a35d0ec88d9368aae99aa)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To check CLI arguments:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% &lt;b&gt;kubent --help&amp;nbsp; &lt;/b&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;Usage of kubent:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; -A, --additional-annotation strings&amp;nbsp; &amp;nbsp;additional annotations that should be checked to determine the last applied config&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; -a, --additional-kind strings&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;additional kinds of resources to report in Kind.version.group.com format&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; -c, --cluster&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;enable Cluster collector (default true)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; -x, --context string&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; kubeconfig context&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; -e, --exit-error&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; exit with non-zero code when issues are found&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; -f, --filename strings&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; manifests to check, use - for stdin&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; --helm3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;enable Helm v3 collector (default true)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; -k, --kubeconfig string&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;path to the kubeconfig file&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; -l, --log-level string&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set log level (trace, debug, info, warn, error, fatal, panic, disabled) (default &quot;info&quot;)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; -o, --output string&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;output format - [text|json|csv] (default &quot;text&quot;)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; -O, --output-file string&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; output file, use - for stdout (default &quot;-&quot;)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; -t, --target-version string&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;target K8s version in SemVer format (autodetected by default)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; -v, --version&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;prints the version of kubent and exits&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;pflag: help requested&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It looks at&amp;nbsp;default &lt;span style=&quot;font-family: courier;&quot;&gt;~/.kube/config&lt;/span&gt; file in order to find the current context, otherwise use &lt;span style=&quot;font-family: courier;&quot;&gt;-k &lt;/span&gt;to specify kubeconfig at non-default location.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% &lt;b&gt;kubent&lt;/b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;7:59AM INF &amp;gt;&amp;gt;&amp;gt; Kube No Trouble `kubent` &amp;lt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;7:59AM INF version 0.7.3 (git sha 57480c07b3f91238f12a35d0ec88d9368aae99aa)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;7:59AM INF Initializing collectors and retrieving data&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;7:59AM INF Target K8s version is 1.32.11-eks-ac2d5a0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;7:59AM INF Retrieved 12 resources from collector name=Cluster&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;8:00AM INF Retrieved 361 resources from collector name=&quot;Helm v3&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;8:00AM INF Loaded ruleset name=custom.rego.tmpl&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;8:00AM INF Loaded ruleset name=deprecated-1-16.rego&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;8:00AM INF Loaded ruleset name=deprecated-1-22.rego&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;8:00AM INF Loaded ruleset name=deprecated-1-25.rego&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;8:00AM INF Loaded ruleset name=deprecated-1-26.rego&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;8:00AM INF Loaded ruleset name=deprecated-1-27.rego&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;8:00AM INF Loaded ruleset name=deprecated-1-29.rego&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;8:00AM INF Loaded ruleset name=deprecated-1-32.rego&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;8:00AM INF Loaded ruleset name=deprecated-future.rego&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Running &lt;span style=&quot;font-family: courier;&quot;&gt;kubent&lt;/span&gt; with no other arguments:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Connects to your current kube-context&lt;/li&gt;&lt;li&gt;Detects your cluster version automatically&lt;/li&gt;&lt;li&gt;Scans all namespaces&lt;/li&gt;&lt;li&gt;Compares resources against deprecations for that version&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Before the upgrade to v1.33, we want kubent to scan the resources against that next k8s version so we need to specify it with &lt;span style=&quot;font-family: courier;&quot;&gt;--target-version&lt;/span&gt;:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% &lt;b&gt;kubent --target-version=1.33&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;8:02AM INF &amp;gt;&amp;gt;&amp;gt; Kube No Trouble `kubent` &amp;lt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;8:02AM INF version 0.7.3 (git sha 57480c07b3f91238f12a35d0ec88d9368aae99aa)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;8:02AM INF Initializing collectors and retrieving data&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;8:02AM INF Target K8s version is 1.33.0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;8:02AM INF Retrieved 12 resources from collector name=Cluster&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;8:03AM INF Retrieved 361 resources from collector name=&quot;Helm v3&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;8:03AM INF Loaded ruleset name=custom.rego.tmpl&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;8:03AM INF Loaded ruleset name=deprecated-1-16.rego&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;8:03AM INF Loaded ruleset name=deprecated-1-22.rego&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;8:03AM INF Loaded ruleset name=deprecated-1-25.rego&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;8:03AM INF Loaded ruleset name=deprecated-1-26.rego&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;8:03AM INF Loaded ruleset name=deprecated-1-27.rego&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;8:03AM INF Loaded ruleset name=deprecated-1-29.rego&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;8:03AM INF Loaded ruleset name=deprecated-1-32.rego&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;8:03AM INF Loaded ruleset name=deprecated-future.rego&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;---&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.bojankomazec.com/feeds/1967285022205863794/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4912226416400969049/1967285022205863794' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/1967285022205863794'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/1967285022205863794'/><link rel='alternate' type='text/html' href='http://www.bojankomazec.com/2026/02/introduction-to-kubent-kube-no-trouble.html' title='Introduction to Kubent (Kube No Trouble)'/><author><name>Bojan Komazec</name><uri>http://www.blogger.com/profile/05437236807206825832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguB41-QWSneCrCvtgpyBbniO0DArgmPNDic2AZzdU4lS8EVVV2U9mLvD0yk0eTLdrkNEN9YG8JxBcutax1G-i6QG6Ch9o0RoHOhBYuebUswUGy1WHY_PZiBghkShaki9YJN-s-eBHBu8dIxPiFsyPxgGLC73qwHSGE1yZshXRl-POtBSqpQguWs8QhQoM/s72-w640-h382-c/Screenshot%202026-02-26%20at%2007.50.05.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4912226416400969049.post-3687026977627844117</id><published>2026-02-23T11:59:00.001+00:00</published><updated>2026-02-23T11:59:12.013+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DevOps"/><category scheme="http://www.blogger.com/atom/ns#" term="Grafana"/><category scheme="http://www.blogger.com/atom/ns#" term="Grafana Loki"/><title type='text'>Introduction to Grafana Loki</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEik-xO6FZGcQhAZpOz1riTcrmV-UyV16h2RrmaIwn98641pyb5UXFVrd63FCnIvpJd1u2ZKg5lZq4A70vOXXs2mDOepoJOnIabKAjdKF2w8VPf0dFFmCxQfwKmXv6UdqqjSZntGEUzAsK4qbsnztH27jFXCVGEM4unHPv-hgoV3bfx567qcQlZ9R8TyDgg/s512/loki.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;512&quot; data-original-width=&quot;512&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEik-xO6FZGcQhAZpOz1riTcrmV-UyV16h2RrmaIwn98641pyb5UXFVrd63FCnIvpJd1u2ZKg5lZq4A70vOXXs2mDOepoJOnIabKAjdKF2w8VPf0dFFmCxQfwKmXv6UdqqjSZntGEUzAsK4qbsnztH27jFXCVGEM4unHPv-hgoV3bfx567qcQlZ9R8TyDgg/w640-h640/loki.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Grafana Loki:&lt;br /&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Log aggregation system. Like Prometheus, but for logs&lt;/li&gt;&lt;li&gt;Repo:&amp;nbsp;&lt;a href=&quot;https://github.com/grafana/loki&quot;&gt;https://github.com/grafana/loki&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;These are the notes from Loki Helm chart:&amp;nbsp;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;***********************************************************************&lt;/div&gt;&lt;div&gt;&amp;nbsp; Welcome to Grafana Loki&lt;/div&gt;&lt;div&gt;&amp;nbsp; Chart version: 6.31.0&lt;/div&gt;&lt;div&gt;&amp;nbsp; Chart Name: loki&lt;/div&gt;&lt;div&gt;&amp;nbsp; Loki version: 3.5.0&lt;/div&gt;&lt;div&gt;***********************************************************************&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Tip:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Watch the deployment status using the command: kubectl get pods -w --namespace grafana-loki&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If pods are taking too long to schedule make sure pod affinity can be fulfilled in the current cluster.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;***********************************************************************&lt;/div&gt;&lt;div&gt;Installed components:&lt;/div&gt;&lt;div&gt;***********************************************************************&lt;/div&gt;&lt;div&gt;* gateway&lt;/div&gt;&lt;div&gt;* read&lt;/div&gt;&lt;div&gt;* write&lt;/div&gt;&lt;div&gt;* backend&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;***********************************************************************&lt;/div&gt;&lt;div&gt;Sending logs to Loki&lt;/div&gt;&lt;div&gt;***********************************************************************&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Loki has been configured with a gateway (nginx) to support reads and writes from a single component.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can send logs from inside the cluster using the cluster DNS:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;http://loki-gateway.grafana-loki.svc.cluster.local/loki/api/v1/push&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can test to send data from outside the cluster by port-forwarding the gateway to your local machine:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; kubectl port-forward --namespace grafana-loki svc/loki-gateway 3100:80 &amp;amp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;And then using &lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;http://127.0.0.1:3100/loki/api/v1/push&lt;/span&gt; URL as shown below:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;curl \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;-H &quot;Content-Type: application/json&quot; \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;-XPOST \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;-s &quot;http://127.0.0.1:3100/loki/api/v1/push&quot;&amp;nbsp; \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;--data-raw &quot;{\&quot;streams\&quot;: [{\&quot;stream\&quot;: {\&quot;job\&quot;: \&quot;test\&quot;}, \&quot;values\&quot;: [[\&quot;$(date +%s)000000000\&quot;, \&quot;fizzbuzz\&quot;]]}]}&quot; \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;-H X-Scope-OrgId:foo&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Then verify that Loki did receive the data using the following command:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;curl &quot;http://127.0.0.1:3100/loki/api/v1/query_range&quot; \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;--data-urlencode &#39;query={job=&quot;test&quot;}&#39; \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;-H X-Scope-OrgId:foo | jq .data.result&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;***********************************************************************&lt;/div&gt;&lt;div&gt;Connecting Grafana to Loki&lt;/div&gt;&lt;div&gt;***********************************************************************&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If Grafana operates within the cluster, you&#39;ll set up a new Loki datasource by utilizing the following URL:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;http://loki-gateway.grafana-loki.svc.cluster.local/&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;***********************************************************************&lt;/div&gt;&lt;div&gt;Multi-tenancy&lt;/div&gt;&lt;div&gt;***********************************************************************&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Loki is configured with auth enabled (multi-tenancy) and expects tenant headers (`X-Scope-OrgID`) to be set for all API calls.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You must configure Grafana&#39;s Loki datasource using the `HTTP Headers` section with the `X-Scope-OrgID` to target a specific tenant.&lt;/div&gt;&lt;div&gt;For each tenant, you can create a different datasource.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The agent of your choice must also be configured to propagate this header.&lt;/div&gt;&lt;div&gt;For example, when using Promtail you can use the `tenant` stage. https://grafana.com/docs/loki/latest/send-data/promtail/stages/tenant/&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;When not provided with the `X-Scope-OrgID` while auth is enabled, Loki will reject reads and writes with a 404 status code `no org id`.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can also use a reverse proxy, to automatically add the `X-Scope-OrgID` header as suggested by https://grafana.com/docs/loki/latest/operations/authentication/&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For more information, read our documentation about multi-tenancy: https://grafana.com/docs/loki/latest/operations/multi-tenancy/&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;gt; When using curl you can pass `X-Scope-OrgId` header using `-H X-Scope-OrgId:foo` option, where foo can be replaced with the tenant of your choice.&lt;/div&gt;&lt;div&gt;EOT -&amp;gt; (known after apply)&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;---&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.bojankomazec.com/feeds/3687026977627844117/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4912226416400969049/3687026977627844117' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/3687026977627844117'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/3687026977627844117'/><link rel='alternate' type='text/html' href='http://www.bojankomazec.com/2026/02/introduction-to-grafana-loki.html' title='Introduction to Grafana Loki'/><author><name>Bojan Komazec</name><uri>http://www.blogger.com/profile/05437236807206825832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEik-xO6FZGcQhAZpOz1riTcrmV-UyV16h2RrmaIwn98641pyb5UXFVrd63FCnIvpJd1u2ZKg5lZq4A70vOXXs2mDOepoJOnIabKAjdKF2w8VPf0dFFmCxQfwKmXv6UdqqjSZntGEUzAsK4qbsnztH27jFXCVGEM4unHPv-hgoV3bfx567qcQlZ9R8TyDgg/s72-w640-h640-c/loki.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4912226416400969049.post-2603921698300508718</id><published>2026-02-20T14:13:00.003+00:00</published><updated>2026-02-20T14:13:39.261+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DevOps"/><category scheme="http://www.blogger.com/atom/ns#" term="Elasticsearch"/><category scheme="http://www.blogger.com/atom/ns#" term="Grafana"/><category scheme="http://www.blogger.com/atom/ns#" term="Observability"/><title type='text'>Grafana Observability Stack</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhnR3zdZZUaAyQ5BUcVuiDRlvqFbc2xw9Vs2Z-ufB0wlWLR1Aiz6ccdifdSkIt7a5M8iSfpkZsoMtG18_VH_S3jztKRjsGj4Cauwv1736y5dcT5zzMFLxNbeNr65JdR6qttbiXmj7Rt3kGMXlMM6DRlBtS6pq4aSVoCbiX2DD_BbK9B7IrAGv1SuC9NvPA&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;639&quot; data-original-width=&quot;626&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhnR3zdZZUaAyQ5BUcVuiDRlvqFbc2xw9Vs2Z-ufB0wlWLR1Aiz6ccdifdSkIt7a5M8iSfpkZsoMtG18_VH_S3jztKRjsGj4Cauwv1736y5dcT5zzMFLxNbeNr65JdR6qttbiXmj7Rt3kGMXlMM6DRlBtS6pq4aSVoCbiX2DD_BbK9B7IrAGv1SuC9NvPA=w627-h640&quot; width=&quot;627&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;h1&gt;&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;&lt;/h1&gt;&lt;div&gt;Grafana uses these components together as an observability stack, but each has a clear role:&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Loki&lt;/b&gt;&amp;nbsp;– log database. It&amp;nbsp;&lt;u&gt;stores&lt;/u&gt;&amp;nbsp;and indexes logs (especially from Kubernetes) in a cost‑efficient, label‑based way, similar to Prometheus but for logs.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Tempo&lt;/b&gt;&amp;nbsp;– distributed tracing backend. It&amp;nbsp;&lt;u&gt;stores&lt;/u&gt;&amp;nbsp;distributed traces (spans) from OpenTelemetry, Jaeger, Zipkin, etc., so you can see call flows across microservices and where latency comes from.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Mimir&lt;/b&gt;&amp;nbsp;– Prometheus‑compatible metrics backend. It is a horizontally scalable, long‑term&amp;nbsp;&lt;u&gt;storage&lt;/u&gt;&amp;nbsp;and query engine for Prometheus‑style metrics (time series).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Alloy&lt;/b&gt;&amp;nbsp;– telemetry pipeline (collector). It is Grafana’s distribution of the OpenTelemetry Collector / Prometheus agent / Promtail ideas, used to collect, process, and forward metrics, logs, traces, profiles into Loki/Tempo/Mimir (or other backends).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2&gt;How Grafana UI relates to them&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Grafana UI itself is “just” the visualization and alerting layer:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;It connects to Loki, Tempo, Mimir (and many others) as data sources.&lt;/li&gt;&lt;li&gt;For each backend you configure:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;A Loki data source for logs.&lt;/li&gt;&lt;li&gt;A Tempo data source for traces.&lt;/li&gt;&lt;li&gt;A Prometheus/Mimir data source for metrics (Mimir exposes a Prometheus‑compatible API).&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Grafana then lets you:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Build dashboards and alerts from Mimir metrics.&lt;/li&gt;&lt;li&gt;Explore logs from Loki.&lt;/li&gt;&lt;li&gt;Explore traces from Tempo and cross‑link them with logs/metrics (e.g., click from a log line to a trace, or from a metrics graph into logs/traces).&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;A useful mental model: Loki/Tempo/Mimir are&amp;nbsp;&lt;b&gt;databases&lt;/b&gt;, Alloy is the&amp;nbsp;&lt;b&gt;collector/router&lt;/b&gt;, and Grafana is the&amp;nbsp;&lt;b&gt;UI&amp;nbsp;&lt;/b&gt;on top.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2&gt;Are they deployed in the same Kubernetes cluster?&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Common patterns:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Very common: deploy Loki, Tempo, Mimir, Alloy, and Grafana in the same Kubernetes cluster as your apps. This is the typical “in‑cluster LGTM” setup; all telemetry stays inside the cluster and traffic is simple.&lt;/li&gt;&lt;li&gt;Also common: run them in a separate observability cluster (or use Grafana Cloud backends), while Alloy/agents run in each workload cluster and ship data over the network. This improves isolation and makes it easier to share one observability stack across many clusters.&lt;/li&gt;&lt;li&gt;In smaller setups or dev environments, everything (apps + LGTM + Grafana) often lives in one cluster; in larger/regulated setups, people tend to separate “workload clusters” and an “observability cluster”.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So: they don’t have to be on the same cluster, but it’s perfectly normal (and often simplest) to run Grafana + Loki + Tempo + Mimir + Alloy together in a single Kubernetes cluster and point your apps’ telemetry to Alloy.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h2&gt;Why not using elasticsearch instead of loki, tempo and mimir?&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Elasticsearch can replace part of what Loki, Tempo, and Mimir do, but not all of it, and usually with higher cost/complexity for cloud‑native observability.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3&gt;1. Scope: logs vs full observability&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Elasticsearch is a general search and analytics engine that’s great at full‑text search, aggregations, and analytics over documents (including logs).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The LGTM stack is explicitly split by signal:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Loki → logs&lt;/li&gt;&lt;li&gt;Tempo → traces&lt;/li&gt;&lt;li&gt;Mimir → metrics&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Each is optimized only for its signal type and integrates tightly with Grafana and modern telemetry standards.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You could plausibly replace&amp;nbsp;&lt;b&gt;Loki&lt;/b&gt;&amp;nbsp;with Elasticsearch for logs, but Elasticsearch does not natively replace&amp;nbsp;&lt;b&gt;Tempo&lt;/b&gt;&amp;nbsp;(distributed tracing backend) or&amp;nbsp;&lt;b&gt;Mimir&lt;/b&gt;&amp;nbsp;(Prometheus‑compatible metrics backend).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3&gt;2. Logs: Loki vs Elasticsearch&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Elasticsearch strengths:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Very powerful full‑text search, fuzzy matching, relevance scoring, complex aggregations.&lt;/li&gt;&lt;li&gt;Good when you need deep forensic search and advanced analytics on log text.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Loki strengths:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Stores logs as compressed chunks plus a small label index, so storage and compute are much cheaper than Elasticsearch for typical Kubernetes logs.&lt;/li&gt;&lt;li&gt;Very tight integration with Grafana and the rest of LGTM, and simple, label‑based querying.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Trade‑off: Elasticsearch gives richer search at a high infra + ops cost, Loki gives “good enough” search for operational troubleshooting with much lower cost and operational burden.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3&gt;3. Traces and metrics: Tempo &amp;amp; Mimir vs “just ES”&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Tempo:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Implements distributed tracing concepts (spans, traces, service graphs) and OpenTelemetry/Jaeger/Zipkin protocols; the data model and APIs are specialized for traces.&lt;/li&gt;&lt;li&gt;Elasticsearch can store trace‑like JSON documents, but you’d have to build/maintain all the trace stitching, UI navigation, and integrations yourself.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Mimir:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Is a horizontally scalable, Prometheus‑compatible time‑series database, with native remote‑write/read and PromQL semantics.&lt;/li&gt;&lt;li&gt;Elasticsearch can store time‑stamped metrics, but you lose Prometheus compatibility, PromQL semantics, and the whole ecosystem that expects a Prometheus‑style API.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So using only Elasticsearch means you’re giving up the standard metrics and tracing ecosystems and rebuilding a lot of tooling on top of a generic search engine.&lt;/div&gt;&lt;div&gt;​&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3&gt;4. Cost, complexity, and operational burden&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Elasticsearch clusters generally need:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;More RAM/CPU per node, careful shard and index management, and capacity planning.&lt;/li&gt;&lt;li&gt;Storage overhead from full‑text indexes (often 1.5–3× raw log size plus replicas).&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;​&lt;/div&gt;&lt;div&gt;Loki/Tempo/Mimir:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Are designed for object storage, compression, and label‑only indexing, which dramatically lowers storage and compute requirements for logs and metrics.&lt;/li&gt;&lt;li&gt;Have simpler, well‑documented reference architectures specifically for observability.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For a modern Kubernetes‑centric environment, that usually makes LGTM cheaper and easier to run than a single big Elasticsearch cluster for everything.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3&gt;5. When Elasticsearch still makes sense&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You might still choose Elasticsearch (often with Kibana/APM) if:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;You already have a strong ELK stack and team expertise.&lt;/li&gt;&lt;li&gt;Your primary need is deep, flexible text search and analytics over logs, with less emphasis on Prometheus/OTel ecosystems.&lt;/li&gt;&lt;li&gt;You want Elasticsearch’s ML/anomaly‑detection features and are willing to pay the operational cost.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;But if your goal is a Grafana‑centric, standards‑based (Prometheus + OpenTelemetry) observability platform, LGTM (Loki+Tempo+Mimir, plus Alloy as collector) is a better fit than trying to push everything into Elasticsearch.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;---&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.bojankomazec.com/feeds/2603921698300508718/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4912226416400969049/2603921698300508718' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/2603921698300508718'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/2603921698300508718'/><link rel='alternate' type='text/html' href='http://www.bojankomazec.com/2026/02/grafana-observability-stack.html' title='Grafana Observability Stack'/><author><name>Bojan Komazec</name><uri>http://www.blogger.com/profile/05437236807206825832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEhnR3zdZZUaAyQ5BUcVuiDRlvqFbc2xw9Vs2Z-ufB0wlWLR1Aiz6ccdifdSkIt7a5M8iSfpkZsoMtG18_VH_S3jztKRjsGj4Cauwv1736y5dcT5zzMFLxNbeNr65JdR6qttbiXmj7Rt3kGMXlMM6DRlBtS6pq4aSVoCbiX2DD_BbK9B7IrAGv1SuC9NvPA=s72-w627-h640-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4912226416400969049.post-6418194872975897553</id><published>2026-02-20T11:52:00.001+00:00</published><updated>2026-02-20T11:56:51.106+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="heredoc"/><title type='text'>Here document (heredoc)</title><content type='html'>&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifdOXbyZgECkmeFiGffBP99JVfY4V56EvPuApYHhdJw8fUGCKcV09seMgMVAPCiMeAVIjGqwfyONW5X98dUB7aZQtEcV-sBQXM1uB_XO89td78dYs_PzD0HtZB_ruaUJ7psrJ5IQ3-qE9oIYKabyKNPIpFhaDxq0aC6IFkkJhfmN46uLEDdl-bItRwMII/s300/Screenshot%202026-02-20%20at%2011.55.58.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;253&quot; data-original-width=&quot;300&quot; height=&quot;540&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifdOXbyZgECkmeFiGffBP99JVfY4V56EvPuApYHhdJw8fUGCKcV09seMgMVAPCiMeAVIjGqwfyONW5X98dUB7aZQtEcV-sBQXM1uB_XO89td78dYs_PzD0HtZB_ruaUJ7psrJ5IQ3-qE9oIYKabyKNPIpFhaDxq0aC6IFkkJhfmN46uLEDdl-bItRwMII/w640-h540/Screenshot%202026-02-20%20at%2011.55.58.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Here document (heredoc) redirects a multiline string literal to the preceding command while preserving line breaks. Unix syntax for it is:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;[command] &amp;lt;&amp;lt;DELIMITER&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; First line.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; Second line.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; Third line.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; Fourth line.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;DELIMITER&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; is Redirection Operator&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;-&lt;/span&gt; is optional Tab Suppression&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;DELIMITER&lt;/span&gt; - an arbitrary string, Delimiter Token; must be the same at the beginning and at the end&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Appending a minus sign to the redirection operator &amp;lt;&amp;lt;- causes all leading tab characters to be ignored. This allows you to use indentation when writing heredocs in shell scripts. We can then indent both the here-doc and the delimiter with tabs (not spaces!):&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;#! /bin/bash&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;cat &amp;lt;&amp;lt;-EOF&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; indented&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; EOF&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;echo Done&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;---&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;References:&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Here_document&quot;&gt;Here document - Wikipedia&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.bojankomazec.com/feeds/6418194872975897553/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4912226416400969049/6418194872975897553' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/6418194872975897553'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/6418194872975897553'/><link rel='alternate' type='text/html' href='http://www.bojankomazec.com/2026/02/here-document-heredoc.html' title='Here document (heredoc)'/><author><name>Bojan Komazec</name><uri>http://www.blogger.com/profile/05437236807206825832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifdOXbyZgECkmeFiGffBP99JVfY4V56EvPuApYHhdJw8fUGCKcV09seMgMVAPCiMeAVIjGqwfyONW5X98dUB7aZQtEcV-sBQXM1uB_XO89td78dYs_PzD0HtZB_ruaUJ7psrJ5IQ3-qE9oIYKabyKNPIpFhaDxq0aC6IFkkJhfmN46uLEDdl-bItRwMII/s72-w640-h540-c/Screenshot%202026-02-20%20at%2011.55.58.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4912226416400969049.post-7156773178882088041</id><published>2026-02-18T15:30:00.000+00:00</published><updated>2026-02-18T15:30:35.627+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DevOps"/><category scheme="http://www.blogger.com/atom/ns#" term="Kubernetes"/><title type='text'>How to fix pods in Not Ready state?</title><content type='html'>&lt;div style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNcIpCzZVp3_zhSgcHAbs4YGdJzLIASdHB-KYbFKNi3lnjVygRjX4fDjnxWOXjrkqWuVOeP1Liq5LHCz-i8dwOfoo8M2otsV1D7UArIXfLoNZkx4MXG7T0u0GEHpHbjBklyjafBfwojeGxQrM7FP2XxSk1SZV5VTSQ4d2YdcVUSTpPUHtHNC7FXNiqQy4/s1178/Screenshot%202024-07-27%20at%2023.26.17.png&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1178&quot; data-original-width=&quot;1176&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNcIpCzZVp3_zhSgcHAbs4YGdJzLIASdHB-KYbFKNi3lnjVygRjX4fDjnxWOXjrkqWuVOeP1Liq5LHCz-i8dwOfoo8M2otsV1D7UArIXfLoNZkx4MXG7T0u0GEHpHbjBklyjafBfwojeGxQrM7FP2XxSk1SZV5VTSQ4d2YdcVUSTpPUHtHNC7FXNiqQy4/w638-h640/Screenshot%202024-07-27%20at%2023.26.17.png&quot; width=&quot;638&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl get pods&lt;/span&gt; might show that some of the pods have &lt;span style=&quot;font-family: courier;&quot;&gt;0/N&lt;/span&gt; value in &lt;span style=&quot;font-family: courier;&quot;&gt;READY&lt;/span&gt; column.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;What is the meaning of READY column value?&lt;/h4&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div&gt;In the context of &lt;span style=&quot;font-family: courier;&quot;&gt;kubectl get pods&lt;/span&gt;, the &lt;span style=&quot;font-family: courier;&quot;&gt;READY&lt;/span&gt; column shows the number of containers in the pod that have passed their health checks and are ready to serve traffic.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The anatomy of R/T:&lt;/div&gt;&lt;/div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;R (Left side): This is the number of containers currently Ready. A 0 means the application inside the container is not responding to its &quot;Readiness Probe&quot; or has not finished starting up.&lt;/li&gt;&lt;li&gt;/ (Separator): Separates ready containers from the total.&lt;/li&gt;&lt;li&gt;T (Right side): This is the Total number of user containers defined in that pod.&lt;/li&gt;&lt;/ul&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;When we have a pod in &lt;b&gt;0/1&lt;/b&gt; state with a status of &lt;b&gt;Running&lt;/b&gt;, it means the container has started, but Kubernetes does not consider it &quot;healthy&quot; enough to handle requests.&amp;nbsp;Our pods are technically &quot;alive&quot; (Running) but &quot;unusable&quot; (Not Ready).&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Common Reasons for 0/1 Running:&lt;/h4&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;Failed Readiness Probe&lt;/b&gt;: The application is running, but the health check URL (e.g., /ready) is returning an error or timing out.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Slow Startup&lt;/b&gt;: The application takes a long time to initialize, and the &quot;Initial Delay&quot; isn&#39;t long enough.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Dependency Issues&lt;/b&gt;: The pod is waiting for a database, a config file, or another service that isn&#39;t available.&lt;/li&gt;&lt;li&gt;&lt;b&gt;CrashLoopBackOff (Transitions)&lt;/b&gt;: Sometimes pods flicker between 0/1 Running and 0/1 CrashLoopBackOff as they try to start and immediately fail.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;How to find out exactly what&#39;s wrong&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To diagnose why our my-app pods are stuck, run these two commands:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(1) Check the Events (Why it&#39;s not ready):&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;b&gt;kubectl describe pod&lt;/b&gt; my-app-0 -n my-app-namespace&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Look at the &quot;Events&quot; section at the bottom for messages like &quot;Readiness probe failed.&quot;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Output example:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;Events:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; Type&amp;nbsp; &amp;nbsp; &amp;nbsp;Reason&amp;nbsp; &amp;nbsp; &amp;nbsp;Age&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;From&amp;nbsp; &amp;nbsp; &amp;nbsp;Message&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; ----&amp;nbsp; &amp;nbsp; &amp;nbsp;------&amp;nbsp; &amp;nbsp; &amp;nbsp;----&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ----&amp;nbsp; &amp;nbsp; &amp;nbsp;-------&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: red; font-family: courier;&quot;&gt;Warning&amp;nbsp; Unhealthy&amp;nbsp; 47s (x81205 over 8d)&amp;nbsp; kubelet&amp;nbsp; Readiness probe failed: HTTP probe failed with statuscode: 503&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(2) Check the Logs (What the app is saying):&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;b&gt;kubectl logs&lt;/b&gt; my-app-0 -n my-app-namespace&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Look for &quot;Error,&quot; &quot;Exception,&quot; or &quot;Connection Refused&quot; messages.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;---&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.bojankomazec.com/feeds/7156773178882088041/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4912226416400969049/7156773178882088041' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/7156773178882088041'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/7156773178882088041'/><link rel='alternate' type='text/html' href='http://www.bojankomazec.com/2026/02/how-to-fix-pods-in-not-ready-state.html' title='How to fix pods in Not Ready state?'/><author><name>Bojan Komazec</name><uri>http://www.blogger.com/profile/05437236807206825832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNcIpCzZVp3_zhSgcHAbs4YGdJzLIASdHB-KYbFKNi3lnjVygRjX4fDjnxWOXjrkqWuVOeP1Liq5LHCz-i8dwOfoo8M2otsV1D7UArIXfLoNZkx4MXG7T0u0GEHpHbjBklyjafBfwojeGxQrM7FP2XxSk1SZV5VTSQ4d2YdcVUSTpPUHtHNC7FXNiqQy4/s72-w638-h640-c/Screenshot%202024-07-27%20at%2023.26.17.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4912226416400969049.post-7713173275872985148</id><published>2026-02-17T16:14:00.005+00:00</published><updated>2026-02-17T16:16:39.573+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DevOps"/><category scheme="http://www.blogger.com/atom/ns#" term="Terraform"/><category scheme="http://www.blogger.com/atom/ns#" term="terraform-docs"/><title type='text'>How to use terraform-docs automatically generate Terraform code documentation</title><content type='html'>&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcUo-T0rDG15feFzOjtak6CVDnrixU00sh2NJuhjmwZQIooMNgFBT8Dh68vno13DC3ahh6Q0oaToTZO9ZYLSbZAa85TiyKiZPx6Uzs1GBsYruy4zMxONERwkrLirBGeiPX5rPjh602jZKZAqa4ibMD48w6sorCIXZnQHq6O3mekCPBRExf_NaA0bTb/s720/Terraform.png&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;480&quot; data-original-width=&quot;720&quot; height=&quot;426&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcUo-T0rDG15feFzOjtak6CVDnrixU00sh2NJuhjmwZQIooMNgFBT8Dh68vno13DC3ahh6Q0oaToTZO9ZYLSbZAa85TiyKiZPx6Uzs1GBsYruy4zMxONERwkrLirBGeiPX5rPjh602jZKZAqa4ibMD48w6sorCIXZnQHq6O3mekCPBRExf_NaA0bTb/w640-h426/Terraform.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;https://github.com/terraform-docs/terraform-docs&quot; target=&quot;_blank&quot;&gt;terraform-docs&lt;/a&gt; is a tool used to automatically generate Terraform code documentation.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;To install it on Mac:&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% brew install terraform-docs&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;To verify installation:&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% terraform-docs --version&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;terraform-docs version v0.21.0 darwin/arm64&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To generate a documentation for a module in the current directory and append it to the README file (which is in the same directory):&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% terraform-docs markdown table --output-file README.md --output-mode inject ./&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.bojankomazec.com/feeds/7713173275872985148/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4912226416400969049/7713173275872985148' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/7713173275872985148'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/7713173275872985148'/><link rel='alternate' type='text/html' href='http://www.bojankomazec.com/2026/02/how-to-use-terraform-docs-automatically.html' title='How to use terraform-docs automatically generate Terraform code documentation'/><author><name>Bojan Komazec</name><uri>http://www.blogger.com/profile/05437236807206825832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcUo-T0rDG15feFzOjtak6CVDnrixU00sh2NJuhjmwZQIooMNgFBT8Dh68vno13DC3ahh6Q0oaToTZO9ZYLSbZAa85TiyKiZPx6Uzs1GBsYruy4zMxONERwkrLirBGeiPX5rPjh602jZKZAqa4ibMD48w6sorCIXZnQHq6O3mekCPBRExf_NaA0bTb/s72-w640-h426-c/Terraform.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4912226416400969049.post-8681083877892300121</id><published>2026-02-17T14:23:00.007+00:00</published><updated>2026-02-17T14:24:18.015+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DevOps"/><category scheme="http://www.blogger.com/atom/ns#" term="MacOS"/><category scheme="http://www.blogger.com/atom/ns#" term="Terraform"/><title type='text'>How to install Terraform on Mac</title><content type='html'>&lt;div style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcUo-T0rDG15feFzOjtak6CVDnrixU00sh2NJuhjmwZQIooMNgFBT8Dh68vno13DC3ahh6Q0oaToTZO9ZYLSbZAa85TiyKiZPx6Uzs1GBsYruy4zMxONERwkrLirBGeiPX5rPjh602jZKZAqa4ibMD48w6sorCIXZnQHq6O3mekCPBRExf_NaA0bTb/s720/Terraform.png&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;480&quot; data-original-width=&quot;720&quot; height=&quot;426&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcUo-T0rDG15feFzOjtak6CVDnrixU00sh2NJuhjmwZQIooMNgFBT8Dh68vno13DC3ahh6Q0oaToTZO9ZYLSbZAa85TiyKiZPx6Uzs1GBsYruy4zMxONERwkrLirBGeiPX5rPjh602jZKZAqa4ibMD48w6sorCIXZnQHq6O3mekCPBRExf_NaA0bTb/w640-h426/Terraform.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;First add Hashicorp&#39;s package repository:&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% brew tap hashicorp/tap&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Then install the Terraform:&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% brew install hashicorp/tap/terraform&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;If Terraform was already installed, the command above will update it.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;To verify installation, we can check its version:&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% terraform --version&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;Terraform v1.14.5&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;on darwin_arm64&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.bojankomazec.com/feeds/8681083877892300121/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4912226416400969049/8681083877892300121' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/8681083877892300121'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/8681083877892300121'/><link rel='alternate' type='text/html' href='http://www.bojankomazec.com/2026/02/how-to-install-terraform-on-mac.html' title='How to install Terraform on Mac'/><author><name>Bojan Komazec</name><uri>http://www.blogger.com/profile/05437236807206825832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcUo-T0rDG15feFzOjtak6CVDnrixU00sh2NJuhjmwZQIooMNgFBT8Dh68vno13DC3ahh6Q0oaToTZO9ZYLSbZAa85TiyKiZPx6Uzs1GBsYruy4zMxONERwkrLirBGeiPX5rPjh602jZKZAqa4ibMD48w6sorCIXZnQHq6O3mekCPBRExf_NaA0bTb/s72-w640-h426-c/Terraform.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4912226416400969049.post-7661967218379288644</id><published>2026-02-06T12:18:00.015+00:00</published><updated>2026-03-18T10:30:55.006+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Amazon Elastic Kubernetes Service"/><category scheme="http://www.blogger.com/atom/ns#" term="AWS"/><category scheme="http://www.blogger.com/atom/ns#" term="AWS EKS"/><category scheme="http://www.blogger.com/atom/ns#" term="CAS"/><category scheme="http://www.blogger.com/atom/ns#" term="Cluster Autoscaler"/><category scheme="http://www.blogger.com/atom/ns#" term="DevOps"/><category scheme="http://www.blogger.com/atom/ns#" term="Karpenter"/><category scheme="http://www.blogger.com/atom/ns#" term="Kubernetes"/><title type='text'>Amazon EKS Autoscaling with Karpenter</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhutxdOWZ6ZdlBzJArYJo_OVLK5PtWYbiHorvPwomJ39lWBtym8pRbqgHVKHahTNgrDjilxAtQhKaXOfH0q_KX1JGpFAA0nflXycY5f0hbt-HGKH0Dm71KaKGjRDXP3CD1rBnltMJVMOVk5vqTMn4lS4GIGrzSjQyPbpXlWEHsklmys60qppZpxu7LhnQI/s220/karpenter-logo.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;220&quot; data-original-width=&quot;220&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhutxdOWZ6ZdlBzJArYJo_OVLK5PtWYbiHorvPwomJ39lWBtym8pRbqgHVKHahTNgrDjilxAtQhKaXOfH0q_KX1JGpFAA0nflXycY5f0hbt-HGKH0Dm71KaKGjRDXP3CD1rBnltMJVMOVk5vqTMn4lS4GIGrzSjQyPbpXlWEHsklmys60qppZpxu7LhnQI/w400-h400/karpenter-logo.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Kubernetes autoscaling&lt;/b&gt; is a function that scales resources in and out depending on the current workload. AWS supports two autoscaling implementations:&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;Cluster Autoscaler&lt;/b&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/cloudprovider/aws/README.md&quot;&gt;autoscaler/cluster-autoscaler/cloudprovider/aws/README.md at master · kubernetes/autoscaler&lt;/a&gt;&lt;/li&gt;&lt;li&gt;automatically adjusts the number of nodes in the cluster when pods fail or are rescheduled onto other nodes&lt;/li&gt;&lt;li&gt;uses Auto Scaling groups&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;Karpenter&amp;nbsp;&lt;/b&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://karpenter.sh/&quot;&gt;Karpenter&lt;/a&gt;&lt;/li&gt;&lt;li&gt;flexible, high-performance Kubernetes cluster autoscaler and node provisioner&lt;/li&gt;&lt;li&gt;helps improve application availability and cluster efficiency&lt;/li&gt;&lt;li&gt;launches right-sized compute resources (for example, Amazon EC2 instances) in response to changing application load in under a minute&lt;/li&gt;&lt;li&gt;can provision just-in-time compute resources that precisely meet the requirements of our workload&lt;/li&gt;&lt;li&gt;automatically provisions new compute resources based on the specific requirements of cluster workloads. These include compute, storage, acceleration, and scheduling requirements.&amp;nbsp;&lt;/li&gt;&lt;li&gt;creates Kubernetes nodes directly from EC2 instances&lt;/li&gt;&lt;li&gt;improves the efficiency and cost of running workloads on the cluster&lt;/li&gt;&lt;li&gt;open-source&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Pod Scheduler&lt;/h2&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Kubernetes cluster component responsible for determining which node Pods get assigned to&lt;/li&gt;&lt;li&gt;default Pod scheduler for Kubernetes is&amp;nbsp;&lt;span style=&quot;font-family: courier;&quot;&gt;kube-scheduler&lt;/span&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;logs the reasons Pods can&#39;t be scheduled&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Unschedulable Pods&lt;/h2&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;From&amp;nbsp;&lt;a href=&quot;https://www.gremlin.com/blog/how-to-fix-kubernetes-unschedulable-pods#:~:text=A%20Pod%20is%20unschedulable%20when,to%20meet%20the%20Pod&#39;s%20requirements.&quot;&gt;How to troubleshoot unschedulable Pods in Kubernetes&lt;/a&gt;:&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;div&gt;&lt;i&gt;A Pod is unschedulable when it&#39;s been put into Kubernetes&#39; scheduling queue, but can&#39;t be deployed to a node. This can be for a number of reasons, including:&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;i&gt;The cluster not having enough CPU or RAM available to meet the Pod&#39;s requirements.&lt;/i&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;Pod affinity or anti-affinity rules preventing it from being deployed to available nodes.&lt;/i&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;Nodes being cordoned due to updates or restarts.&lt;/i&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;The Pod requiring a persistent volume that&#39;s unavailable, or bound to an unavailable node.&lt;/i&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;i&gt;&lt;b&gt;How to detect unschedulable Pods?&lt;/b&gt;&lt;/i&gt;&lt;/p&gt;&lt;p&gt;&lt;i&gt;Pods waiting to be scheduled are held in the &quot;Pending&quot; status, but if the Pod can&#39;t be scheduled, it will remain in this state. However, Pods that are being deployed normally are also marked as &quot;Pending.&quot; The difference comes down to how long a Pod remains in &quot;Pending.&quot;&amp;nbsp;&lt;/i&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;i&gt;How to&amp;nbsp; fix unschedulable Pods?&lt;/i&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;i&gt;There is no single solution for unschedulable Pods as they have many different causes. However, there are a few things we can try depending on the cause.&lt;/i&gt;&amp;nbsp;&lt;/div&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;i&gt;Enable cluster autoscaling&lt;/i&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;If we&#39;re using a managed Kubernetes service like Amazon EKS or Google Kubernetes Engine (GKE), we can very easily take advantage of autoscaling to increase and decrease cluster capacity on-demand. With autoscaling enabled, Kubernetes&#39; Cluster Autoscaler will trigger our provider to add nodes when needed. As long as we&#39;ve configured our cluster node pool and it hasn&#39;t reached its max node limit, our provider will automatically provision a new node and add it to the pool, making it available to the cluster and to our Pods.&lt;/i&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;i&gt;Increase our node capacity&lt;/i&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;Check our Pod requests&lt;/i&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;Check our affinity and anti-affinity rules&amp;nbsp;&lt;/i&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;In this article we&#39;ll show how to enable cluster autoscaling with Karpenter.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;How does the regular Kubernetes Autoscaler work in AWS?&lt;/h2&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;When we create a regular Kubernetes cluster in AWS, each node group is managed by the AWS Auto-scaling group [&lt;a href=&quot;https://docs.aws.amazon.com/autoscaling/ec2/userguide/auto-scaling-groups.html&quot;&gt;Auto Scaling groups - Amazon EC2 Auto Scaling&lt;/a&gt;]. Cluster native autoscaler adjusts the desired size based on the load in the cluster to fit all unscheduled pods.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;HorizontalPodAutoscaler&lt;/b&gt; (&lt;b&gt;HPA&lt;/b&gt;) [&lt;a href=&quot;https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/&quot;&gt;Horizontal Pod Autoscaling | Kubernetes&lt;/a&gt;] is built into Kubernetes and it uses metrics like CPU usage, memory usage or custom metrics we can write to decide when to spin up or down additional pods in the node of the cluster. If our app is receiving more traffic, HPA will kick in and provision additional pods.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;VerticalPodAutoscaler&lt;/b&gt; (&lt;b&gt;VPA&lt;/b&gt;) can also be installed in cluster where it manages the resource (like CPU and memory) allocation to pods that are already running.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div&gt;What about when there&#39;s not enough capacity to schedule any more pods in the node? That&#39;s when we&#39;ll need an additional node. So we have a pod that needs to be scheduled but we don&#39;t know where to put it. We could call AWS API, spin up an additional EC2 node, get added it to our cluster or if we&#39;re using managed groups we can use Managed Node Group API, bump up the desired size but easier approach is to use cluster auto-scaler. There is a mature open-source solution called Cluster Auto-Scaler (CAS).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;CAS was built to handle hundreds of different combinations of nodes types, zones, purchase options available in AWS. CAS works directly with managed node groups or self-managed managed nodes and auto-scaling groups which are AWS constructs to help us manage nodes.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;What are the issues with the&amp;nbsp;regular Kubernetes Autoscaler?&lt;/h2&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Let&#39;s say CAS is installed on node, in cluster and manages one managed node group (MNG). It&#39;s filling up and we have an additional pod that needs to be provisioned so CAS tells MNG to bump up the number of nodes so it spins up another one so pod can now be scheduled. But this is not ideal. We have a single pod in a node, we don&#39;t need such a big node.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;This can be solved by creating a different MNG with a smaller instance type and now CAS recognizes that instance and provisions pod on a more appropriately-sized node.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Unfortunately, we might end up with many MNGs, based on requirements which might be a challenge to manage especially when looking best practices in terms of cost efficiency and high availability.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;How does Karpenter work?&lt;/h2&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div&gt;Karpenter works differently, It doesn&#39;t use MNG or ASGs and manages each node directly. Let&#39;s say we have different pods, of different sizes. Let&#39;s say that HPA says that we need more of the smaller pods. Karpenter will intelligently pick the right instance type for that workload. If we need to spin up a larger pod it will again pick the right instance type.&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Karpenter picks exactly the right type of node for our workload.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;If we&#39;re using spot instances and spot capacity is not available, Karpenter does retries more quickly. Karpenter offers, faster, dynamic, more intelligent compute, using best practices without operational overhead of managing nodes ourselves.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;How to control how Karpenter operates?&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;There are many dimensions here. We can set constraints on Karpenter to limit the instances type, we can set up taints to isolate workloads to specific types of nodes. Different teams can have isolated access to different pods, one team can access billing pods, another GPU-based instances.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Workload Consolidation feature: Pods are consolidated into fewer nodes.. let&#39;s say we have 3 nodes, two at 70% and one at 20% utilization. Karpenter detects this and will move pods from underutilized node to those two and shut down this now empty node (instances are terminated). This leads to lower costs.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Karpenter is making it easier to use spot and graviton instances which can also lead to lower costs.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;A feature to keep our nodes up to date. ttlSecondsUntilExpired parameter tells Karpenter to terminate nodes after a set amount of time. These nodes will automatically be replaced with new nodes, running the latest AMIs.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Karpenter:&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;1) lower costs&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;2) higher application availability&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;3) lower operation overhead&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Karpenter needs permissions to create EC2 instances in AWS.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;If we use a self-hosted (on bare metal boxes or EC2 instances), self-managed (we have full control over all aspects of Kubernetes) Kubernetes cluster, for example by using &lt;a href=&quot;https://github.com/kubernetes/kops&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;kOps&lt;/a&gt; (see also&amp;nbsp;&lt;a href=&quot;https://www.reddit.com/r/kubernetes/comments/zf3pmk/is_k8s_kops_preferable_than_eks/&quot;&gt;Is k8s Kops preferable than eks? : r/kubernetes&lt;/a&gt;), we can add additional IAM policies to the existing IAM role attached to Kubernetes nodes.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;If using EKS, the best way to grant access to internal service is with IAM roles for service accounts (IRSA).&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Karpenter&#39;s Kubernetes Custom Resources&lt;/h2&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;NodePool&lt;/h3&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div&gt;NodePool is the primary Custom Resource (CR) in Karpenter that defines scheduling constraints, how nodes are provisioned and managed (node management policies). It is the successor to the older Provisioner API and acts as the brain that tells Karpenter which nodes to create and how to handle them over time. It acts as the &quot;brain&quot; for scheduling decisions by evaluating the requirements of pending pods and matching them to infrastructure constraints.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Core Role of NodePool&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;Scheduling Authority&lt;/b&gt;: It defines the constraints (instance types, zones, architectures) that determine which nodes can be created.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Successor to Provisioner&lt;/b&gt;: It replaced the older Provisioner API to provide a more scalable and configuration-based approach.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Management Hub&lt;/b&gt;: It handles node lifecycle settings, including disruption policies (consolidation and expiration) and aggregate resource limits (CPU/Memory).&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;Core Functions&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;A NodePool manages three primary aspects of our cluster&#39;s compute capacity:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;Scheduling Constraints&lt;/b&gt;: Restricts which nodes can be provisioned using requirements for instance types, zones, architectures (e.g., x86 vs. ARM), and capacity types (Spot vs. On-Demand).&lt;/li&gt;&lt;li&gt;&lt;b&gt;Disruption Policies&lt;/b&gt;: Governs how Karpenter optimizes the cluster by defining when nodes should be expired or consolidated to save costs.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Resource Limits&lt;/b&gt;: Sets a cap on the total CPU and memory that the NodePool can provision, preventing runaway costs.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Key Components of a NodePool&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The specification is divided into several functional areas:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;template: Defines the configuration for the nodes that will be created.&lt;/li&gt;&lt;li&gt;requirements: Uses well-known Kubernetes labels (e.g., karpenter.sh/capacity-type) to select hardware.&lt;/li&gt;&lt;li&gt;nodeClassRef: Points to an EC2NodeClass for cloud-provider-specific settings like subnets and security groups.&lt;/li&gt;&lt;li&gt;disruption: Replaces older TTL settings with a unified policy for consolidationPolicy (e.g., WhenUnderutilized) and expireAfter.&lt;/li&gt;&lt;li&gt;limits: Defines the maximum aggregate resources (e.g., cpu: 1000) allowed for this pool.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Example v1 Configuration&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This example demonstrates a production-ready NodePool that prioritises Spot instances but allows for On-&lt;/div&gt;&lt;div&gt;Demand fallback.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;apiVersion: karpenter.sh/v1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kind: NodePool&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;metadata:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; name: general-purpose&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; template:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; requirements:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - key: &quot;karpenter.sh/capacity-type&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; operator: In&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; values: [&quot;spot&quot;, &quot;on-demand&quot;]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - key: &quot;karpenter.k8s.aws/instance-category&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; operator: In&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; values: [&quot;c&quot;, &quot;m&quot;, &quot;r&quot;]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - key: &quot;kubernetes.io/arch&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; operator: In&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; values: [&quot;amd64&quot;, &quot;arm64&quot;]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; nodeClassRef:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; group: karpenter.k8s.aws&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; kind: EC2NodeClass&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; name: default&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; disruption:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; consolidationPolicy: WhenUnderutilized&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; expireAfter: 720h # 30 days&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; limits:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; cpu: &quot;500&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; memory: 1000Gi&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Comparison with Other Objects&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;While the NodePool is the central configuration object, it works in a hierarchy with two other key resources:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;NodePool&lt;/b&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Purpose: The Logic&lt;/b&gt;: Defines what nodes should look like and how they should behave.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;EC2NodeClass&lt;/b&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Purpose:&amp;nbsp;The Infrastructure&lt;/b&gt;: Defines where and with what AWS-specific settings (subnets, AMIs, security groups) nodes launch.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;NodeClaim&lt;/b&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Purpose:&lt;/b&gt;&amp;nbsp;&lt;b&gt;The Instance&lt;/b&gt;: Represents an individual node currently being managed or provisioned by Karpenter.&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Every NodePool must reference at least one EC2NodeClass to successfully provision capacity on AWS.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;Useful Commands:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To see all node pools:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% &lt;b&gt;kubectl get nodepools&lt;/b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;NAME&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NODECLASS&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NODES&amp;nbsp; &amp;nbsp;READY&amp;nbsp; &amp;nbsp;AGE&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;clickhouse&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; clickhouse&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;True&amp;nbsp; &amp;nbsp; 140d&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;clickhouse-backup&amp;nbsp; &amp;nbsp;clickhouse-backup&amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;True&amp;nbsp; &amp;nbsp; 140d&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Cluster user needs to have permission to&amp;nbsp;&lt;u&gt;list&lt;/u&gt;&amp;nbsp;resource &quot;nodepools&quot; in API group &quot;karpenter.sh&quot; at the cluster scope.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To debug a specific node pool:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl describe nodepool&amp;nbsp;&amp;lt;nodepool-name&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;Cluster user needs to have permission to&amp;nbsp;&lt;u&gt;get&lt;/u&gt;&amp;nbsp;resource &quot;nodepools&quot; in API group &quot;karpenter.sh&quot; at the cluster scope.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% &lt;b&gt;kubectl describe nodepool clickhouse&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;Name:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;clickhouse&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;Namespace:&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;Labels:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;none&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;Annotations:&amp;nbsp; karpenter.sh/nodepool-hash: 12671849087427876759&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; karpenter.sh/nodepool-hash-version: v3&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;API Version:&amp;nbsp; karpenter.sh/v1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;Kind:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;b&gt;NodePool&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;Metadata:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; Creation Timestamp:&amp;nbsp; 2025-10-22T15:02:58Z&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; Generation:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; Resource Version:&amp;nbsp; &amp;nbsp; 1073678&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; UID:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;f7869dd3-ac24-4600-98a6-059073645769&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;Spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; Disruption:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; Budgets:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Nodes:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;10%&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; Consolidate After:&amp;nbsp; &amp;nbsp; &amp;nbsp;0s&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; Consolidation Policy:&amp;nbsp; WhenEmptyOrUnderutilized&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; Template:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Metadata:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Labels:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;Karpenter - Node - Pool:&amp;nbsp; clickhouse&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Expire After:&amp;nbsp; 720h&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Node Class Ref:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Group:&amp;nbsp; karpenter.k8s.aws&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Kind:&amp;nbsp; &amp;nbsp;EC2NodeClass&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Name:&amp;nbsp; &amp;nbsp;clickhouse&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Requirements:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Key:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;node.kubernetes.io/instance-type&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Operator:&amp;nbsp; In&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Values:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; r8g.xlarge&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; r8g.2xlarge&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; r8g.4xlarge&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; r8g.8xlarge&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Key:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;karpenter.sh/capacity-type&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Operator:&amp;nbsp; In&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Values:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; on-demand&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; spot&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;Status:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; Conditions:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Last Transition Time:&amp;nbsp; 2025-10-22T15:02:59Z&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Message:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Observed Generation:&amp;nbsp; &amp;nbsp;2&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Reason:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ValidationSucceeded&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Status:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; True&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Type:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ValidationSucceeded&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Last Transition Time:&amp;nbsp; 2025-10-22T15:03:07Z&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Message:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Observed Generation:&amp;nbsp; &amp;nbsp;2&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Reason:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NodeClassReady&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Status:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; True&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Type:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NodeClassReady&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Last Transition Time:&amp;nbsp; 2025-10-23T17:24:01Z&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Message:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Observed Generation:&amp;nbsp; &amp;nbsp;2&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Reason:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Ready&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Status:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; True&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Type:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Ready&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; Resources:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Cpu:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Ephemeral - Storage:&amp;nbsp; 0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Memory:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Nodes:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Pods:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;Events:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;none&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;EC2NodeClass&lt;/h3&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div&gt;EC2NodeClass is a Custom Resource (CR) used to define AWS-specific infrastructure configurations for the nodes Karpenter provisions.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;While a NodePool handles high-level scheduling constraints (like instance types or taints), the EC2NodeClass dictates the underlying Amazon EC2 settings.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Key Responsibilities&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The EC2NodeClass abstracts cloud provider-specific details, including:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Networking: Selects subnets using subnetSelectorTerms.&lt;/li&gt;&lt;li&gt;Security: Identifies security groups via securityGroupSelectorTerms.&lt;/li&gt;&lt;li&gt;Identity: Assigns the IAM role or instance profile for the nodes.&lt;/li&gt;&lt;li&gt;Storage: Configures blockDeviceMappings for EBS volumes.&lt;/li&gt;&lt;li&gt;Images: Specifies the Amazon Machine Image (AMI) family (e.g., AL2, Bottlerocket) or selects specific AMIs.&lt;/li&gt;&lt;li&gt;Customisation: Includes userData for custom bootstrap scripts.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Relationship with NodePools&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;A NodePool must reference an EC2NodeClass using the nodeClassRef field. Multiple NodePools can point to the same EC2NodeClass if they share the same infrastructure requirements (e.g., same VPC and IAM role).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Example Configuration&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;A basic EC2NodeClass manifest typically looks like this:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;apiVersion: karpenter.k8s.aws/v1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kind: EC2NodeClass&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;metadata:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; name: default&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; amiFamily: AL2&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; role: &quot;KarpenterNodeRole-my-cluster&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; subnetSelectorTerms:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; - tags:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; karpenter.sh/discovery: my-cluster&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; securityGroupSelectorTerms:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; - tags:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; karpenter.sh/discovery: my-cluster&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Useful Commands:&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To see all EC2NodeClasses&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;b&gt;kubectl get ec2nodeclasses&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Cluster user needs to have permission to&amp;nbsp;&lt;u&gt;list&lt;/u&gt;&amp;nbsp;resource &quot;ec2nodeclasses&quot; in API group &quot;karpenter.k8s.aws&quot; at the cluster scope.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Example:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% &lt;b&gt;kubectl get ec2nodeclasses&amp;nbsp; &lt;/b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;NAME&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; READY&amp;nbsp; &amp;nbsp;AGE&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;clickhouse&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; True&amp;nbsp; &amp;nbsp; 140d&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;clickhouse-backup&amp;nbsp; &amp;nbsp;True&amp;nbsp; &amp;nbsp; 140d&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To debug a specific node that isn&#39;t coming online:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;b&gt;kubectl describe ec2nodeclasses&amp;nbsp;&amp;lt;ec2nodeclass-name&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;Cluster user needs to have permission to&amp;nbsp;&lt;u&gt;get&lt;/u&gt;&amp;nbsp;resource &quot;ec2nodeclasses&quot; in API group &quot;karpenter.k8s.aws&quot; at the cluster scope.&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Example:&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% &lt;b&gt;kubectl describe ec2nodeclass clickhouse&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;Name:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;clickhouse&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;Namespace:&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;Labels:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;none&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;Annotations:&amp;nbsp; karpenter.k8s.aws/ec2nodeclass-hash: 358699366951558737&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; karpenter.k8s.aws/ec2nodeclass-hash-version: v4&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;API Version:&amp;nbsp; karpenter.k8s.aws/v1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;Kind:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;EC2NodeClass&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;Metadata:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; Creation Timestamp:&amp;nbsp; 2025-10-22T15:02:58Z&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; Finalizers:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; karpenter.k8s.aws/termination&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; Generation:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; Resource Version:&amp;nbsp; 73323969&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; UID:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;25c663e7-cc29-47b2-8a97-937fb5f39825&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;Spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; Ami Family:&amp;nbsp; AL2023&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; Ami Selector Terms:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Alias:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; al2023@latest&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; Detailed Monitoring:&amp;nbsp; true&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; Metadata Options:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Http Endpoint:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; enabled&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; httpProtocolIPv6:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;disabled&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Http Put Response Hop Limit:&amp;nbsp; 1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Http Tokens:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; required&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; Role:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;KarpenterNodeRole-mycorp-prod-clickhouse-k8s&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; Security Group Selector Terms:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Tags:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; karpenter.sh/discovery/mycorp-prod-clickhouse-k8s:&amp;nbsp; true&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; Subnet Selector Terms:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Tags:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; karpenter.sh/discovery:&amp;nbsp; true&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; private_subnet:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; true&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; Tags:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Name:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mycorp-prod-clickhouse-k8s-karpenter-clickhouse&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; karpenter.sh/discovery/mycorp-prod-clickhouse-k8s:&amp;nbsp; true&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;Status:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; Amis:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Id:&amp;nbsp; &amp;nbsp; ami-06ab427136b8ffa61&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Name:&amp;nbsp; amazon-eks-node-al2023-x86_64-nvidia-1.33-v20260304&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Requirements:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Key:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;kubernetes.io/arch&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Operator:&amp;nbsp; In&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Values:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; amd64&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Key:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;karpenter.k8s.aws/instance-gpu-count&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Operator:&amp;nbsp; Exists&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Id:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ami-08f492a005f7b8703&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Name:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; amazon-eks-node-al2023-x86_64-neuron-1.33-v20260304&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Requirements:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Key:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;kubernetes.io/arch&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Operator:&amp;nbsp; In&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Values:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; amd64&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Key:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;karpenter.k8s.aws/instance-accelerator-count&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Operator:&amp;nbsp; Exists&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Id:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ami-0023c4931d42779e6&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Name:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; amazon-eks-node-al2023-x86_64-standard-1.33-v20260304&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Requirements:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Key:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;kubernetes.io/arch&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Operator:&amp;nbsp; In&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Values:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; amd64&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Key:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;karpenter.k8s.aws/instance-gpu-count&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Operator:&amp;nbsp; DoesNotExist&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Key:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;karpenter.k8s.aws/instance-accelerator-count&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Operator:&amp;nbsp; DoesNotExist&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Id:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ami-061bed77c8a6d03cd&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Name:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; amazon-eks-node-al2023-arm64-standard-1.33-v20260304&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Requirements:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Key:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;kubernetes.io/arch&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Operator:&amp;nbsp; In&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Values:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; arm64&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Key:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;karpenter.k8s.aws/instance-gpu-count&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Operator:&amp;nbsp; DoesNotExist&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Key:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;karpenter.k8s.aws/instance-accelerator-count&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Operator:&amp;nbsp; DoesNotExist&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; Conditions:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Last Transition Time:&amp;nbsp; 2025-10-22T15:02:59Z&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Message:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Observed Generation:&amp;nbsp; &amp;nbsp;1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Reason:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AMIsReady&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Status:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; True&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Type:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AMIsReady&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Last Transition Time:&amp;nbsp; 2025-10-22T15:02:59Z&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Message:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Observed Generation:&amp;nbsp; &amp;nbsp;1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Reason:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SubnetsReady&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Status:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; True&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Type:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SubnetsReady&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Last Transition Time:&amp;nbsp; 2025-10-22T15:02:59Z&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Message:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Observed Generation:&amp;nbsp; &amp;nbsp;1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Reason:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SecurityGroupsReady&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Status:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; True&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Type:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SecurityGroupsReady&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Last Transition Time:&amp;nbsp; 2025-10-22T15:02:59Z&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Message:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Observed Generation:&amp;nbsp; &amp;nbsp;1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Reason:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; InstanceProfileReady&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Status:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; True&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Type:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; InstanceProfileReady&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Last Transition Time:&amp;nbsp; 2025-10-22T15:03:07Z&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Message:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Observed Generation:&amp;nbsp; &amp;nbsp;1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Reason:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ValidationSucceeded&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Status:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; True&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Type:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ValidationSucceeded&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Last Transition Time:&amp;nbsp; 2025-10-22T15:03:07Z&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Message:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Observed Generation:&amp;nbsp; &amp;nbsp;1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Reason:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Ready&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Status:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; True&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Type:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Ready&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; Instance Profile:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mycorp-prod-clickhouse-k8s_15693974848685646064&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; Security Groups:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Id:&amp;nbsp; &amp;nbsp; sg-09f3cd41bcef827c0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Name:&amp;nbsp; mycorp-prod-clickhouse-k8s-node-20251020164545608400000006&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; Subnets:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Id:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;subnet-04xxxxxxxxxx5d30b&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Zone:&amp;nbsp; &amp;nbsp; &amp;nbsp;us-east-1b&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Zone ID:&amp;nbsp; use1-az2&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Id:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;subnet-00xxxxxxxxxx08cef&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Zone:&amp;nbsp; &amp;nbsp; &amp;nbsp;us-east-1c&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Zone ID:&amp;nbsp; use1-az3&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Id:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;subnet-02xxxxxxxxxxx8711&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Zone:&amp;nbsp; &amp;nbsp; &amp;nbsp;us-east-1a&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Zone ID:&amp;nbsp; use1-az1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;Events:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;none&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;NodeClaim&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In Karpenter, a NodeClaim is the Custom Resource (CR) that represents a single, specific instance of compute capacity.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;While a NodePool is the template and a NodeClass is the blueprint, the NodeClaim is the actual request sent to the cloud provider to launch a specific node.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Key Characteristics&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;1:1 Relationship: Each NodeClaim typically corresponds to exactly one EC2 instance and its associated Kubernetes Node.&lt;/li&gt;&lt;li&gt;Immutable: Once created, a NodeClaim cannot be changed. If the requirements for a node change (e.g., due to &quot;drift&quot;), Karpenter deletes the existing NodeClaim and creates a new one.&lt;/li&gt;&lt;li&gt;Lifecycle Management: It tracks the instance from its initial &quot;launch&quot; request through &quot;registration&quot; with the cluster until it is fully &quot;initialized&quot; and ready to run pods.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Why We Should Monitor NodeClaims&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;NodeClaims are the best place to look when debugging provisioning failures. We can use them to identify why a node failed to join the cluster:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Status Conditions: A NodeClaim status will show if an instance failed to launch (e.g., &quot;LaunchFailed&quot; due to AWS service limits) or if it&#39;s stuck during initialization.&lt;/li&gt;&lt;li&gt;Provider Information: It stores the specific providerID (e.g., EC2 instance ID) and the nodeName once the instance successfully joins the cluster.&lt;/li&gt;&lt;li&gt;Drift Detection: Karpenter adds a Drifted status to a NodeClaim if the underlying instance no longer matches the current NodePool or EC2NodeClass configuration.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;How it Fits the Hierarchy:&lt;/h4&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;NodePoolDefines&amp;nbsp;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Function: scheduling rules and resource limits.&lt;/li&gt;&lt;li&gt;Analogy: The Foreman&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;EC2NodeClass&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Function:&amp;nbsp;Defines AWS-specific infrastructure (subnets, AMIs).&lt;/li&gt;&lt;li&gt;Analogy:&amp;nbsp;The Blueprint&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;NodeClaim&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Function:&amp;nbsp;Represents the actual instance being provisioned.&lt;/li&gt;&lt;li&gt;Analogy:&amp;nbsp;The Building Material&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Useful Commands:&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To see all active node claims and their status:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl get nodeclaims&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Cluster user needs to have permission to &lt;u&gt;list&lt;/u&gt; resource &quot;nodeclaims&quot; in API group &quot;karpenter.sh&quot; at the cluster scope.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To debug a specific node that isn&#39;t coming online:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl describe nodeclaim &amp;lt;nodeclaim-name&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Cluster user needs to have permission to &lt;u&gt;get&lt;/u&gt; resource &quot;nodeclaims&quot; in API group &quot;karpenter.sh&quot; at the cluster scope.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Example:&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% kubectl get nodeclaims&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;No resources found&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;How to Debug Misfunctioning Karpenter&lt;/h2&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div&gt;Based on the output we&#39;ve provided above, our NodePool and EC2NodeClass are both in a Ready state and have correctly discovered subnets, security groups, and AMIs. However, we have 0 nodes and 0 NodeClaims. The most common reason for this behavior—where the infrastructure is ready but Karpenter isn&#39;t scaling—is a scheduling mismatch between our pending Pods and the NodePool&#39;s requirements. Here is a breakdown of why Karpenter might be sitting idle:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1. Missing Architecture Requirement&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Our clickhouse NodePool specifies r8g instance types. These are AWS Graviton (ARM64) instances. In our NodePool spec, we haven&#39;t explicitly defined the architecture requirement. While Karpenter is smart, if our Pods do not have a nodeSelector or toleration for kubernetes.io/arch: arm64, or if the Pods are explicitly asking for amd64, Karpenter will not use this NodePool to satisfy them.Check our Pods:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl get pods -A | grep -i pending&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl describe pod &amp;lt;pending-pod-name&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Look for NodeSelectors or Affinity rules in the Pod spec. If the Pod doesn&#39;t allow arm64, Karpenter won&#39;t spin up an r8g node.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;2. Missing Taints/Tolerations&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;ClickHouse workloads often use specialized nodes. If our NodePool (or the nodes it creates) has a Taint that we haven&#39;t shown in the snippet, or if our Pods have a Toleration for a taint that doesn&#39;t exist on this NodePool, Karpenter will ignore it.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Check if our pending Pods have specific nodeSelector labels that aren&#39;t present in the NodePool template.metadata.labels. Our NodePool only has one label: Karpenter - Node - Pool: clickhouse.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;3. The &quot;Karpenter Controller&quot; Logs&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If the logic seems correct but nothing is happening, the answer is always in the controller logs. Karpenter will explicitly tell us why it is passing over a Pod.Run this to see the scheduling decisions:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;kubectl logs -n karpenter -l app.kubernetes.io/name=karpenter | grep -i &quot;scheduling&quot;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Look for messages like:no reachable nodeclassesno possible pod inventoryunschedulable, ... did not match requirements&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;4. Service Linked Role / Permissions&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Since our EC2NodeClass is Ready, our basic AWS tags are likely fine. However, double-check that the KarpenterNodeRole-geeiq-prod-clickhouse-k8s actually exists in IAM and has the AmazonEKSWorkerNodePolicy and AmazonEC2ContainerRegistryReadOnly attached. If the role is missing or misconfigured, the EC2 instance might start but fail to join the cluster, causing Karpenter to terminate it immediately.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Summary Checklist&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Potential Issue Fix/Action&amp;nbsp;&lt;/div&gt;&lt;div&gt;Arch Mismatch =&amp;gt; Add kubernetes.io/arch with arm64 to NodePool requirements or Pod nodeSelector.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Pending Pods =&amp;gt; Ensure there are actually Pods in Pending state. Karpenter only scales in response to unschedulable pods.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Instance Availability =&amp;gt; r8g instances are relatively new. Ensure they are available in us-east-2 for the capacity type (Spot/On-Demand) we requested.&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;How to install Karpenter in the cluster?&lt;/h2&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Namespace&lt;/h3&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div&gt;Current Karpenter best practices recommend deploying it in the &lt;span style=&quot;font-family: courier;&quot;&gt;&lt;b&gt;kube-system&lt;/b&gt;&lt;/span&gt; namespace rather than its own dedicated namespace.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;While many early adopters used a separate &lt;span style=&quot;font-family: courier;&quot;&gt;karpenter&lt;/span&gt; namespace, the project shifted toward &lt;span style=&quot;font-family: courier;&quot;&gt;kube-system&lt;/span&gt; starting with version v0.33.0.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Why &lt;span style=&quot;font-family: courier;&quot;&gt;kube-system&lt;/span&gt; is preferred:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;API Priority &amp;amp; Fairness: By default, Kubernetes grants higher priority to requests coming from the &lt;span style=&quot;font-family: courier;&quot;&gt;kube-system&lt;/span&gt; namespace. This ensures the Karpenter controller can still communicate with the API server to provision nodes even during periods of heavy cluster congestion.&lt;/li&gt;&lt;li&gt;Critical Component Status: Placing Karpenter in &lt;span style=&quot;font-family: courier;&quot;&gt;kube-system&lt;/span&gt; denotes it as a critical cluster component, aligning it with other essential services like kube-proxy or the VPC CNI.&lt;/li&gt;&lt;li&gt;Reduced Complexity: Using a standard system namespace avoids the need to manually configure custom FlowSchemas or PriorityLevelConfigurations that would otherwise be required to give a custom namespace the same level of reliability.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;When to use a separate namespace:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Legacy Installations: If we installed Karpenter before v0.33.0, it likely lives in a &lt;span style=&quot;font-family: courier;&quot;&gt;karpenter&lt;/span&gt; namespace. Migrating is recommended but requires updating our IAM Roles for Service Accounts (IRSA) trust policy to reflect the new namespace.&lt;/li&gt;&lt;li&gt;Fargate Isolation: If we run Karpenter on AWS Fargate, we must create a Fargate profile for the specific namespace where Karpenter is deployed.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Labels&lt;/h3&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div&gt;While most standard Karpenter installations use the label &lt;span style=&quot;font-family: courier;&quot;&gt;&lt;b&gt;app.kubernetes.io/name=karpenter&lt;/b&gt;&lt;/span&gt; for the &lt;b&gt;controller pods&lt;/b&gt;, it is not guaranteed for every pod in every environment.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Why it might differ:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Helm Chart Customisation: If we (or our platform team) overrode the &lt;span style=&quot;font-family: courier;&quot;&gt;podLabels&lt;/span&gt; or &lt;span style=&quot;font-family: courier;&quot;&gt;nameOverride&lt;/span&gt; values during the Karpenter Helm installation, this label will be different.&lt;/li&gt;&lt;li&gt;Version Variance: Very old versions of Karpenter sometimes used different labelling conventions (e.g., just &lt;span style=&quot;font-family: courier;&quot;&gt;app=karpenter&lt;/span&gt;), though modern versions follow Kubernetes recommended labels.&lt;/li&gt;&lt;li&gt;Webhook Pods: In some configurations, Karpenter may run separate pods for webhooks that might carry slightly different descriptive labels depending on the deployment strategy.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;How to configure Karpenter?&lt;/h2&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;We can configure specific Karpenter &lt;b&gt;NodePools&lt;/b&gt; or &lt;b&gt;Provisioners&lt;/b&gt;.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;How to set up weighted NodePools for multi-tenant isolation?&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div&gt;In Karpenter, Weighted NodePools allow us to control which NodePool is selected when a pod&#39;s requirements match multiple pools. This is a powerful tool for multi-tenant isolation, enabling us to prioritize specific hardware or cost models for certain teams while providing a fallback mechanism.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;How Weighting Works&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Precedence: Higher weight values indicate higher priority.&lt;/li&gt;&lt;li&gt;Default: If no weight is specified, it defaults to 0.&lt;/li&gt;&lt;li&gt;Selection: If a pending pod matches the requirements of multiple NodePools, Karpenter will always select the one with the highest weight first.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Multi-Tenant Strategy: Isolation &amp;amp; Priority&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For multi-tenant environments, we can use weights to enforce distinct tiers of service or cost:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Reserved/Savings Plan Tier (Highest Weight):&amp;nbsp;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Create a NodePool that specifically includes instance types covered by our Savings Plans or Reserved Instances. By giving this pool a high weight (e.g., 100), Karpenter will prioritize using this pre-paid capacity before launching new nodes.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Spot Instance Tier (Medium Weight):&amp;nbsp;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;A general-purpose pool for non-critical workloads or &quot;Team A&quot; can be set with a medium weight (e.g., 50) and restricted to spot capacity.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;On-Demand Fallback (Lowest Weight):&amp;nbsp;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;A &quot;catch-all&quot; NodePool with a low weight (e.g., 10) that allows on-demand instances. This ensures that if Spot capacity is unavailable or Savings Plans are exhausted, workloads still have a place to land.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Implementation Example&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Below is an example of two overlapping NodePools where the &quot;Premium&quot; pool is prioritized for any workload that could run on it.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;# NodePool 1: High Priority (e.g., Reserved Capacity)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;apiVersion: karpenter.sh/v1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kind: NodePool&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;metadata:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; name: premium-reserved&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; weight: 100&amp;nbsp; # Higher weight = Higher priority&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; template:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; requirements:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - key: &quot;node.kubernetes.io/instance-type&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; operator: In&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; values: [&quot;m5.large&quot;, &quot;m5.xlarge&quot;] # Specific reserved types&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; nodeClassRef:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; name: default&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;---&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;# NodePool 2: Standard Priority (e.g., Spot)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;apiVersion: karpenter.sh/v1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kind: NodePool&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;metadata:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; name: standard-spot&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; weight: 50&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; template:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; requirements:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - key: &quot;karpenter.sh/capacity-type&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; operator: In&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; values: [&quot;spot&quot;]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; nodeClassRef:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; name: default&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Best Practices for Isolation&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Mutual Exclusivity: While weights handle overlaps, the official Karpenter guidance suggests making NodePools mutually exclusive whenever possible (using taints/tolerations or unique labels) to simplify debugging.&lt;/li&gt;&lt;li&gt;Resource Limits: Always set spec.limits on tenant-specific pools to prevent one team from consuming the entire cluster&#39;s budget.&lt;/li&gt;&lt;li&gt;Billing Attribution: Use the spec.template.metadata.labels field in each NodePool to add &quot;Team&quot; or &quot;Project&quot; tags. These labels propagate to the EC2 instances, making it easy to track costs per tenant&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;How to implement Taints and Tolerations alongside weights for stricter tenant &quot;hard&quot; isolation?&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;While weights allow Karpenter to prefer one NodePool over another, Taints and Tolerations are required for hard isolation. They ensure that nodes provisioned for one tenant &quot;repel&quot; pods from all other tenants.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The Isolation Strategy&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To achieve strict tenant separation, we combine three elements:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Taints: Applied to the NodePool to prevent unauthorized pods from scheduling on its nodes.&lt;/li&gt;&lt;li&gt;Tolerations: Applied to the tenant&#39;s pods so they can &quot;bypass&quot; the taint.&lt;/li&gt;&lt;li&gt;Node Affinity: Applied to the tenant&#39;s pods to &quot;attract&quot; them specifically to their dedicated nodes.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1. Dedicated Tenant NodePool&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In the NodePool spec, add a taint. Any node Karpenter creates from this pool will automatically carry this &quot;keep out&quot; sign.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;apiVersion: karpenter.sh/v1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kind: NodePool&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;metadata:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; name: tenant-a-pool&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; weight: 50&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; template:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; taints:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - key: &quot;tenant&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value: &quot;team-a&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; effect: &quot;NoSchedule&quot; # Only pods with matching toleration can land here&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; labels:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tenant: &quot;team-a&quot; # Used for affinity&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; nodeClassRef:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; name: default&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;2. Tenant Pod Configuration&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For Team A&#39;s workloads to run, their pods must explicitly tolerate the taint and prefer (or require) the tenant label.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;apiVersion: v1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kind: Pod&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;metadata:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; name: team-a-app&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; containers:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; - name: app&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; image: nginx&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; tolerations:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; - key: &quot;tenant&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; operator: &quot;Equal&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; value: &quot;team-a&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; effect: &quot;NoSchedule&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; affinity:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; nodeAffinity:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; requiredDuringSchedulingIgnoredDuringExecution:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; nodeSelectorTerms:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - matchExpressions:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - key: &quot;tenant&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; operator: In&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; values: [&quot;team-a&quot;]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Why use both?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Taint + Toleration alone stops other pods from accidentally using Team A&#39;s nodes, but it doesn&#39;t stop Team A&#39;s pods from accidentally landing on &quot;General&quot; nodes.&lt;/li&gt;&lt;li&gt;Node Affinity ensures Team A&#39;s pods only go to their dedicated nodes.&lt;/li&gt;&lt;li&gt;Weights (e.g., weight: 100) can still be used within a tenant&#39;s pool to prioritize Spot vs. On-Demand specifically for that tenant.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Best Practices&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Mutually Exclusive Pools: It is recommended to design NodePools so they do not overlap. If a pod matches multiple pools, Karpenter uses the one with the highest weight.&lt;/li&gt;&lt;li&gt;NoExecute for Critical Changes: Use the NoExecute effect if we need to evict existing pods immediately when a node becomes inappropriate for them.&lt;/li&gt;&lt;li&gt;Limit Resources: Always set spec.limits on each tenant pool to prevent a single team&#39;s auto-scaling from exhausting the entire AWS account&#39;s resources.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;How to ensure our cluster has at least 3 nodes spread across 3 different Availability Zones (AZs)?&lt;/h3&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This is important if we want to implement highly available architecture. We want nodes to be spread across multiple data centres and with them, pod which belong to our application.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We can define a NodePool that forces a spread across zones using &lt;span style=&quot;font-family: courier;&quot;&gt;topology&lt;/span&gt;:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;apiVersion: karpenter.sh/v1beta1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kind: NodePool&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;metadata:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; name: default&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; template:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; requirements:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;u&gt;# Force the nodes to be spread across these zones&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - key: &quot;&lt;b&gt;topology.kubernetes.io/zone&lt;/b&gt;&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; operator: In&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; values: [&quot;us-east-1a&quot;, &quot;us-east-1b&quot;, &quot;us-east-1c&quot;]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - key: &quot;karpenter.sh/capacity-type&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; operator: In&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; values: [&quot;on-demand&quot;]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; # Ensure the autoscaler keeps a minimum of 3 nodes&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; limits:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; cpu: 1000&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;BONUS:&amp;nbsp;Forcing Pods to use all 3 Zones&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Even if we have 3 nodes in 3 zones, Kubernetes might try to put all our pods on just one of those nodes to be &quot;efficient.&quot;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To prevent this, we use Topology Spread Constraints. This is the modern, more powerful version of Anti-Affinity. It ensures our pods are distributed evenly across the zones we just created.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; topologySpreadConstraints:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; - maxSkew: 1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; topologyKey: &quot;topology.kubernetes.io/zone&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; whenUnsatisfiable: DoNotSchedule # Or ScheduleAnyway&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; labelSelector:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; matchLabels:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; app: my-app&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;maxSkew&lt;/span&gt;: 1: This means the difference in the number of pods between any two zones can&#39;t be more than 1. (e.g., 1-1-1 is fine, 2-1-0 is not).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;How to check if Karpenter is deployed and operational in the cluster?&lt;/h2&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;To verify that&amp;nbsp;&lt;span class=&quot;Yjhzub&quot; data-complete=&quot;true&quot; data-processed=&quot;true&quot; data-sfc-cb=&quot;&quot; jscontroller=&quot;zYmgkd&quot; jsuid=&quot;aqVtCb_c&quot; style=&quot;background-color: white; color: #0a0a0a; font-size: 16px;&quot;&gt;Karpenter&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #0a0a0a; font-size: 16px;&quot;&gt;&amp;nbsp;is correctly configured and operational in our EKS cluster, we should follow validation steps described below.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;background-color: white; color: #0a0a0a; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #0a0a0a;&quot;&gt;1. Check Controller Health&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #0a0a0a;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #0a0a0a;&quot;&gt;a) Check Pod Status&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #0a0a0a;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #0a0a0a;&quot;&gt;Ensure the Karpenter controller pods are running without errors in the dedicated namespace (usually kube-system or karpenter).&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;We know that its pods should be installed in &lt;span style=&quot;font-family: courier;&quot;&gt;kube-system&lt;/span&gt; namespace and that they should have label&amp;nbsp;&lt;span style=&quot;font-family: courier;&quot;&gt;app.kubernetes.io/name=karpenter&lt;/span&gt; so we can filter pods by these two criterias:&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% &lt;b&gt;kubectl get pods -n kube-system -l app.kubernetes.io/name=karpenter&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;NAME&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;READY&amp;nbsp; &amp;nbsp;STATUS&amp;nbsp; &amp;nbsp; RESTARTS&amp;nbsp; &amp;nbsp;AGE&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;karpenter-598976645b-96dps&amp;nbsp; &amp;nbsp;1/1&amp;nbsp; &amp;nbsp; &amp;nbsp;Running&amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 11h&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;karpenter-598976645b-nxm24&amp;nbsp; &amp;nbsp;1/1&amp;nbsp; &amp;nbsp; &amp;nbsp;Running&amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 12h&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;b)&amp;nbsp;Inspect Logs&lt;/h4&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;To watch for successful discovery of our cluster endpoint and region use:&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% &lt;b&gt;kubectl logs -f -n kube-system -l app.kubernetes.io/name=karpenter -c controller&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;-f = follow (command does not return)&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;- l = logs from objects with specified label&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;-c = only logs from specified container&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;To verify successful discovery of our EKS cluster endpoint and region, we should look for specific initialisation and informer messages in the Karpenter controller logs.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div&gt;&lt;b&gt;Key Success Indicators&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;When Karpenter starts, it must connect to the AWS EKS API to &quot;describe&quot; the cluster. Look for these signs in the output of kubectl logs -n kube-system -l app.kubernetes.io/name=karpenter -c controller:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;i&gt;&lt;b&gt;&quot;Starting informers...&quot;&lt;/b&gt;&lt;/i&gt;: This indicates Karpenter has successfully authenticated with the Kubernetes API server and is beginning to watch for unschedulable pods.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Absence of &lt;i&gt;&quot;DescribeCluster&quot;&lt;/i&gt; Errors&lt;/b&gt;: If discovery is working, we will not see errors like &lt;span style=&quot;font-family: courier;&quot;&gt;failed to detect the cluster CIDR&lt;/span&gt; or &lt;span style=&quot;font-family: courier;&quot;&gt;AccessDeniedException: ... eks:DescribeCluster&lt;/span&gt;.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Region and Cluster Verification&lt;/b&gt;: In newer versions, Karpenter logs its configuration during startup. Look for a log entry mentioning the cluster name and AWS region we provided in our Helm values.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;Example log:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;{&quot;level&quot;:&quot;DEBUG&quot;,&quot;time&quot;:&quot;2026-03-11T01:10:28.203Z&quot;,&quot;logger&quot;:&quot;controller&quot;,&quot;caller&quot;:&quot;operator/operator.go:132&quot;,&quot;message&quot;:&quot;discovered karpenter version&quot;,&quot;commit&quot;:&quot;1c39126&quot;,&quot;&lt;b&gt;version&lt;/b&gt;&quot;:&quot;1.3.2&quot;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;{&quot;level&quot;:&quot;DEBUG&quot;,&quot;time&quot;:&quot;2026-03-11T01:10:28.461Z&quot;,&quot;logger&quot;:&quot;controller&quot;,&quot;caller&quot;:&quot;operator/operator.go:124&quot;,&quot;message&quot;:&quot;discovered region&quot;,&quot;commit&quot;:&quot;1c39126&quot;,&quot;&lt;b&gt;region&lt;/b&gt;&quot;:&quot;us-east-1&quot;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;{&quot;level&quot;:&quot;DEBUG&quot;,&quot;time&quot;:&quot;2026-03-11T01:10:28.749Z&quot;,&quot;logger&quot;:&quot;controller&quot;,&quot;caller&quot;:&quot;operator/operator.go:129&quot;,&quot;message&quot;:&quot;discovered region&quot;,&quot;commit&quot;:&quot;1c39126&quot;,&quot;&lt;b&gt;region&lt;/b&gt;&quot;:&quot;us-east-1&quot;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;{&quot;level&quot;:&quot;DEBUG&quot;,&quot;time&quot;:&quot;2026-03-11T01:10:28.909Z&quot;,&quot;logger&quot;:&quot;controller&quot;,&quot;caller&quot;:&quot;operator/operator.go:135&quot;,&quot;message&quot;:&quot;discovered cluster endpoint&quot;,&quot;commit&quot;:&quot;1c39126&quot;,&quot;&lt;b&gt;cluster-endpoint&lt;/b&gt;&quot;:&quot;https://CA0xxxxxxx5FDD.yxx.us-east-1.eks.amazonaws.com&quot;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;{&quot;level&quot;:&quot;DEBUG&quot;,&quot;time&quot;:&quot;2026-03-11T01:10:28.914Z&quot;,&quot;logger&quot;:&quot;controller&quot;,&quot;caller&quot;:&quot;operator/operator.go:143&quot;,&quot;message&quot;:&quot;discovered kube dns&quot;,&quot;commit&quot;:&quot;1c39126&quot;,&quot;&lt;b&gt;kube-dns-ip&lt;/b&gt;&quot;:&quot;172.20.0.10&quot;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;{&quot;level&quot;:&quot;INFO&quot;,&quot;time&quot;:&quot;2026-03-11T01:10:28.948Z&quot;,&quot;logger&quot;:&quot;controller.controller-runtime.metrics&quot;,&quot;caller&quot;:&quot;server/server.go:208&quot;,&quot;message&quot;:&quot;&lt;b&gt;Starting metrics server&lt;/b&gt;&quot;,&quot;commit&quot;:&quot;1c39126&quot;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;{&quot;level&quot;:&quot;INFO&quot;,&quot;time&quot;:&quot;2026-03-11T01:10:28.948Z&quot;,&quot;logger&quot;:&quot;controller&quot;,&quot;caller&quot;:&quot;manager/runnable_group.go:226&quot;,&quot;message&quot;:&quot;starting server&quot;,&quot;commit&quot;:&quot;1c39126&quot;,&quot;name&quot;:&quot;&lt;b&gt;health probe&lt;/b&gt;&quot;,&quot;addr&quot;:&quot;[::]:8081&quot;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;{&quot;level&quot;:&quot;INFO&quot;,&quot;time&quot;:&quot;2026-03-11T01:10:28.950Z&quot;,&quot;logger&quot;:&quot;controller.controller-runtime.metrics&quot;,&quot;caller&quot;:&quot;server/server.go:247&quot;,&quot;message&quot;:&quot;&lt;b&gt;Serving metrics server&lt;/b&gt;&quot;,&quot;commit&quot;:&quot;1c39126&quot;,&quot;bindAddress&quot;:&quot;:8080&quot;,&quot;secure&quot;:true}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;{&quot;level&quot;:&quot;INFO&quot;,&quot;time&quot;:&quot;2026-03-11T01:10:29.052Z&quot;,&quot;logger&quot;:&quot;controller&quot;,&quot;caller&quot;:&quot;leaderelection/leaderelection.go:215&quot;,&quot;message&quot;:&quot;&lt;b&gt;attempting to acquire leader lease&lt;/b&gt; kube-system/karpenter-leader-election...&quot;,&quot;commit&quot;:&quot;1c39126&quot;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;{&quot;level&quot;:&quot;DEBUG&quot;,&quot;time&quot;:&quot;2026-03-11T06:00:19.215Z&quot;,&quot;logger&quot;:&quot;controller&quot;,&quot;caller&quot;:&quot;provisioning/provisioner.go:128&quot;,&quot;message&quot;:&quot;&lt;b&gt;computing scheduling decision for provisionable pod(s)&lt;/b&gt;&quot;,&quot;commit&quot;:&quot;1c39126&quot;,&quot;controller&quot;:&quot;provisioner&quot;,&quot;namespace&quot;:&quot;&quot;,&quot;name&quot;:&quot;&quot;,&quot;reconcileID&quot;:&quot;921af0a4-f057-4041-bff5-d1861d9f72d1&quot;,&quot;pending-pods&quot;:1,&quot;deleting-pods&quot;:0}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;{&quot;level&quot;:&quot;DEBUG&quot;,&quot;time&quot;:&quot;2026-03-11T06:00:21.223Z&quot;,&quot;logger&quot;:&quot;controller&quot;,&quot;caller&quot;:&quot;provisioning/provisioner.go:128&quot;,&quot;message&quot;:&quot;&lt;b&gt;computing scheduling decision for provisionable pod(s)&lt;/b&gt;&quot;,&quot;commit&quot;:&quot;1c39126&quot;,&quot;controller&quot;:&quot;provisioner&quot;,&quot;namespace&quot;:&quot;&quot;,&quot;name&quot;:&quot;&quot;,&quot;reconcileID&quot;:&quot;9f0c7833-8e01-4661-8728-890f0001a634&quot;,&quot;pending-pods&quot;:1,&quot;deleting-pods&quot;:0}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;{&quot;level&quot;:&quot;INFO&quot;,&quot;time&quot;:&quot;2026-03-11T06:00:29.230Z&quot;,&quot;logger&quot;:&quot;controller&quot;,&quot;caller&quot;:&quot;lifecycle/controller.go:148&quot;,&quot;message&quot;:&quot;&lt;b&gt;initialized nodeclaim&lt;/b&gt;&quot;,&quot;commit&quot;:&quot;1c39126&quot;,&quot;controller&quot;:&quot;nodeclaim.lifecycle&quot;,&quot;controllerGroup&quot;:&quot;karpenter.sh&quot;,&quot;controllerKind&quot;:&quot;NodeClaim&quot;,&quot;NodeClaim&quot;:{&quot;name&quot;:&quot;xxxx-ms587&quot;},&quot;namespace&quot;:&quot;&quot;,&quot;name&quot;:&quot;xxxxx&quot;,&quot;reconcileID&quot;:&quot;35624d4f-833a-4939-9785-24df4c975e0e&quot;,&quot;provider-id&quot;:&quot;aws:///us-east-1c/i-0123456df20484e26&quot;,&quot;Node&quot;:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;{&quot;name&quot;:&quot;ip-10-1-46-231.us-east-1.compute.internal&quot;},&quot;allocatable&quot;:{&quot;cpu&quot;:&quot;3920m&quot;,&quot;ephemeral-storage&quot;:&quot;192128045146&quot;,&quot;hugepages-1Gi&quot;:&quot;0&quot;,&quot;hugepages-2Mi&quot;:&quot;0&quot;,&quot;memory&quot;:&quot;15147932Ki&quot;,&quot;pods&quot;:&quot;58&quot;}}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;{&quot;level&quot;:&quot;DEBUG&quot;,&quot;time&quot;:&quot;2026-03-11T06:00:29.741Z&quot;,&quot;logger&quot;:&quot;controller&quot;,&quot;caller&quot;:&quot;disruption/controller.go:99&quot;,&quot;message&quot;:&quot;&lt;b&gt;marking consolidatable&lt;/b&gt;&quot;,&quot;commit&quot;:&quot;1c39126&quot;,&quot;controller&quot;:&quot;nodeclaim.disruption&quot;,&quot;controllerGroup&quot;:&quot;karpenter.sh&quot;,&quot;controllerKind&quot;:&quot;NodeClaim&quot;,&quot;NodeClaim&quot;:{&quot;name&quot;:&quot;xxxx-ms587&quot;},&quot;namespace&quot;:&quot;&quot;,&quot;name&quot;:&quot;xxxx-ms587&quot;,&quot;reconcileID&quot;:&quot;8c5c3d20-36eb-4a78-b0e8-792532db530d&quot;,&quot;Node&quot;:{&quot;name&quot;:&quot;ip-10-2-45-230.us-east-1.compute.internal&quot;}}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;{&quot;level&quot;:&quot;INFO&quot;,&quot;time&quot;:&quot;2026-03-11T06:01:46.399Z&quot;,&quot;logger&quot;:&quot;controller&quot;,&quot;caller&quot;:&quot;disruption/controller.go:193&quot;,&quot;message&quot;:&quot;&lt;b&gt;disrupting node(s)&lt;/b&gt;&quot;,&quot;commit&quot;:&quot;1c39126&quot;,&quot;controller&quot;:&quot;disruption&quot;,&quot;namespace&quot;:&quot;&quot;,&quot;name&quot;:&quot;&quot;,&quot;reconcileID&quot;:&quot;acc96c52-0cda-475f-b8a9-1251e7a98dc1&quot;,&quot;command-id&quot;:&quot;3fa9d95e-8f45-48a9-b524-94786e1ac91a&quot;,&quot;reason&quot;:&quot;empty&quot;,&quot;decision&quot;:&quot;delete&quot;,&quot;disrupted-node-count&quot;:1,&quot;replacement-node-count&quot;:0,&quot;pod-count&quot;:0,&quot;disrupted-nodes&quot;:[{&quot;Node&quot;:{&quot;name&quot;:&quot;ip-10-2-45-230.us-east-1.compute.internal&quot;},&quot;NodeClaim&quot;:{&quot;name&quot;:&quot;xxxx-ms587&quot;},&quot;capacity-type&quot;:&quot;on-demand&quot;,&quot;instance-type&quot;:&quot;m5.xlarge&quot;}],&quot;replacement-nodes&quot;:[]}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Common Error Patterns to Watch For&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If discovery fails, the logs will explicitly mention connectivity or permission issues:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;DNS/Endpoint Issues&lt;/b&gt;: Look for &lt;span style=&quot;font-family: courier;&quot;&gt;i/o timeout&lt;/span&gt; or &lt;span style=&quot;font-family: courier;&quot;&gt;lookup sts.&amp;lt;region&amp;gt;.amazonaws.com&lt;/span&gt;. This often means Karpenter can&#39;t reach the AWS STS endpoint to get credentials.&lt;/li&gt;&lt;li&gt;&lt;b&gt;IAM Permission Issues:&lt;/b&gt; Messages stating &lt;span style=&quot;font-family: courier;&quot;&gt;is not authorized to perform: eks:DescribeCluster&lt;/span&gt; mean the controller&#39;s IAM role (IRSA) is missing the necessary permissions to discover the cluster details.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Controller Crash/Restart&lt;/b&gt;: If the logs show repeated restarts right after &quot;Starting informers&quot;, it often points to a mismatch between the provided &lt;span style=&quot;font-family: courier;&quot;&gt;clusterName&lt;/span&gt; and the actual cluster.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Tip: Enable Debug Logging&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If we don&#39;t see enough detail, we can increase the log verbosity. Update our Helm deployment with &lt;span style=&quot;font-family: courier;&quot;&gt;--set logLevel=debug&lt;/span&gt; or change the &lt;span style=&quot;font-family: courier;&quot;&gt;LOG_LEVEL&lt;/span&gt; environment variable in the deployment to debug&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;2. Verify CRD Configurations&amp;nbsp;&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Karpenter requires specific Custom Resource Definitions (CRDs) to know how to provision nodes.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;(1) List &lt;b&gt;NodePools&lt;/b&gt;: Run &lt;span style=&quot;font-family: courier;&quot;&gt;kubectl get nodepools&lt;/span&gt; to ensure our provisioning logic is active.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;(2) List &lt;b&gt;EC2NodeClasses&lt;/b&gt;: Run &lt;span style=&quot;font-family: courier;&quot;&gt;kubectl get ec2nodeclasses&lt;/span&gt; to confirm AWS-specific settings (like subnets and security groups) are defined.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;3. Perform a Scaling Test (&quot;Inflate&quot; Test)&amp;nbsp;&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The standard way to test Karpenter is by deploying a &quot;dummy&quot; workload that exceeds current cluster capacity.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;(1) Deploy a test app: Apply a deployment (often called inflate) with high CPU/Memory requests.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;(2) Scale it up: Run:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% kubectl scale deployment inflate --replicas=5&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;(3) Watch for new nodes: Monitor:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;% &lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl get nodes -w&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If configured correctly, Karpenter will detect the pending pods and provision a new EC2 instance within about a minute.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;During the inflate scaling test, how to know that a new node was provisioned by karpenter and not cluster autoscaler?&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;During an inflate scaling test, we can distinguish between nodes provisioned by Karpenter and those from Cluster Autoscaler (CAS) by checking for specific labels, console status, and controller logs.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1. Check for Specific Kubernetes Labels&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Karpenter automatically injects unique labels into every node it creates. CAS nodes usually belong to an Auto Scaling Group (ASG) and do not have these specific Karpenter markers.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Run this command to see the labels on our nodes:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl get nodes --show-labels&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Look for these Karpenter-exclusive labels:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;karpenter.sh/nodepool&lt;/span&gt;: The name of the NodePool that provisioned the node.&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;karpenter.sh/capacity-type&lt;/span&gt;: Set to spot or on-demand.&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;karpenter.k8s.aws/instance-category&lt;/span&gt;: (e.g., c, m, r).&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Nodes provisioned by Cluster Autoscaler (CAS) don&#39;t have a unique &quot;CAS&quot; label. Instead, they carry labels that identify them as members of an Auto Scaling Group (ASG) or an EKS Managed Node Group (MNG).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If we are looking at a node and trying to confirm if it came from CAS, look for these specific markers:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1. Managed Node Group Labels (Most Common)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If we use EKS Managed Node Groups with CAS, the nodes will always have:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;eks.amazonaws.com/nodegroup&lt;/span&gt;: The name of the MNG.&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;eks.amazonaws.com/nodegroup-image&lt;/span&gt;: The AMI ID used.&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;eks.amazonaws.com/capacityType&lt;/span&gt;: Usually ON_DEMAND or SPOT&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;eks.amazonaws.com/sourceLaunchTemplateId&lt;/span&gt;:&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;eks.amazonaws.com/sourceLaunchTemplateVersion&lt;/span&gt;:&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;2. Auto Scaling Group Labels&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Since CAS works by increasing the &quot;Desired Capacity&quot; of an ASG, the underlying EC2 instance is tagged by AWS. Kubernetes reflects these as:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;alpha.eksctl.io/nodegroup-name&lt;/span&gt;: (If using &lt;span style=&quot;font-family: courier;&quot;&gt;eksctl&lt;/span&gt;)&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;node.kubernetes.io/instance-type&lt;/span&gt;: (Standard, but CAS uses this to match ASG definitions)&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;3. The &quot;Missing&quot; Labels&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The easiest way to identify a CAS node during a Karpenter test is by what it doesn&#39;t have. A CAS node will NEVER have:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;❌&amp;nbsp;&lt;span style=&quot;font-family: courier;&quot;&gt;karpenter.sh/nodepool&lt;/span&gt;&lt;/li&gt;&lt;li&gt;❌ &lt;span style=&quot;font-family: courier;&quot;&gt;karpenter.sh/provisioner-name&lt;/span&gt; (deprecated)&lt;/li&gt;&lt;li&gt;❌ &lt;span style=&quot;font-family: courier;&quot;&gt;karpenter.k8s.aws/instance-category&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Quick Check Command&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Run this to see which nodes belong to Karpenter vs. CAS/MNG:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl get nodes -L karpenter.sh/nodepool,://eks.amazonaws.com&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If the nodepool column is populated, it&#39;s Karpenter.&lt;/div&gt;&lt;div&gt;If the nodegroup column is populated, it&#39;s CAS/MNG.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;2. Identify via &quot;Self-Managed&quot; Status in EKS Console&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In the AWS EKS Console under the Compute tab:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Karpenter Nodes: Appear as &quot;Self-managed&quot; because Karpenter bypasses Auto Scaling Groups to launch instances directly via the EC2 Fleet API.&lt;/li&gt;&lt;li&gt;Cluster Autoscaler Nodes: Appear as part of a &quot;Managed Node Group&quot; or are tied to a specific ASG.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;3. Check for the NodeClaim Object&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Karpenter creates a NodeClaim for every node it provisions. Cluster Autoscaler does not use this resource. Run&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl get nodeclaims&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;...during the test. If we see new entries appearing that correspond to our inflate pods, Karpenter is doing the work.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;4. Monitor Controller Logs&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We can watch Karpenter’s real-time decision-making process by tailing its logs. It will explicitly state when it discovers unschedulable pods and which instance type it is launching.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl logs -n kube-system -l app.kubernetes.io/name=karpenter -f&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;CAS logs, by contrast, will show it interacting with ASGs and increasing the &quot;desired capacity&quot; of a group&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;How to disable Cluster Autoscaler temporarily to ensure Karpenter is the only one responding to our tests?&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;To ensure Karpenter is the only controller responding to our scaling tests, we can temporarily disable the Cluster Autoscaler (CAS) by scaling its deployment to zero replicas.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;1. Identify the CAS Deployment&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The Cluster Autoscaler typically runs in the kube-system namespace. Verify its name first:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl get deployments -n kube-system | grep cluster-autoscaler&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;2. Scale to Zero&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Run the following command to stop the CAS from running. This will terminate the pod responsible for monitoring the cluster and scaling our Auto Scaling Groups (ASGs):&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl scale deployment cluster-autoscaler -n kube-system --replicas=0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;3. Verify the Shutdown&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Ensure no CAS pods are running to prevent them from interfering with our inflate test:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl get pods -n kube-system -l app.kubernetes.io/name=aws-cluster-autoscaler&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;4. (Optional) Remove ASG Tags&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If we want a more permanent &quot;hard&quot; disable without deleting the deployment, we can remove the specific AWS tags from our Auto Scaling Groups that the CAS uses for auto-discovery:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;k8s.io/cluster-autoscaler/enabled&lt;/li&gt;&lt;li&gt;k8s.io/cluster-autoscaler/&amp;lt;cluster-name&amp;gt;&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Without these tags, the CAS will ignore those node groups even if the deployment is scaled back up.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;To Re-enable&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Once our tests are complete, we can restore the Cluster Autoscaler by scaling it back to its original replica count:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl scale deployment cluster-autoscaler -n kube-system --replicas=1&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;To confirm which instance types Karpenter chose during our inflate test, we can watch the controller logs in real-time. Karpenter will log exactly how it batches our pods and which instances it requests from AWS.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;1. Tail Karpenter Logs&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Run the following command while our inflate pods are in a Pending state:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl logs -f -n kube-system -l app.kubernetes.io/name=karpenter&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Note: Some installations use the karpenter namespace instead of kube-system.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;2. What to Look For&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Karpenter logs its decisions in JSON or text format. Look for INFO messages containing found provisionable pod(s) or created nodeclaim.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;A typical log entry looks like this:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;2024-03-12T10:00:00.000Z INFO controller.provisioner created nodeclaim {&quot;commit&quot;: &quot;...&quot;, &quot;nodeclaim&quot;: &quot;default-abc12&quot;, &quot;nodepool&quot;: &quot;general-purpose&quot;, &quot;requests&quot;: {&quot;cpu&quot;:&quot;4&quot;,&quot;memory&quot;:&quot;8Gi&quot;}, &quot;instance-types&quot;: &quot;m5.xlarge, m6i.xlarge, c5.2xlarge...&quot;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;requests: Shows the total CPU/Memory requested by our inflate pods.&lt;/li&gt;&lt;li&gt;instance-types: Lists the candidates Karpenter passed to the EC2 Fleet API. Karpenter usually sends a diversified list (up to 60 types) to ensure high availability and best pricing.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;3. Identify the Winning Instance&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Once the node is live, we can confirm the final selected type by checking the NodeClaim status:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl get nodeclaims -o custom-columns=NAME:.metadata.name,TYPE:.status.instanceType,ZONE:.status.zone&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This command explicitly shows the specific instance type (e.g., m5.large) that AWS actually provisioned for that claim.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;4. Enable Debug Logging (Optional)&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If we don&#39;t see enough detail, we can increase the log verbosity to debug. This will reveal exactly how Karpenter &quot;binpacks&quot; our pods onto different instance options.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl patch deployment karpenter -n kube-system --type=&#39;json&#39; -p=&#39;[{&quot;op&quot;: &quot;replace&quot;, &quot;path&quot;: &quot;/spec/template/spec/containers/0/env/0/value&quot;, &quot;value&quot;: &quot;debug&quot;}]&#39;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Tip: After our test, remember to set the LOG_LEVEL back to info to avoid excessive log storage costs.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;4. Monitor NodeClaims&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Karpenter uses NodeClaims to manage the lifecycle of the nodes it creates.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Check Status: Run kubectl get nodeclaims to see if requests for new nodes are being fulfilled.&lt;/li&gt;&lt;li&gt;Debug Failures: If a node fails to join, use kubectl describe nodeclaim &amp;lt;name&amp;gt; to check for errors like LaunchFailed or issues with IAM permissions.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;5. Verify Tagging&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Karpenter discovers infrastructure via tags. Ensure our Subnets and Security Groups have the following tag:&amp;nbsp;&lt;/div&gt;&lt;div&gt;Key: karpenter.sh/discovery&lt;/div&gt;&lt;div&gt;Value: &amp;lt;our-cluster-name&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;How to know if node was provisioned by Karpenter?&lt;/h2&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Karpenter applies labels on nodes it provisions so let&#39;s check labels:&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% kubectl get nodes --show-labels&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;If labels like &lt;span style=&quot;font-family: courier;&quot;&gt;&lt;b&gt;karpenter.sh/nodepool&lt;/b&gt;&lt;/span&gt;&amp;nbsp;or &lt;span style=&quot;font-family: courier;&quot;&gt;&lt;b&gt;karpenter.sh/provisioner-name&lt;/b&gt;&lt;/span&gt; exist, Karpenter launched the node.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;When setting up EKS Managed Node Group, we set desired, min and max number of nodes for ASG. Does that enable Cluster Autoscaler automatically? How does ASG play with Karpenter?&lt;/h2&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Setting the desired, min, and max size on an EKS Managed Node Group only configures the underlying AWS &lt;b&gt;Auto Scaling Group (ASG&lt;/b&gt;).&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;What AWS does: If a node crashes, the ASG will see that the &quot;current&quot; count is less than the &quot;min&quot; (or &quot;desired&quot;) and spin up a new node to replace it.&lt;/li&gt;&lt;li&gt;What AWS does NOT do: It will not look at your pending Kubernetes pods and say, &quot;Oh, we need more space, let&#39;s increase the count from 3 to 4.&quot;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;To get that &quot;intelligent&quot; scaling based on pod demand, we must install a separate controller.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Is Cluster Autoscaler (CAS) enabled by default?&lt;/h3&gt;&lt;div&gt;No. Kubernetes Cluster Autoscaler is not enabled by default on EKS.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If we want to use it, we must:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Deploy the Cluster Autoscaler as a Pod in our cluster (usually via Helm).&lt;/li&gt;&lt;li&gt;Give that Pod an IAM Role (IRSA) that has permission to update your ASG&#39;s &lt;span style=&quot;font-family: courier;&quot;&gt;desired_capacity&lt;/span&gt;.&lt;/li&gt;&lt;li&gt;Add specific tags to our Node Group so the Autoscaler knows which ASG to &quot;manage.&quot;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Do we need to disable CAS to use Karpenter?&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Yes, absolutely. &lt;b&gt;&lt;u&gt;We should not run Cluster Autoscaler and Karpenter simultaneously on the same nodes.&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;The Conflict&lt;/b&gt;: &lt;u&gt;CAS tries to scale nodes by changing the &quot;desired capacity&quot; of an ASG. Karpenter works differently—it bypasses ASGs entirely and talks directly to the EC2 Fleet API to launch specific instances.&lt;/u&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;The Result of Running Both&lt;/b&gt;: They will fight over the cluster. CAS might try to shrink a group while Karpenter is trying to add capacity, leading to &quot;flapping&quot; nodes and unpredictable costs.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If we switch to Karpenter:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Uninstall/Scale down the Cluster Autoscaler deployment.&lt;/li&gt;&lt;li&gt;Set our Node Group sizes to fixed values (or migrate to &quot;headless&quot; node groups where Karpenter manages the entire lifecycle).&lt;/li&gt;&lt;li&gt;Karpenter is the &quot;New Way&quot;: Most AWS users are moving toward Karpenter because it is faster (seconds vs minutes) and more efficient at picking the right instance sizes.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Summary Comparison&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Feature&amp;nbsp; &amp;nbsp;ASG (Default)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Cluster Autoscaler (CAS)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Karpenter&lt;/div&gt;&lt;div&gt;---------&amp;nbsp; &amp;nbsp;------------------&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-------------------------------&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ------------&lt;/div&gt;&lt;div&gt;Logic&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;Keep X nodes alive&quot;&amp;nbsp; &quot;Add nodes if Pods are Pending&quot;&amp;nbsp; &quot;Provision exactly what Pods need&quot;&lt;/div&gt;&lt;div&gt;Speed&amp;nbsp; &amp;nbsp; &amp;nbsp; Slow (Health-based)&amp;nbsp; &amp;nbsp;Medium (Polling ASG)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Fast (Direct EC2 API)&lt;/div&gt;&lt;div&gt;Setup&amp;nbsp; &amp;nbsp; &amp;nbsp; Built-in to EKS&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Manual Install + IAM&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Manual Install + IAM&lt;/div&gt;&lt;div&gt;Best for&amp;nbsp; &amp;nbsp;Fixed capacity&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Traditional scaling&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Cost-optimization &amp;amp; high speed&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Updating Kubernetes version on nodes managed by Karpenter&lt;/h2&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;References:&lt;/h2&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;https://docs.aws.amazon.com/eks/latest/userguide/autoscaling.html&quot;&gt;Autoscaling - Amazon EKS&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=FIBc8GkjFU0&amp;amp;t=207s&quot;&gt;Karpenter for Kubernetes | Karpenter vs Cluster Autoscaler - YouTube&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;https://aws.github.io/aws-eks-best-practices/cluster-autoscaling/&quot;&gt;Cluster-Autoscaler - EKS Best Practices Guides&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;https://www.nops.io/blog/karpenter-vs-cluster-autoscaler-vs-nks/&quot;&gt;Karpenter Vs Cluster Autoscaler: The Essential Guide&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.bojankomazec.com/feeds/7661967218379288644/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4912226416400969049/7661967218379288644' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/7661967218379288644'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/7661967218379288644'/><link rel='alternate' type='text/html' href='http://www.bojankomazec.com/2026/02/amazon-eks-autoscaling-with-karpenter.html' title='Amazon EKS Autoscaling with Karpenter'/><author><name>Bojan Komazec</name><uri>http://www.blogger.com/profile/05437236807206825832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhutxdOWZ6ZdlBzJArYJo_OVLK5PtWYbiHorvPwomJ39lWBtym8pRbqgHVKHahTNgrDjilxAtQhKaXOfH0q_KX1JGpFAA0nflXycY5f0hbt-HGKH0Dm71KaKGjRDXP3CD1rBnltMJVMOVk5vqTMn4lS4GIGrzSjQyPbpXlWEHsklmys60qppZpxu7LhnQI/s72-w400-h400-c/karpenter-logo.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4912226416400969049.post-2263684984619184493</id><published>2026-02-06T12:16:00.018+00:00</published><updated>2026-03-22T09:28:38.935+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Autoscaling"/><category scheme="http://www.blogger.com/atom/ns#" term="CAS"/><category scheme="http://www.blogger.com/atom/ns#" term="DevOps"/><category scheme="http://www.blogger.com/atom/ns#" term="Karpenter"/><category scheme="http://www.blogger.com/atom/ns#" term="Kubernetes"/><title type='text'>Kubernetes Cluster Autoscaler</title><content type='html'>&lt;div style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNcIpCzZVp3_zhSgcHAbs4YGdJzLIASdHB-KYbFKNi3lnjVygRjX4fDjnxWOXjrkqWuVOeP1Liq5LHCz-i8dwOfoo8M2otsV1D7UArIXfLoNZkx4MXG7T0u0GEHpHbjBklyjafBfwojeGxQrM7FP2XxSk1SZV5VTSQ4d2YdcVUSTpPUHtHNC7FXNiqQy4/s1178/Screenshot%202024-07-27%20at%2023.26.17.png&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1178&quot; data-original-width=&quot;1176&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNcIpCzZVp3_zhSgcHAbs4YGdJzLIASdHB-KYbFKNi3lnjVygRjX4fDjnxWOXjrkqWuVOeP1Liq5LHCz-i8dwOfoo8M2otsV1D7UArIXfLoNZkx4MXG7T0u0GEHpHbjBklyjafBfwojeGxQrM7FP2XxSk1SZV5VTSQ4d2YdcVUSTpPUHtHNC7FXNiqQy4/w638-h640/Screenshot%202024-07-27%20at%2023.26.17.png&quot; width=&quot;638&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Kubernetes Cluster Autoscaler (CAS):&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Designed to automatically adjust the number of nodes (EC2 instances) in our cluster based on the resource requests of the workloads running in the cluster&lt;/li&gt;&lt;li&gt;Kubernetes project, supported on EKS:&amp;nbsp;&lt;a href=&quot;https://github.com/kubernetes/autoscaler&quot;&gt;https://github.com/kubernetes/autoscaler&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;h4&gt;Key Features:&lt;/h4&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Node Scaling: It adds or removes&amp;nbsp;&lt;b&gt;&lt;u&gt;nodes&lt;/u&gt;&lt;/b&gt;&amp;nbsp;based on the &lt;b&gt;&lt;u&gt;pending&lt;/u&gt;&lt;/b&gt; pods that cannot be scheduled due to insufficient resources.&lt;/li&gt;&lt;li&gt;Pod Scheduling: Ensures that all pending pods are scheduled by scaling the cluster up.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It works with&amp;nbsp;&lt;u&gt;&lt;b&gt;EKS Managed Node Groups&lt;/b&gt;&amp;nbsp;backed by&amp;nbsp;&lt;b&gt;AWS Auto Scaling Groups&lt;/b&gt;&lt;/u&gt;. In node group, if we provide specific settings (like custom&amp;nbsp;&lt;span style=&quot;font-family: courier;&quot;&gt;block_device_mappings&lt;/span&gt;), EKS creates an&amp;nbsp;&lt;b&gt;EC2 Launch Template&lt;/b&gt;&amp;nbsp;under the hood.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Cluster Autoscaler and kube-scheduler&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;kube-scheduler&lt;/b&gt; is the default &lt;u&gt;control plane component&lt;/u&gt; in Kubernetes responsible for deciding which Node a newly created or unscheduled Pod should run on. It essentially matches pods to the most suitable available machines based on resource requirements and specific constraints.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Cluster Autoscaler and kube-scheduler components DO NOT directly communicate with the other. Instead, the Cluster Autoscaler (CA) watches the kube-scheduler by &lt;u&gt;monitoring the state of pods&lt;/u&gt; in the cluster.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;They work in an indirect loop via the Kubernetes API server:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;Kube-scheduler&lt;/b&gt;: Attempts to place pods on existing nodes. If it cannot find a node with sufficient capacity,&lt;u&gt; it marks the pod as &lt;b&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;Pending&lt;/span&gt;&lt;/b&gt; with an &lt;b&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;Unschedulable&lt;/span&gt;&lt;/b&gt; status&lt;/u&gt;.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Cluster Autoscaler&lt;/b&gt;: Monitors the cluster for these Unschedulable pods.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Action&lt;/b&gt;: &lt;u&gt;When CA detects a pending pod, it triggers a scale-up by adding a node&lt;/u&gt;.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Completion&lt;/b&gt;: Once the new node joins, the &lt;b&gt;kube-scheduler&lt;/b&gt; notices the new capacity and schedules the pending pod.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Key Takeaways:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;The Autoscaler watches the Scheduler: The autoscaler reacts to the decisions (or failed attempts) of the scheduler.&lt;/li&gt;&lt;li&gt;No Direct Connection: They are &quot;blissfully unaware&quot; of each other and interact only through Kubernetes API objects.&lt;/li&gt;&lt;li&gt;Not Resource Based: The &lt;b&gt;&lt;u&gt;Cluster Autoscaler does not directly monitor node CPU/memory usage; it only cares if the scheduler cannot place a pod&lt;/u&gt;&lt;/b&gt;.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This indirect workflow ensures that new nodes are only provisioned when necessary to satisfy pod scheduling constraints.&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;How to check if it&#39;s installed and enabled?&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;(1) Look for its deployment&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Cluster Autoscaler usually runs as a &lt;span style=&quot;font-family: courier;&quot;&gt;Deployment&lt;/span&gt; in &lt;span style=&quot;font-family: courier;&quot;&gt;kube-system&lt;/span&gt; namespace so we can look for that deployment:&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;b&gt;% kubectl get deployments -n kube-system | grep -i cluster-autoscaler&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;cluster-autoscaler-aws-cluster-autoscaler&amp;nbsp; &amp;nbsp;2/2&amp;nbsp; &amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;296d&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;We can also list pods directly:&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;b&gt;% kubectl get pods -n kube-system | grep -i cluster-autoscaler&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;cluster-autoscaler-aws-cluster-autoscaler-7cbb844455-q2lxv 1/1 Running 0 206d&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;cluster-autoscaler-aws-cluster-autoscaler-7cbb844455-vhbsw 1/1 Running 0 206d&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If we see a pod running, it’s installed.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Typical names:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;cluster-autoscaler&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;cluster-autoscaler-aws-clustername&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;cluster-autoscaler-eks-...&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;(2) Inspect the Deployment&amp;nbsp;&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Confirm it’s enabled &amp;amp; configured.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;b&gt;% kubectl describe deployment cluster-autoscaler -n kube-system&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;Name:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cluster-autoscaler-aws-cluster-autoscaler&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;Namespace:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; kube-system&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;CreationTimestamp:&amp;nbsp; &amp;nbsp; &amp;nbsp; Wed, 16 Apr 2025 12:25:38 +0100&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;Labels:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;app.kubernetes.io/instance=cluster-autoscaler&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; app.kubernetes.io/managed-by=&lt;b&gt;Helm&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; app.kubernetes.io/name=aws-cluster-autoscaler&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; helm.sh/chart=cluster-autoscaler-9.46.6&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;Annotations:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; deployment.kubernetes.io/revision: 1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; meta.helm.sh/release-name: cluster-autoscaler&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; meta.helm.sh/release-namespace: kube-system&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;Selector:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;app.kubernetes.io/instance=cluster-autoscaler,app.kubernetes.io/name=aws-cluster-autoscaler&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&lt;b&gt;Replicas:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2 desired | 2 updated | 2 total | 2 available | 0 unavailable&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;StrategyType:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;RollingUpdate&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;MinReadySeconds:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;RollingUpdateStrategy:&amp;nbsp; 25% max unavailable, 25% max surge&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;Pod Template:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; Labels:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;app.kubernetes.io/instance=cluster-autoscaler&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; app.kubernetes.io/name=aws-cluster-autoscaler&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &lt;b&gt;Service Account&lt;/b&gt;:&amp;nbsp; cluster-autoscaler-aws-cluster-autoscaler&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; Containers:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;aws-cluster-autoscaler:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Image:&amp;nbsp; &amp;nbsp; &amp;nbsp; registry.k8s.io/autoscaling/cluster-autoscaler:v1.32.0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Port:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;8085/TCP&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Host Port:&amp;nbsp; 0/TCP&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Command:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ./cluster-autoscaler&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; --cloud-provider=aws&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;--namespace=kube-system&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;--node-group-auto-discovery=asg:tag=k8s.io/cluster-autoscaler/enabled,k8s.io/cluster-autoscaler/mycorp-prod-mycluster&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; --logtostderr=true&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; --stderrthreshold=info&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; --v=4&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Liveness:&amp;nbsp; http-get http://:8085/health-check delay=0s timeout=1s period=10s #success=1 #failure=3&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Environment:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; POD_NAMESPACE:&amp;nbsp; &amp;nbsp; &amp;nbsp;(v1:metadata.namespace)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; SERVICE_ACCOUNT:&amp;nbsp; &amp;nbsp;(v1:spec.serviceAccountName)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; AWS_REGION:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;us-east-1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Mounts:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;none&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; Volumes:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;none&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; Priority Class Name:&amp;nbsp; system-cluster-critical&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; Node-Selectors:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;none&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; Tolerations:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;none&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;Conditions:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; Type&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Status&amp;nbsp; Reason&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; ----&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;------&amp;nbsp; ------&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; Progressing&amp;nbsp; &amp;nbsp; True&amp;nbsp; &amp;nbsp; NewReplicaSetAvailable&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; Available&amp;nbsp; &amp;nbsp; &amp;nbsp; True&amp;nbsp; &amp;nbsp; MinimumReplicasAvailable&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;OldReplicaSets:&amp;nbsp; &amp;lt;none&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;NewReplicaSet:&amp;nbsp; &amp;nbsp;cluster-autoscaler-aws-cluster-autoscaler-7cbb844455 (2/2 replicas created)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;Events:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;none&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Key things to look for:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Replicas ≥ 1&lt;/li&gt;&lt;li&gt;No crash loops&lt;/li&gt;&lt;li&gt;Command args like:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;--cloud-provider=aws&lt;/li&gt;&lt;li&gt;--nodes=1:10:nodegroup-name&lt;/li&gt;&lt;li&gt;--balance-similar-node-groups&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If replicas are 0, it’s installed but effectively disabled.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;(3) Check logs&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Is it actively scaling?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This confirms it’s working, not just running.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;b&gt;kubectl logs&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;b style=&quot;color: #38761d; font-family: courier;&quot;&gt;deployment/cluster-autoscaler&amp;nbsp;&lt;/b&gt;&lt;b style=&quot;color: #38761d; font-family: courier;&quot;&gt;-n kube-system&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;or find pods:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl get pods \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;-l app.kubernetes.io/name=cluster-autoscaler \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;-n kube-system&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Then check logs:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl logs \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;-l app.kubernetes.io/name=cluster-autoscaler \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;-n kube-system \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;| grep &quot;Standard-Autoscaler&quot;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Healthy / active signs:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;scale up&lt;/li&gt;&lt;li&gt;scale down&lt;/li&gt;&lt;li&gt;Unschedulable pods&lt;/li&gt;&lt;li&gt;Node group ... increase size&lt;/li&gt;&lt;li&gt;If you see messages like &lt;span style=&quot;font-family: courier;&quot;&gt;Refresher: resolving ASGs&lt;/span&gt;, it will list the names of the ASGs it is currently monitoring.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Red flags:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;AccessDenied&lt;/li&gt;&lt;li&gt;no node groups found&lt;/li&gt;&lt;li&gt;failed to get ASG&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;(4) Check for unschedulable pods trigger&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;If CA is working, it reacts to pods stuck in &lt;span style=&quot;font-family: courier;&quot;&gt;Pending&lt;/span&gt;.&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;b&gt;% kubectl get pods -A | grep Pending&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If pods are pending and CA logs mention them → CA is enabled and reacting.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;(5) AWS EKS-specific checks (very common)&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;a) Check IAM permissions (classic failure mode)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Cluster Autoscaler must run with an IAM role that can talk to ASGs.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% &lt;b&gt;kubectl -n kube-system get sa | grep autoscaler&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;cluster-autoscaler-aws-cluster-autoscaler&amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;296d&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;horizontal-pod-autoscaler&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;296d&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Let&#39;s inspect &lt;span style=&quot;font-family: courier;&quot;&gt;cluster-autoscaler-aws-cluster-autoscaler&lt;/span&gt; service accont:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% &lt;b&gt;kubectl -n kube-system get sa cluster-autoscaler-aws-cluster-autoscaler&amp;nbsp; -o yaml&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;apiVersion: v1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;automountServiceAccountToken: true&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kind: &lt;b&gt;ServiceAccount&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;metadata:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; annotations:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;b&gt;eks.amazonaws.com/role-arn: arn:aws:iam::xxxxx:role/mycorp-prod-mycluster-cluster-autoscaler&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; meta.helm.sh/release-name: cluster-autoscaler&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; meta.helm.sh/release-namespace: kube-system&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; creationTimestamp: &quot;2026-04-16T11:25:37Z&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; labels:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; app.kubernetes.io/instance: cluster-autoscaler&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; app.kubernetes.io/managed-by: Helm&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; app.kubernetes.io/name: aws-cluster-autoscaler&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; helm.sh/chart: cluster-autoscaler-9.46.6&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; name: cluster-autoscaler-aws-cluster-autoscaler&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; namespace: kube-system&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; resourceVersion: &quot;15768&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; uid: 0a7da521-1bf5-5a5f-a155-8801e876ea7b&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Look for:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;eks.amazonaws.com/role-arn: arn:aws:iam::123456789012:role/ClusterAutoscalerRole&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If missing → CA may exist but cannot scale.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;b) Check Auto Scaling Group tags&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;&lt;u&gt;Our node group ASGs must be tagged&lt;/u&gt;&lt;/b&gt;:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #2b00fe; font-family: courier;&quot;&gt;k8s.io/cluster-autoscaler/enabled = true&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #2b00fe; font-family: courier;&quot;&gt;k8s.io/cluster-autoscaler/&amp;lt;cluster-name&amp;gt; = owned&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Without these → CA runs but does nothing.&amp;nbsp;If those tags are missing, Cluster Autoscaler will ignore that ASG entirely.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;(6) Check Helm (if installed via Helm)&lt;/h4&gt;&lt;div&gt;Let&#39;s list all Helm releases across every namespace in a Kubernetes cluster and look for cluster autoscaler:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% helm list -A&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&lt;b&gt;NAME&lt;/b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;NAMESPACE&lt;/b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; REVISION&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;UPDATED&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;cluster-autoscaler&amp;nbsp; &amp;nbsp; kube-system&amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2025-04-16 12:25:30.389073326 +0100BST&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;b&gt;STATUS&lt;/b&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #38761d; font-family: courier; white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;b&gt;CHART&lt;/b&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;b&gt;APP VERSION&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;deployed&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;cluster-autoscaler-9.46.6&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;1.32.0&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Then:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;helm status cluster-autoscaler -n kube-system&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The command &lt;span style=&quot;font-family: courier;&quot;&gt;helm list -A&lt;/span&gt; (or its alias &lt;span style=&quot;font-family: courier;&quot;&gt;helm ls -A&lt;/span&gt;) is used to list all Helm releases across every namespace in a Kubernetes cluster. Helm identifies your cluster and authenticates through the same mechanism as kubectl: the kubeconfig file. It uses the standard Kubernetes configuration file, typically located at ~/.kube/config, to determine which cluster to target.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;&lt;b&gt;(7) Double-check it’s not replaced by Karpenter&lt;/b&gt;&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Many newer EKS clusters don’t use Cluster Autoscaler anymore.&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% kubectl get pods -A | grep -i karpenter&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;kube-system karpenter-6f67b8c97b-lbq8p 1/1 Running&amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;206d&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;kube-system karpenter-6f67b8c97b-wmprj 1/1 Running&amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;206d&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;If Karpenter is installed, Cluster Autoscaler usually isn’t (or shouldn’t be).&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Quick decision table&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;-----------------------------------------------------------------&lt;/div&gt;&lt;/div&gt;&lt;div&gt;Symptom&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Meaning&lt;/div&gt;&lt;div&gt;-----------------------------------------------------------------&lt;/div&gt;&lt;div&gt;No CA pod&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Not installed&lt;/div&gt;&lt;div&gt;Pod running, replicas=0&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Installed but disabled&lt;/div&gt;&lt;div&gt;Logs show AccessDenied&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;Broken IAM&lt;/div&gt;&lt;div&gt;Pods Pending, no scale-up&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;ASG tags / config issue&lt;/div&gt;&lt;div&gt;Karpenter present&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CA likely not used&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;-----------------------------------------------------------------&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;(8) Check the &quot;Status&quot; ConfigMap&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Cluster Autoscaler maintains a ConfigMap that shows which groups it is managing and if they are at their max/min size:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% &lt;b&gt;kubectl get configmap cluster-autoscaler-status -n kube-system -o yaml&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;apiVersion: v1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;data:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; status: |&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; time: 2026-03-21 08:52:07.308206626 +0000 UTC&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; autoscalerStatus: Running&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; clusterWide:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; health:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; status: Healthy&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;nodeCounts&lt;/b&gt;:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; registered:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; total: 6&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ready: 6&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; notStarted: 0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; longUnregistered: 0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; unregistered: 0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lastProbeTime: &quot;2026-03-21T08:52:07.308206626Z&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lastTransitionTime: &quot;2026-03-20T16:30:07.460032826Z&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; scaleUp:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; status: NoActivity&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lastProbeTime: &quot;2026-03-21T08:52:07.308206626Z&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lastTransitionTime: &quot;2026-03-20T16:30:07.460032826Z&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; scaleDown:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; status: NoCandidates&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lastProbeTime: &quot;2026-03-21T08:52:07.308206626Z&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lastTransitionTime: &quot;2026-03-20T16:30:07.460032826Z&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;b&gt;nodeGroups&lt;/b&gt;:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; - &lt;b&gt;name&lt;/b&gt;: eks-mycorp-env-app-k8s-v1_33-202603...04-2cc...dc8&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; health:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; status: Healthy&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;nodeCounts&lt;/b&gt;:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; registered:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; total: 2&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ready: 2&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; notStarted: 0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; longUnregistered: 0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; unregistered: 0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;cloudProviderTarget&lt;/b&gt;: 2&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;minSize&lt;/b&gt;: 2&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;maxSize&lt;/b&gt;: 10&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lastProbeTime: &quot;2026-03-21T08:52:07.308206626Z&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lastTransitionTime: &quot;2026-03-20T16:30:07.460032826Z&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;scaleUp&lt;/b&gt;:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; status: NoActivity&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lastProbeTime: &quot;2026-03-21T08:52:07.308206626Z&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lastTransitionTime: &quot;2026-03-20T16:30:07.460032826Z&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;scaleDown&lt;/b&gt;:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; status: NoCandidates&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lastProbeTime: &quot;2026-03-21T08:52:07.308206626Z&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lastTransitionTime: &quot;2026-03-20T16:30:07.460032826Z&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;kind: ConfigMap&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;metadata:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; annotations:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; cluster-autoscaler.kubernetes.io/last-updated: 2026-03-21 08:52:07.308206626 +0000&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; UTC&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; creationTimestamp: &quot;2026-03-20T16:29:56Z&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; name: cluster-autoscaler-status&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; namespace: kube-system&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; resourceVersion: &quot;18...78&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; uid: 17b...0af&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Installation and Setup:&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To use the Cluster Autoscaler in the EKS cluster we need to deploy it using a Helm chart or a pre-configured YAML manifest.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl apply -f https://raw.githubusercontent.com/kubernetes/autoscaler/master/cluster-autoscaler/cloudprovider/aws/examples/cluster-autoscaler-autodiscover.yaml&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;In Terraform:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;resource &quot;helm_release&quot; &quot;cluster_autoscaler&quot; {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; name = &quot;cluster-autoscaler&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; repository = &quot;https://kubernetes.github.io/autoscaler&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; chart&amp;nbsp; &amp;nbsp; &amp;nbsp; = &quot;cluster-autoscaler&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; version&amp;nbsp; &amp;nbsp; = &quot;9.46.6&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; namespace&amp;nbsp; = &quot;kube-system&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; set {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #2b00fe; font-family: courier;&quot;&gt;name&amp;nbsp; = &quot;autoDiscovery.clusterName&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #2b00fe; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; value = local.cluster_name&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; set {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; name&amp;nbsp; = &quot;awsRegion&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; value =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;local&lt;/span&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;.aws_region&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; set {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; name&amp;nbsp; = &quot;rbac.serviceAccount.create&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; value = &quot;false&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; set {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; name&amp;nbsp; = &quot;rbac.serviceAccount.name&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; value = local.service_account_name&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;h2&gt;Configuration:&lt;/h2&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Ensure the &lt;span style=&quot;font-family: courier;&quot;&gt;--nodes&lt;/span&gt; flag in the deployment specifies the min and max nodes for your node group.&lt;/li&gt;&lt;li&gt;&lt;u&gt;Annotate your &lt;b&gt;node groups&lt;/b&gt; with the &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;k8s.io/cluster-autoscaler&lt;/span&gt;&lt;/b&gt; tags to enable autoscaler to manage them&lt;/u&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;How to know if node was provisioned by Cluster Autoscaler?&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Cluster Autoscaler applies labels on nodes it provisions &lt;/u&gt;&lt;/b&gt;so let&#39;s check labels:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% kubectl get nodes --show-labels&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If label like &lt;span style=&quot;font-family: courier;&quot;&gt;&lt;b&gt;eks.amazonaws.com/nodegroup&lt;/b&gt;&lt;/span&gt; exists, node was launched by and belongs to EKS Managed Node Group as Cluster Autoscaler launched the node.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Example:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% kubectl get nodes --show-labels&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier; font-size: x-small;&quot;&gt;NAME&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;STATUS ROLES&amp;nbsp; AGE&amp;nbsp; VERSION&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier; font-size: x-small;&quot;&gt;ip-10-2-1-244.us-east-1.compute.internal Ready&amp;nbsp; &amp;lt;none&amp;gt; 206d v1.32.3-eks-473151a&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier; font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier; font-size: small;&quot;&gt;LABELS&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier; font-size: x-small;&quot;&gt;Environment=prod,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier; font-size: x-small;&quot;&gt;beta.kubernetes.io/arch=amd64,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier; font-size: x-small;&quot;&gt;beta.kubernetes.io/instance-type=m5.xlarge,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier; font-size: x-small;&quot;&gt;beta.kubernetes.io/os=linux,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier; font-size: x-small;&quot;&gt;eks.amazonaws.com/capacityType=ON_DEMAND,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier; font-size: x-small;&quot;&gt;eks.amazonaws.com/nodegroup-image=ami-07fa6c030f5802c74,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier; font-size: x-small;&quot;&gt;&lt;b&gt;eks.amazonaws.com/nodegroup=mycorp-prod-mycluster-20260714151819635800000002,&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier; font-size: x-small;&quot;&gt;eks.amazonaws.com/sourceLaunchTemplateId=lt-0edc7a2b08ea82a28,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier; font-size: x-small;&quot;&gt;eks.amazonaws.com/sourceLaunchTemplateVersion=1,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier; font-size: x-small;&quot;&gt;failure-domain.beta.kubernetes.io/region=us-east-1,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier; font-size: x-small;&quot;&gt;failure-domain.beta.kubernetes.io/zone=us-east-1a,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier; font-size: x-small;&quot;&gt;mycorp;/node-type=default,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier; font-size: x-small;&quot;&gt;k8s.io/cloud-provider-aws=12b0e11196b7091c737cf66015f19720,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier; font-size: x-small;&quot;&gt;kubernetes.io/arch=amd64,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier; font-size: x-small;&quot;&gt;kubernetes.io/hostname=ip-10-2-1-244.us-east-1.compute.internal,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier; font-size: x-small;&quot;&gt;kubernetes.io/os=linux,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier; font-size: x-small;&quot;&gt;node.kubernetes.io/instance-type=m5.xlarge,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier; font-size: x-small;&quot;&gt;topology.ebs.csi.aws.com/zone=us-east-1a,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier; font-size: x-small;&quot;&gt;topology.k8s.aws/zone-id=use1-az1,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier; font-size: x-small;&quot;&gt;topology.kubernetes.io/region=us-east-1,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier; font-size: x-small;&quot;&gt;topology.kubernetes.io/zone=us-east-1a&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If we list all nodegroups in the cluster, the one above is listed:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% &lt;b&gt;aws eks list-nodegroups \&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;b&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;--cluster-name&amp;nbsp;&lt;/b&gt;&lt;b&gt;mycorp-env-app-k8s&lt;/b&gt;&lt;b&gt;&amp;nbsp;\&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;b&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;--profile my_profile&lt;/b&gt;&lt;br /&gt;{&lt;br /&gt;    &lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&quot;nodegroups&quot;: [&lt;br /&gt;        &lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&quot;mycorp-env-app-k8s-20260714151819635800000002&quot;&lt;br /&gt;    &lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;]&lt;br /&gt;}&lt;/span&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To inspect the nodegroup, including its labels, use:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;b&gt;% aws eks describe-nodegroup \&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; --cluster-name mycorp-env-app-k8s \&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; --nodegroup-name&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;b style=&quot;color: #38761d; font-family: courier;&quot;&gt;mycorp-env-app-k8s&lt;/b&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;b&gt;-v1_33-20260...03 \&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; --region us-east-2 \&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; --profile my_profile \&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; --output json&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &quot;nodegroup&quot;: {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;nodegroupName&quot;: &quot;mycorp-env-app-k8s-v1_33-20260...003&quot;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;nodegroupArn&quot;: &quot;arn:aws:eks:us-east-2:xxxx:nodegroup/mycorp-env-app-k8s/mycorp-env-app-k8s-v1_33-202....03/2cce8....c7&quot;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;clusterName&quot;: &quot;mycorp-env-app-k8s&quot;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;version&quot;: &quot;1.33&quot;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;releaseVersion&quot;: &quot;1.33.8-20260317&quot;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;createdAt&quot;: &quot;2026-03-20T12:41:07.961000+00:00&quot;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;modifiedAt&quot;: &quot;2026-03-22T09:21:58.892000+00:00&quot;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;status&quot;: &quot;ACTIVE&quot;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;capacityType&quot;: &quot;ON_DEMAND&quot;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;scalingConfig&quot;: {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;minSize&quot;: 2,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;maxSize&quot;: 10,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;desiredSize&quot;: 2&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;instanceTypes&quot;: [&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;m5.large&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ],&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;subnets&quot;: [&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;subnet-02xxx&quot;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;subnet-00xxx&quot;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;subnet-04xxx&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ],&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;&lt;b&gt;amiType&lt;/b&gt;&quot;: &quot;AL2023_x86_64_STANDARD&quot;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;&lt;b&gt;nodeRole&lt;/b&gt;&quot;: &quot;arn:aws:iam::xxx:role/mycorp-env-app-k8s-v1_33-eks-node-group&quot;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;&lt;b&gt;labels&lt;/b&gt;&quot;: {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;Environment&quot;: &quot;prod&quot;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;mycorp/node-type&quot;: &quot;v1.33&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;resources&quot;: {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;&lt;b&gt;autoScalingGroups&lt;/b&gt;&quot;: [&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;&lt;b&gt;name&lt;/b&gt;&quot;: &quot;mycorp-env-app-k8s-v1_33-202603...dc7&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;health&quot;: {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;issues&quot;: []&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;updateConfig&quot;: {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;maxUnavailablePercentage&quot;: 33&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;launchTemplate&quot;: {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;name&quot;: &quot;mycorp-env-app-k8s-v1_33-202...0001&quot;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;version&quot;: &quot;1&quot;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;id&quot;: &quot;lt-xxx&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;tags&quot;: {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;ClusterName&quot;: &quot;mycorp-env-app-k8s&quot;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;Environment&quot;: &quot;prod&quot;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;terraform-aws-modules&quot;: &quot;eks&quot;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;Terraform&quot;: &quot;true&quot;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;Name&quot;: &quot;mycorp-env-app-k8s-v1_33&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If we are using &lt;a href=&quot;https://registry.terraform.io/modules/terraform-aws-modules/eks/aws/latest&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;terraform-aws-modules/eks/aws&lt;/a&gt;&amp;nbsp;to provision EKS cluster and within it we define EKS-managed node groups, this module will create AWS Autoscaling Group (ASG) for each of them. Their names can be read from module&#39;s output variable&amp;nbsp;&lt;a href=&quot;https://registry.terraform.io/modules/terraform-aws-modules/eks/aws/latest#output_eks_managed_node_groups_autoscaling_group_names&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;eks_managed_node_groups_autoscaling_group_names&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If we inspect the labels on one such ASG, we can see that this Terraform module attached labels on it, so CAS can discover it and manage its parameters (usually just desired_size which is used for increasing or decreasing the number of current EC2 instances):&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;b&gt;% aws autoscaling describe-auto-scaling-groups \&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;b&gt;&amp;nbsp; --auto-scaling-group-names eks-mycorp-env-app-k8s-v1_33-20260320...4-2c...8 \&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;b&gt;&amp;nbsp; --query &quot;AutoScalingGroups[].Tags[?starts_with(Key, &#39;k8s.io/cluster-autoscaler&#39;)]&quot; \&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;b&gt;&amp;nbsp; --region us-east-2 \&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;b&gt;&amp;nbsp; --profile my_profile&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;[&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; [&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;ResourceId&quot;: &quot;eks-mycorp-env-app-k8s-v1_33-20260320...4-2c...8&quot;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;ResourceType&quot;: &quot;auto-scaling-group&quot;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;Key&quot;: &quot;&lt;b&gt;k8s.io/cluster-autoscaler/enabled&lt;/b&gt;&quot;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;Value&quot;: &quot;&lt;b&gt;true&lt;/b&gt;&quot;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;PropagateAtLaunch&quot;: true&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;ResourceId&quot;: &quot;eks-mycorp-env-app-k8s-v1_33-20260320...4-2c...8&quot;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;ResourceType&quot;: &quot;auto-scaling-group&quot;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;Key&quot;: &quot;&lt;b&gt;k8s.io/cluster-autoscaler/mycorp-env-app-k8s&lt;/b&gt;&quot;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;Value&quot;: &quot;&lt;b&gt;owned&lt;/b&gt;&quot;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;PropagateAtLaunch&quot;: true&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; ]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In the example above,&amp;nbsp;&lt;span style=&quot;font-family: courier;&quot;&gt;mycorp-env-app-k8s&lt;/span&gt; is the name of the cluster.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;If cluster is overprovisioned, why Cluster Autoscaler doesn&#39;t scale nodes down automatically?&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If Cluster Autoscaler is running but not shrinking the cluster, it&#39;s usually because:&lt;/div&gt;&lt;div&gt;&lt;ul data-path-to-node=&quot;14&quot;&gt;&lt;li&gt;&lt;p data-path-to-node=&quot;14,0,0&quot;&gt;&lt;b data-index-in-node=&quot;0&quot; data-path-to-node=&quot;14,0,0&quot;&gt;System Pods:&lt;/b&gt; Pods like &lt;code data-index-in-node=&quot;23&quot; data-path-to-node=&quot;14,0,0&quot;&gt;kube-dns&lt;/code&gt; or &lt;code data-index-in-node=&quot;35&quot; data-path-to-node=&quot;14,0,0&quot;&gt;metrics-server&lt;/code&gt; don&#39;t have PDBs (Pod Disruption Budgets) and CA is afraid to move them.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p data-path-to-node=&quot;14,1,0&quot;&gt;&lt;b data-index-in-node=&quot;0&quot; data-path-to-node=&quot;14,1,0&quot;&gt;Local Storage:&lt;/b&gt; A pod is using &lt;code data-index-in-node=&quot;30&quot; data-path-to-node=&quot;14,1,0&quot;&gt;emptyDir&lt;/code&gt; or local storage.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p data-path-to-node=&quot;14,2,0&quot;&gt;&lt;b data-index-in-node=&quot;0&quot; data-path-to-node=&quot;14,2,0&quot;&gt;Annotation:&lt;/b&gt; A pod has the &lt;code data-index-in-node=&quot;26&quot; data-path-to-node=&quot;14,2,0&quot;&gt;&quot;cluster-autoscaler.kubernetes.io/safe-to-evict&quot;: &quot;false&quot;&lt;/code&gt; annotation.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p data-path-to-node=&quot;14,2,0&quot;&gt;Manual Overrides: Check if someone manually updated the Auto Scaling Group (ASG) or the EKS Managed Node Group settings in the AWS Console. Terraform won&#39;t automatically &quot;downgrade&quot; those nodes until the next terraform apply or a node recycle.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p data-path-to-node=&quot;14,2,0&quot;&gt;If nodes are very old, they are &quot;frozen&quot; in time. Even if you changed your Terraform to smaller EC2 instances recently, EKS Managed Node Groups do not automatically replace existing nodes just because the configuration changed. They wait for a triggered update or a manual recycling of the nodes.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;How to fix this overprovisioning?&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Since your current Terraform state says you want e.g. 2 nodes of m5.large, but the reality is e.g. 4 nodes of m5.xlarge, you need to force a sync.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step 1: Check for Drift&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Run a terraform plan. It will likely show that it wants to update the Launch Template or the Node Group version to switch from xlarge back to large.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step 2: Trigger a Rolling Update&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you apply the Terraform and nothing happens to the existing nodes, you need to tell EKS to recycle them. You can do this via the AWS CLI:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;aws eks update-nodegroup-version \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; --cluster-name &amp;lt;your-cluster-name&amp;gt; \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; --nodegroup-name &amp;lt;your-nodegroup-name&amp;gt; \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; --force&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Note: This will gracefully terminate nodes one by one and replace them with the new m5.large type defined in your TF.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Cluster Autoscaler VS Karpenter&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;CAS (Cluster Autoscaler) and Karpenter are Kubernetes tools for adjusting node capacity based on workload, with CAS relying on fixed node groups and slow, infrastructure-driven scaling. Karpenter is a faster, modern, open-source, workload-driven node provisioner that directly interacts with cloud APIs, improving efficiency and cost-optimization.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Cluster Autoscaler (CAS): Operates by adjusting the size of specific, pre-defined node groups (e.g., autoscaling groups). It is generally better suited for smaller, predictable, or steady-state workloads where strict node group management is preferred.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Karpenter: Evaluates pending pods and launches optimally sized nodes directly, bypassing the need for manual node group management. It is ideal for high-churn, highly dynamic, and cost-sensitive, large-scale production environments.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;While both tools scale Kubernetes nodes to meet pod demand, they use fundamentally different approaches. Cluster Autoscaler (CA) is the traditional, &quot;group-based&quot; tool that &lt;u&gt;adds nodes to existing pools&lt;/u&gt;, whereas Karpenter is a &quot;provisioning&quot; tool that directly &lt;u&gt;creates the specific instances&lt;/u&gt; your applications need.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Quick Feature Comparison Table&lt;/h3&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Scaling Logic&lt;/b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Cluster Autoscaler (CA): &lt;u&gt;Scales pre-defined node groups (ASGs)&lt;/u&gt;&lt;/li&gt;&lt;li&gt;Karpenter: &lt;u&gt;Directly provisions individual EC2 instances.&lt;/u&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Speed&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Cluster Autoscaler (CA): Slower; waits for cloud provider group updates&lt;/li&gt;&lt;li&gt;Karpenter: Faster; provisions nodes in seconds via direct APIs;&amp;nbsp;better for rapid, &quot;spiky&quot; traffic.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Cost Control&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Cluster Autoscaler (CA): Limited; uses fixed node sizes in groups.&lt;/li&gt;&lt;li&gt;Karpenter: High; picks the cheapest/optimal instance for the pod. It&amp;nbsp;has built-in node consolidation, which intelligently reduces costs by binpacking, or packing, pods onto fewer, more efficient nodes.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Complexity&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Cluster Autoscaler (CA): Higher; must manage multiple node groups.&lt;/li&gt;&lt;li&gt;Karpenter: Lower; one provisioner can handle many pod types.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Flexibility&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Karpenter: supports diverse instance types and, while commonly used with AWS, it can be used with other providers.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Configuration&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Karpenter uses Kubernetes-native YAML for defining node pools and node classes.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Key Differences&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Infrastructure Model:&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;CA asks, &quot;How many more of these pre-configured nodes do I need?&quot;.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Karpenter asks, &quot;What specific resources (CPU, RAM, GPU) does this pending pod need right now?&quot; and builds a node to match.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;b&gt;Node Groups:&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;CA requires you to manually define and maintain Auto Scaling Groups (ASGs) for different instance types or zones.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Karpenter bypasses ASGs entirely, allowing it to &quot;mix and match&quot; instance types dynamically in a single cluster.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;b&gt;Consolidation:&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Karpenter actively monitors the cluster to see if it can move pods to fewer or cheaper nodes to save money (bin-packing).&amp;nbsp;&lt;/li&gt;&lt;li&gt;While CA has a &quot;scale-down&quot; feature, it is less aggressive at optimizing for cost.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;b&gt;Spot Instance Management:&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Karpenter handles Spot interruptions and price changes more natively, selecting the most stable and cost-efficient Spot instances in real-time.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Which should you choose?&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Use Cluster Autoscaler if you need a stable, battle-tested solution that works across multiple cloud providers (GCP, Azure) or if your workloads are very predictable and don&#39;t require rapid scaling.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Use Karpenter &lt;b&gt;&lt;u&gt;if you are on AWS EKS&lt;/u&gt;&lt;/b&gt;, need to scale up hundreds of nodes quickly, want to heavily use Spot instances, or want to reduce the operational burden of managing dozens of node groups.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Disable Cluster Autoscaler if you plan to use Karpenter. Having both leads to race conditions and wasted cost.&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;When to Run Both Together&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It&#39;s generally not recommended to run Cluster Autoscaler and Karpenter together in the same cluster. However, there are specific scenarios where it might be acceptable:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Valid use cases for running both:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Migration period: Transitioning from Cluster Autoscaler to Karpenter, where you temporarily run both while gradually moving workloads&lt;/li&gt;&lt;li&gt;Hybrid node management: Managing distinct, non-overlapping node groups where Cluster Autoscaler handles some node groups and Karpenter handles others (though this adds complexity)&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;When It&#39;s Not Recommended (and Why)&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Primary reasons to avoid running both:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Conflicting decisions: Both tools make independent scaling decisions, which can lead to:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Race conditions where both try to provision nodes simultaneously&lt;/li&gt;&lt;li&gt;Inefficient resource allocation&lt;/li&gt;&lt;li&gt;Unpredictable scaling behavior&lt;/li&gt;&lt;li&gt;One tool removing nodes the other just provisioned&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Increased operational complexity:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Two systems to monitor, troubleshoot, and maintain&lt;/li&gt;&lt;li&gt;Doubled configuration overhead&lt;/li&gt;&lt;li&gt;More difficult to understand which tool made which scaling decision&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Resource contention: Both tools consume cluster resources and API server capacity, adding unnecessary load.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;No significant benefits: Karpenter can handle everything Cluster Autoscaler does, often more efficiently, so there&#39;s rarely a technical need for both.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;EKS-Specific Considerations&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The same principles apply to AWS EKS clusters, with some additional context:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;EKS particularities:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Karpenter was designed specifically for AWS/EKS and integrates deeply with EC2 APIs&lt;/li&gt;&lt;li&gt;Karpenter typically provides better performance on EKS (faster provisioning, better bin-packing)&lt;/li&gt;&lt;li&gt;If you&#39;re on EKS, the general recommendation is to choose Karpenter over Cluster Autoscaler for new deployments&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Migration best practice for EKS: If migrating from Cluster Autoscaler to Karpenter on EKS, ensure they manage completely separate node groups, and complete the migration as quickly as feasible to minimize the period of running both.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;How to migrate pods from nodes deployed by Cluster Autoscaler to those deployed by Karpenter?&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you&#39;d rather use Karpenter for everything, you should eventually set your min_size, max_size, and desired_size to 0 in this node group and let Karpenter handle the provisioning instead.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;---&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.bojankomazec.com/feeds/2263684984619184493/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4912226416400969049/2263684984619184493' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/2263684984619184493'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/2263684984619184493'/><link rel='alternate' type='text/html' href='http://www.bojankomazec.com/2026/02/kubernetes-cluster-autoscaler.html' title='Kubernetes Cluster Autoscaler'/><author><name>Bojan Komazec</name><uri>http://www.blogger.com/profile/05437236807206825832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNcIpCzZVp3_zhSgcHAbs4YGdJzLIASdHB-KYbFKNi3lnjVygRjX4fDjnxWOXjrkqWuVOeP1Liq5LHCz-i8dwOfoo8M2otsV1D7UArIXfLoNZkx4MXG7T0u0GEHpHbjBklyjafBfwojeGxQrM7FP2XxSk1SZV5VTSQ4d2YdcVUSTpPUHtHNC7FXNiqQy4/s72-w638-h640-c/Screenshot%202024-07-27%20at%2023.26.17.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4912226416400969049.post-7440593222308880178</id><published>2026-02-06T12:04:00.004+00:00</published><updated>2026-02-06T12:04:36.430+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Autoscaling"/><category scheme="http://www.blogger.com/atom/ns#" term="DevOps"/><category scheme="http://www.blogger.com/atom/ns#" term="Kubernetes"/><category scheme="http://www.blogger.com/atom/ns#" term="Metrics"/><title type='text'>Kubernetes Metrics Server</title><content type='html'>&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNcIpCzZVp3_zhSgcHAbs4YGdJzLIASdHB-KYbFKNi3lnjVygRjX4fDjnxWOXjrkqWuVOeP1Liq5LHCz-i8dwOfoo8M2otsV1D7UArIXfLoNZkx4MXG7T0u0GEHpHbjBklyjafBfwojeGxQrM7FP2XxSk1SZV5VTSQ4d2YdcVUSTpPUHtHNC7FXNiqQy4/s1178/Screenshot%202024-07-27%20at%2023.26.17.png&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1178&quot; data-original-width=&quot;1176&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNcIpCzZVp3_zhSgcHAbs4YGdJzLIASdHB-KYbFKNi3lnjVygRjX4fDjnxWOXjrkqWuVOeP1Liq5LHCz-i8dwOfoo8M2otsV1D7UArIXfLoNZkx4MXG7T0u0GEHpHbjBklyjafBfwojeGxQrM7FP2XxSk1SZV5VTSQ4d2YdcVUSTpPUHtHNC7FXNiqQy4/w638-h640/Screenshot%202024-07-27%20at%2023.26.17.png&quot; width=&quot;638&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Kubernetes Metrics Server is a foundational component required by several other critical cluster modules and tools:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1. Horizontal Pod Autoscaler (HPA)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;2. Vertical Pod Autoscaler (VPA)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Purpose: While HPA adds more pods, the Vertical Pod Autoscaler (VPA) adjusts the CPU and memory requests/limits of existing pods.&lt;/li&gt;&lt;li&gt;Dependency: VPA relies on Metrics Server for the real-time resource data it uses to recommend or apply these resource changes.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;2. Native CLI Observability (kubectl top)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Purpose: Commands used for ad-hoc debugging and performance monitoring.&lt;/li&gt;&lt;li&gt;Dependency: Both kubectl top pods and kubectl top nodes query the Metrics API directly. Without the server, these commands will return an error.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;3. Kubernetes Dashboard&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Purpose: A web-based UI for managing and troubleshooting clusters.&lt;/li&gt;&lt;li&gt;Dependency: The Kubernetes Dashboard uses Metrics Server to display resource usage graphs and live statistics for nodes and pods.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;4. Third-Party Monitoring Tools &amp;amp; Adapters&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Custom Metrics Adapters: Some adapters that bridge external sources (like CloudWatch or Datadog) to Kubernetes may use the standard Metrics API for fallback or basic resource data.&lt;/li&gt;&lt;li&gt;Resource Management Tools: Operational tools such as Goldilocks, which suggests &quot;just right&quot; resource requests, often depend on the baseline metrics provided by this server.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Key Distinction&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;While the Metrics Server is essential for these control loops (HPA, VPA), it is not a replacement for a full observability stack like Prometheus. It only stores a short-term, in-memory snapshot and does not provide historical data&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;How to to install the Metrics Server as an EKS Community Add-on to enable these features?&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In March 2025, AWS introduced a new catalog of community add-ons that includes the Metrics Server. This allows you to manage it directly through EKS-native tools like any other AWS-managed add-on (e.g., VPC CNI or CoreDNS).&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Method 1: Using the AWS Management Console&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The easiest way to install it is through the EKS console:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Navigate to your EKS cluster in the AWS Console.&lt;/li&gt;&lt;li&gt;Select the Add-ons tab and click Get more add-ons.&lt;/li&gt;&lt;li&gt;Scroll down to the &lt;i&gt;Community add-ons&lt;/i&gt; section.&lt;/li&gt;&lt;li&gt;Find &lt;i&gt;Metrics Server&lt;/i&gt;, select it, and click Next.&lt;/li&gt;&lt;li&gt;Choose the desired version (usually the latest recommended) and click Create.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Method 2: Using the AWS CLI&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can also install the community add-on via the command line:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;aws eks create-addon \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; --cluster-name &amp;lt;YOUR_CLUSTER_NAME&amp;gt; \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; --addon-name metrics-server&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Verification&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Once the installation status moves to Active, verify that the pods are running in the kube-system namespace:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl get deployment metrics-server -n kube-system&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Finally, test that the Metrics API is responding:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl top nodes&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Note: If you are using AWS Fargate, you may need to update the containerPort from 10250 to 10251 in the deployment configuration to ensure compatibility with Fargate&#39;s networking constraints.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Metrics Server Configuration&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To configure custom resource limits for the Metrics Server EKS community add-on, you can use Configuration Values during installation or update. This is essential for high-pod-count clusters where the default allocation may lead to OOMKilled errors.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;1. Scaling Recommendations&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The Metrics Server&#39;s resource consumption scales linearly with your cluster&#39;s size. Baseline recommendations include:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;CPU: Approximately 1 millicore per node in the cluster.&lt;/li&gt;&lt;li&gt;Memory: Approximately 2 MB of memory per node.&lt;/li&gt;&lt;li&gt;Large Clusters: If your cluster exceeds 100 nodes, it is recommended to double these defaults and monitor performance.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;2. How to Apply Custom Limits&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can provide a JSON or YAML configuration block via the AWS EKS Add-ons API.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Via AWS CLI&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Use the configuration-values flag to pass your resource overrides:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;aws eks create-addon \&lt;/div&gt;&lt;div&gt;&amp;nbsp; --cluster-name &amp;lt;YOUR_CLUSTER_NAME&amp;gt; \&lt;/div&gt;&lt;div&gt;&amp;nbsp; --addon-name metrics-server \&lt;/div&gt;&lt;div&gt;&amp;nbsp; --configuration-values &#39;{&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &quot;resources&quot;: {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;requests&quot;: { &quot;cpu&quot;: &quot;100m&quot;, &quot;memory&quot;: &quot;200Mi&quot; },&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;limits&quot;: { &quot;cpu&quot;: &quot;200m&quot;, &quot;memory&quot;: &quot;500Mi&quot; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; }&#39;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Via AWS Console&lt;/h4&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Go to the Add-ons tab in your EKS cluster.&lt;/li&gt;&lt;li&gt;Click Edit on the metrics-server add-on.&lt;/li&gt;&lt;li&gt;Expand the Optional configuration settings.&lt;/li&gt;&lt;li&gt;Paste the JSON configuration into the Configuration values text box.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;3. Critical Configuration for High Traffic&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In addition to resource limits, you may want to adjust the scraping frequency to make HPA more responsive.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Metric Resolution: The default is 60s. For faster scaling, add --metric-resolution=15s to the container arguments via the same configuration block.&lt;/li&gt;&lt;li&gt;High Availability: The community add-on defaults to 2 replicas to prevent downtime during scaling events.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.bojankomazec.com/feeds/7440593222308880178/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4912226416400969049/7440593222308880178' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/7440593222308880178'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/7440593222308880178'/><link rel='alternate' type='text/html' href='http://www.bojankomazec.com/2026/02/kubernetes-metrics-server.html' title='Kubernetes Metrics Server'/><author><name>Bojan Komazec</name><uri>http://www.blogger.com/profile/05437236807206825832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNcIpCzZVp3_zhSgcHAbs4YGdJzLIASdHB-KYbFKNi3lnjVygRjX4fDjnxWOXjrkqWuVOeP1Liq5LHCz-i8dwOfoo8M2otsV1D7UArIXfLoNZkx4MXG7T0u0GEHpHbjBklyjafBfwojeGxQrM7FP2XxSk1SZV5VTSQ4d2YdcVUSTpPUHtHNC7FXNiqQy4/s72-w638-h640-c/Screenshot%202024-07-27%20at%2023.26.17.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4912226416400969049.post-209440489779180388</id><published>2026-02-05T12:26:00.021+00:00</published><updated>2026-03-15T22:10:55.358+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Autoscaling"/><category scheme="http://www.blogger.com/atom/ns#" term="DevOps"/><category scheme="http://www.blogger.com/atom/ns#" term="Horizontal Pod Autoscaler"/><category scheme="http://www.blogger.com/atom/ns#" term="HPA"/><category scheme="http://www.blogger.com/atom/ns#" term="Karpenter"/><category scheme="http://www.blogger.com/atom/ns#" term="Kubernetes"/><title type='text'>Horizontal Pod Autoscaler (HPA) </title><content type='html'>&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNcIpCzZVp3_zhSgcHAbs4YGdJzLIASdHB-KYbFKNi3lnjVygRjX4fDjnxWOXjrkqWuVOeP1Liq5LHCz-i8dwOfoo8M2otsV1D7UArIXfLoNZkx4MXG7T0u0GEHpHbjBklyjafBfwojeGxQrM7FP2XxSk1SZV5VTSQ4d2YdcVUSTpPUHtHNC7FXNiqQy4/s1178/Screenshot%202024-07-27%20at%2023.26.17.png&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1178&quot; data-original-width=&quot;1176&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNcIpCzZVp3_zhSgcHAbs4YGdJzLIASdHB-KYbFKNi3lnjVygRjX4fDjnxWOXjrkqWuVOeP1Liq5LHCz-i8dwOfoo8M2otsV1D7UArIXfLoNZkx4MXG7T0u0GEHpHbjBklyjafBfwojeGxQrM7FP2XxSk1SZV5VTSQ4d2YdcVUSTpPUHtHNC7FXNiqQy4/w638-h640/Screenshot%202024-07-27%20at%2023.26.17.png&quot; width=&quot;638&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div&gt;The &lt;b&gt;Horizontal Pod Autoscaler (HPA)&lt;/b&gt; serves to automatically align your application&#39;s capacity with its real-time demand by &lt;u&gt;adjusting the number of pod replicas&lt;/u&gt;. Its operation depends on several critical components and configurations within an EKS or Kubernetes cluster.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Kubernetes Horizontal Pod Autoscaler (HPA) is a built-in Kubernetes controller&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Standard Kubernetes autoscaling mechanism&lt;/li&gt;&lt;li&gt;HPA API is available out of the box. It is a part of the Core Kubernetes and does not need installing third-party controllers or addons.&lt;/li&gt;&lt;ul&gt;&lt;li&gt;But it is NOT fully operational &quot;by default&quot; in a standard Amazon EKS cluster. API definitions for HPA resources exist within Kubernetes, but they require a &lt;b&gt;Metrics Server&lt;/b&gt; to function—which AWS does not install for you automatically during cluster creation.&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;It&#39;s &quot;standard&quot; in the sense that the feature is built into the Kubernetes control plane, but it isn&#39;t &quot;automatic&quot; in the sense that it guesses which of your apps need scaling.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Think of it like a Thermostat: The thermostat (&lt;b&gt;HPA Controller&lt;/b&gt;) is already installed on the wall (&lt;b&gt;EKS Control Plane&lt;/b&gt;), but it won&#39;t turn on the AC until you tell it what the Target Temperature (&lt;b&gt;CPU/Memory threshold&lt;/b&gt;) is and which room (&lt;b&gt;Deployment&lt;/b&gt;) to monitor.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here is why a manifest is required for every app:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;1. The Controller vs. The Resource&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;The Controller (The &quot;How&quot;)&lt;/b&gt;: This is a loop running inside the EKS Control Plane. It is always active, waiting for instructions. Kubernetes HPA Documentation explains this loop.&lt;/div&gt;&lt;div&gt;&lt;b&gt;The Resource (The &quot;What&quot;)&lt;/b&gt;: The &lt;b&gt;&lt;u&gt;HPA Manifest &lt;/u&gt;&lt;/b&gt;is that instruction. It tells the controller: &quot;Watch Deployment X, keep CPU at 50%, and don&#39;t go above 10 pods.&quot;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;2. Manual Intent&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Kubernetes follows a Declarative Model. It never assumes you want to scale. If it scaled every pod automatically, a single bug in your code (like an infinite loop) could scale your cluster to 1,000 nodes and drain your AWS budget instantly. &lt;u&gt;You must explicitly opt-in by creating the HPA resource&lt;/u&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;3. Unique Criteria for Every App&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Not all apps scale the same way:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Web API: Might scale when CPU hits 70%.&lt;/li&gt;&lt;li&gt;Background Worker: Might scale based on Memory usage.&lt;/li&gt;&lt;li&gt;Data Processor: Might scale based on a Custom Metric like SQS queue depth.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Summary: What is &quot;Standard&quot;?&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;What is standard is the API definition and the Controller. What is not standard is your specific application&#39;s scaling logic.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To see what the HPA Controller is looking for, you can check your Deployment&#39;s resource requests via kubectl:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl get deployment &amp;lt;name&amp;gt; -o yaml | grep resources -A 5&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;h4&gt;&lt;br /&gt;&lt;/h4&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Key Features:&lt;/h3&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Pod Scaling: Adjusts the number of pod replicas to match the demand.&lt;/li&gt;&lt;li&gt;Automatically scales up/down the number of&amp;nbsp;&lt;b&gt;&lt;u&gt;pods&lt;/u&gt;&lt;/b&gt;&amp;nbsp;in a deployment, replication controller, or replica set based on observed CPU utilization, memory or other selected custom/external&amp;nbsp;metrics.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Purpose&lt;/h3&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Dynamic Scalability: Automatically adds pods during traffic surges to maintain performance and removes them during low-traffic periods to reduce waste.&lt;/li&gt;&lt;li&gt;Cost Optimisation: Ensures you only pay for the compute resources currently needed rather than over-provisioning for peak loads.&lt;/li&gt;&lt;li&gt;Resilience &amp;amp; Availability: Prevents application crashes and outages by proactively scaling out before resources are fully exhausted.&lt;/li&gt;&lt;li&gt;Operational Efficiency: Replaces manual intervention with &quot;architectural definition,&quot; allowing infrastructure to manage itself based on predefined performance rules.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Dependencies&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;HPA cannot function on its own; it requires the following &quot;links&quot; and infrastructure:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;Metrics Server (The Aggregator)&lt;/b&gt;: This is the most critical infrastructure dependency. The HPA controller queries the Metrics API (typically provided by the Metrics Server) to get real-time CPU and memory usage data.&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Both HPA and VPA rely on the metrics.k8s.io API to retrieve CPU and memory data. Because EKS is a managed control plane, AWS keeps it &quot;lean&quot; by leaving the choice of metrics provider to you.&lt;/li&gt;&lt;li&gt;HPA: Without Metrics Server, HPA will show a status of &lt;span style=&quot;font-family: courier;&quot;&gt;&amp;lt;unknown&amp;gt;&lt;/span&gt; for its targets.&lt;/li&gt;&lt;li&gt;VPA: Without Metrics Server, the VPA Recommender cannot analyze resource usage to suggest changes&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;Resource Requests (The Baseline)&lt;/b&gt;: &lt;u&gt;For the HPA to calculate percentage-based utilization (e.g., &quot;scale at 50% CPU&quot;), the target Deployment must have &lt;span style=&quot;font-family: courier;&quot;&gt;resources.requests&lt;/span&gt; defined.&lt;/u&gt; Without these, the HPA has no 100% baseline to measure against and will show an &lt;span style=&quot;font-family: courier;&quot;&gt;unknown&lt;/span&gt; status.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Controller Manager&lt;/b&gt;: The HPA logic runs as a control loop within the Kubernetes kube-controller-manager, which periodically (every 15 seconds by default) evaluates the metrics and updates the desired replica count.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Scalable Target&lt;/b&gt;: The HPA must be linked to a resource that supports scaling, such as a Deployment, ReplicaSet, or StatefulSet.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Cluster Capacity (Node Scaling)&lt;/b&gt;: While HPA scales pods, it depends on an underlying node scaler (like Karpenter or Cluster Autoscaler) to provide new EC2 instances if the cluster runs out of physical space for the additional pods.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Installation and Configuration&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To use HPA ensure the Metrics Server is installed in your cluster to provide resource metrics.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Once the Metrics Server is installed, HPA is ready to go. It is a core Kubernetes controller, so you don&#39;t need to install any additional software beyond the metrics provider. We can simply create an HPA resource for our deployment:&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl autoscale deployment our-deployment \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;--cpu=50% \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;--min=1 \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;--max=10&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;We can also use the manifest:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;apiVersion: autoscaling/v2&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kind: &lt;b&gt;HorizontalPodAutoscaler&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;metadata:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; name: my-app-hpa&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; scaleTargetRef:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; apiVersion: apps/v1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; kind: Deployment&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; name: my-app&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &lt;b&gt;minReplicas&lt;/b&gt;: 2&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &lt;b&gt;maxReplicas&lt;/b&gt;: 10&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; metrics:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; - type: Resource&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; resource:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; name: cpu&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; target:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; type: Utilization&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; averageUtilization: 50&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;How to check if HPA is enabled in the cluster?&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% kubectl api-resources -o wide | grep autoscaling&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;NAME SHORTNAMES APIVERSION&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;NAMESPACED KIND&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;VERBS CATEGORIES&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: x-small;&quot;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;horizontalpodautoscalers&amp;nbsp; hpa&amp;nbsp; autoscaling/v2&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;true HorizontalPodAutoscaler&amp;nbsp; create,delete,deletecollection,get,list,patch,update,watch&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;all&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;In which namespace do HorizontalPodAutoscalers reside in?&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;In AWS EKS, HorizontalPodAutoscalers (HPA) are namespaced resources, meaning they belong in the same namespace as the workload (e.g., Deployment or StatefulSet) they are intended to scale.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;While there is no single &quot;HPA namespace,&quot; here is how they are distributed and where related components live:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;1. The HPA Resource Namespace&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Application Namespace: When you create an HPA, you define it within the specific namespace where your application is running (e.g., default, production, or demo).&lt;/li&gt;&lt;li&gt;Constraint: An HPA can only scale a target resource (like a Deployment) that exists in that same namespace.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;2. Infrastructure &amp;amp; Metrics Namespaces&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;While the HPA resource lives with your app, the supporting infrastructure often resides in system namespaces:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Metrics Server&lt;/b&gt;: This is a mandatory prerequisite for HPA on EKS. It is typically deployed in the kube-system namespace.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Custom Metrics Adapters&lt;/b&gt;: If you are scaling based on custom metrics (like Prometheus or CloudWatch), components like the prometheus-adapter or k8s-cloudwatch-adapter may be installed in kube-system or a dedicated namespace like custom-metrics.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Cluster Autoscaler:&lt;/b&gt;&amp;nbsp;Often confused with HPA, the Cluster Autoscaler (which scales EC2 nodes rather than pods) also typically resides in the kube-system namespace.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To find all HPAs across your entire EKS cluster, you can run:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl get hpa -A&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We might have an output like this:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% kubectl get horizontalpodautoscalers -A&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;No resources found&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;It is possible to get &quot;No resources found&quot; for several reasons, despite the resource being namespaced. This usually means that while the API type exists, no actual instances of that resource have been created in your EKS cluster yet.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Why you see &quot;No resources found&quot;:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;HPA is not yet created&lt;/b&gt;:&amp;nbsp;&lt;b&gt;&lt;u&gt;By default, EKS clusters do not come with any HorizontalPodAutoscalers pre-configured.&lt;/u&gt;&lt;/b&gt;&amp;nbsp;&lt;b&gt;&lt;u&gt;You must explicitly create one for your application.&lt;/u&gt;&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Metrics Server Missing&lt;/b&gt;: HPAs rely on the Kubernetes Metrics Server to function. While the HPA object can be created without it, it will show a status of &amp;lt;unknown&amp;gt; and may not appear if you are looking for active scaling.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Namespace Context:&lt;/b&gt;&amp;nbsp;Even with -A (all namespaces), if no user or system service has defined an HPA resource, the list will be empty.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;How to Verify and Fix:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Check if Metrics Server is running&lt;/b&gt;:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Run&amp;nbsp;&lt;span style=&quot;font-family: courier;&quot;&gt;kubectl get deployment metrics-server -n kube-system&lt;/span&gt;. If it’s missing, you can install it via the AWS EKS Add-ons in the console or via kubectl apply.&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;kubectl get all -A | grep metrics-server&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Check API availability&lt;/b&gt;:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Run kubectl api-resources | grep hpa to confirm the cluster recognizes the resource type.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;Create a test HPA&lt;/b&gt;:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;If you have a deployment named my-app, try creating one:&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;kubectl autoscale deployment my-app \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;--cpu=50% \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;--min=1 \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;--max=10&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Note: If you are using a newer version of EKS (like 1.31) with Auto Mode, some autoscaling is handled automatically by the control plane, but standard HPAs still need to be manually defined if you want pod-level scaling based on custom metrics.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;% kubectl get all -A | grep metrics-server&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;default pod/metrics-server-5db5f64c66-sjd2p&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1/1&amp;nbsp; &amp;nbsp; &amp;nbsp;Running&amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 205d&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;default service/metrics-server&amp;nbsp; ClusterIP&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;172.21.76.224&amp;nbsp; &amp;nbsp; &amp;lt;none&amp;gt;&amp;nbsp; 443/TCP&amp;nbsp; 95d&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;default deployment.apps/metrics-server&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1/1&amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;295d&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier; font-size: xx-small;&quot;&gt;default replicaset.apps/metrics-server-5db5f64c66&amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;295d&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;This behavior occurs because no instances of HorizontalPodAutoscaler (HPA) have been created yet, even though the supporting infrastructure (Metrics Server) and API are active.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In Kubernetes,&amp;nbsp;&lt;b&gt;&lt;u&gt;the presence of the metrics-server and the autoscaling/v2 API resource does not mean an HPA is automatically running for your apps&lt;/u&gt;&lt;/b&gt;.&amp;nbsp;&lt;b&gt;&lt;u&gt;You must manually define an HPA for each deployment you want to scale.&amp;nbsp;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Why&amp;nbsp;&lt;span style=&quot;font-family: courier;&quot;&gt;kubectl get hpa -A&lt;/span&gt;&amp;nbsp;is empty&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Workloads are not yet auto-scaled: By default, EKS (and Kubernetes) does not apply HPAs to your deployments. You must explicitly create an HPA object that references your target Deployment or StatefulSet.&lt;/li&gt;&lt;li&gt;kubectl get all exclusion: Standard kubectl get all does not include HPAs in its output, which is why your previous command didn&#39;t show them even if they existed.&lt;/li&gt;&lt;li&gt;Namespace Location: While your metrics-server is in the default namespace (though typically it&#39;s in kube-system), HPAs must be created in the same namespace as the app they are scaling.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;b&gt;How to create your first HPA&lt;/b&gt;&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you have a deployment (e.g., named my-deployment) in the default namespace, you can create an HPA for it using this command:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl autoscale deployment my-deployment \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;--cpu=60%&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;--min=1 \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;--max=10&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;--cpu string&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;u&gt;Target CPU utilization over all the pods.&lt;/u&gt; When specified as a percentage (e.g.&quot;70%&quot; for 70% of requested CPU) it will target average utilization. When specified as quantity (e.g.&quot;500m&quot; for 500 milliCPU) it will target average value. Value without units is treated as a quantity with miliCPU being the unit (e.g.&quot;500&quot; is &quot;500m&quot;).&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;--memory string&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;u&gt;Target memory utilization over all the pods&lt;/u&gt;. When specified as a percentage (e.g.&quot;60%&quot; for 60% of requested memory) it will target average utilization. When specified as quantity (e.g.&quot;200Mi&quot; for 200 MiB, &quot;1Gi&quot; for 1 GiB) it will target average value. Value without units is treated as a quantity with mebibytes being the unit (e.g.&quot;200&quot; is &quot;200Mi&quot;).&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;span&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;div&gt;To interpret &lt;span style=&quot;font-family: courier;&quot;&gt;--cpu=60%&lt;/span&gt;, you have to look at it through the lens of your Pod&#39;s Resource Requests, not the actual capacity of the physical Node (EC2 instance).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1. The Reference Point: &quot;Requests&quot;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The 60% is a percentage of the CPU Request defined in your Deployment manifest.&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;If your Pod has request: 100m (0.1 CPU), the HPA will try to scale when average usage hits 60m.&lt;/li&gt;&lt;li&gt;If your Pod has request: 1000m (1 CPU), the HPA will try to scale when average usage hits 600m.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;Crucial Requirement: If you do not define resources.requests.cpu in your Deployment, the HPA will have no &quot;base&quot; to calculate from. It will show a status of &lt;span style=&quot;font-family: courier;&quot;&gt;&amp;lt;unknown&amp;gt;&lt;/span&gt; and will not scale.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;2. The Scaling Math&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The HPA uses a specific ratio to decide how many replicas you need. It isn&#39;t instantaneous; it calculates the &quot;desired&quot; number of pods using this formula:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;DesiredReplicas = ceil(CurrentReplicas x CurrentMetricValue/TargetMetricValue)&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Example Scenario:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Target: 60%&lt;/li&gt;&lt;li&gt;Current Replicas: 2&lt;/li&gt;&lt;li&gt;Current &lt;u&gt;Average Usage&lt;/u&gt;: 90%&lt;/li&gt;&lt;li&gt;Calculation: 2 x (90 / 60) = 3&lt;/li&gt;&lt;li&gt;Result: HPA will scale your deployment up to 3 replicas.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;3. What happens if usage exceeds 100%?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;How can usage go above 100%? If your CPU Limit is higher than your CPU Request (or if you have no limit), a pod can &quot;burst&quot; and use more than its requested amount.&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;If your request is 100m and your pod is using 120m, your utilization is 120%.&lt;/li&gt;&lt;li&gt;In this case, the HPA will aggressively scale up because you are significantly over your 60% target.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;4. Summary of your Command&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;When you run kubectl autoscale deployment my-deployment --cpu=60% --min=1 --max=10:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;The Floor: You will never have fewer than 1 pod, even if there is zero traffic.&lt;/li&gt;&lt;li&gt;The Ceiling: You will never have more than 10 pods, even if the CPU is screaming at 100% on all of them.&lt;/li&gt;&lt;li&gt;The Trigger: As soon as the average CPU usage across all running pods exceeds 60% of their requested value, the HPA will ask the Deployment to add more pods.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;A Common Pitfall&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The &quot;Flapping&quot; Effect: If you set your CPU target too low (like 10%) or your min and max too close together, your cluster might &quot;flap&quot;—constantly adding and removing pods. Kubernetes has a built-in stabilization window (usually 5 minutes for downscaling) to prevent this &quot;yo-yo&quot; behavior.&lt;/div&gt;&lt;span&gt;&lt;!--more--&gt;&lt;/span&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Verification Steps&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Once created, verify it with the following:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;List all HPAs: &lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl get hpa -A&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Check Metrics Flow: Since your metrics-server is running, ensure it is actually collecting data by running &lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl top pods -A&lt;/span&gt;. If this returns usage data, your HPA will be able to scale correctly.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Note: For HPA to function, your Deployment must have resource requests (specifically cpu) defined in its container spec, or the HPA will show &lt;span style=&quot;font-family: courier;&quot;&gt;&amp;lt;unknown&amp;gt; &lt;/span&gt;targets.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;How to configure metrics it needs to observe?&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;In AWS EKS, you set criteria for scaling in the spec section of a HorizontalPodAutoscaler (HPA) resource. You define thresholds through two primary blocks: metrics (to trigger scaling) and behavior (to control the rate and stability of scaling).&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;1. Setting Thresholds (metrics)&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The HPA calculates the required number of replicas based on the gap between current usage and your target.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Target Utilization: Typically set as a percentage of a pod&#39;s requested CPU or memory.&lt;/li&gt;&lt;li&gt;Where to define: Inside the metrics list in your HPA manifest.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;metrics:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;- type: Resource&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; resource:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; name: cpu&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; target:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; type: Utilization&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; averageUtilization: 60&amp;nbsp;&lt;span style=&quot;font-size: x-small;&quot;&gt;# Scale when average CPU exceeds 60% of requests&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;2. Setting Scaling Speed (behavior)&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Advanced scaling logic is set in the behavior block, allowing you to fine-tune how fast the cluster grows or shrinks.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Stabilization Window: Prevents &quot;flapping&quot; by making the HPA wait and look at past recommendations before acting.&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Scale-Up: Default is 0 seconds (instant growth).&lt;/li&gt;&lt;li&gt;Scale-Down: Default is 300 seconds (5 minutes) to ensure a spike is truly over before killing pods.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Policies: Restrict the absolute number or percentage of pods changed within a specific timeframe.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;behavior:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; scaleUp:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; stabilizationWindowSeconds: 0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; policies:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; - type: Percent&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; value: 100&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; periodSeconds: 15 # Double replicas every 15 seconds if needed&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; scaleDown:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; stabilizationWindowSeconds: 300&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; policies:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; - type: Pods&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; value: 1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; periodSeconds: 60 # Remove only 1 pod per minute for stability&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;3. Critical Prerequisites&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Resource Requests: You must define resources.requests in your Deployment manifest. HPA cannot calculate utilization percentages without this baseline.&lt;/li&gt;&lt;li&gt;Metrics Server: Must be running in your cluster (usually in kube-system or default) to provide the data HPA needs.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To link an HPA to your Deployment, the HPA uses a&amp;nbsp;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;b&gt;scaleTargetRef&lt;/b&gt;&lt;/span&gt;. This acts like a pointer, telling the HPA controller exactly which resource to watch and resize.&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1. Ensure your Deployment has &quot;Requests&quot;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The HPA cannot calculate percentages (like &quot;50% CPU&quot;) unless the Deployment defines what 100% looks like. Check your Deployment for a&amp;nbsp;&lt;span style=&quot;font-family: courier;&quot;&gt;resources.requests&amp;nbsp;&lt;/span&gt;block:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;# Inside your Deployment manifest&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; containers:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; - name: my-app&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; image: my-image&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; resources:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; requests:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cpu: &quot;250m&quot;&amp;nbsp; &amp;nbsp; # HPA uses this as the 100% baseline&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; memory: &quot;512Mi&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Create a file named hpa.yaml. The&amp;nbsp;&lt;span style=&quot;font-family: courier;&quot;&gt;scaleTargetRef&lt;/span&gt;&amp;nbsp;is the &quot;link&quot; that connects it to your app.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;apiVersion: autoscaling/v2&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kind: HorizontalPodAutoscaler&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;metadata:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; name: my-app-hpa&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; namespace: default # MUST be the same as your deployment&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &lt;b&gt;&lt;u&gt;scaleTargetRef&lt;/u&gt;&lt;/b&gt;:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; apiVersion: apps/v1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; kind: Deployment&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; name: my-deployment-name # &amp;lt;--- This is the &quot;Link&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; minReplicas: 2&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; maxReplicas: 10&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &lt;b&gt;metrics&lt;/b&gt;:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; - type: Resource&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; resource:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; name: cpu&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; target:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; type: Utilization&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;averageUtilization&lt;/b&gt;: 60 # Target 60% of requested CPU&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;3. Apply and Verify&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Run the following commands to put the link into action:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Apply the manifest:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl apply -f hpa.yaml&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Check the link:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl get hpa&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Wait about 30-60 seconds. If you see TARGETS: &amp;lt;unknown&amp;gt;/60%, the Metrics Server is still calculating.&lt;/div&gt;&lt;div&gt;If you see TARGETS: 0%/60% (or a specific number), the link is successful!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Pro Tip - The Quick Link: If you don&#39;t want to write YAML, you can create this link instantly via the CLI:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl autoscale deployment my-deployment-name \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;--cpu=60% \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;--min=2 \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;--max=10&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Replicas number settings in HPA vs Deployment&lt;/h2&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;The Deployment manifest and the HPA manifest handle pod counts in fundamentally different ways. Here is the breakdown of how they interact:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;1. The Deployment Manifest&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In a standard Deployment, you define a &lt;u&gt;static number of pods&lt;/u&gt; using the &lt;span style=&quot;font-family: courier;&quot;&gt;replicas&lt;/span&gt; field.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Static Nature: If you set replicas: 3, the &lt;b&gt;Deployment controller&lt;/b&gt; will always try to keep exactly 3 pods running.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;No Min/Max: There is no concept of &quot;range&quot; inside a Deployment. It doesn&#39;t know how to look at CPU usage or scale itself up or down based on traffic.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;# Inside a Deployment&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &lt;b&gt;replicas&lt;/b&gt;: 3&amp;nbsp; # This is a fixed instruction&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;2. The HPA Manifest&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The Horizontal Pod Autoscaler (HPA) is a separate resource that &quot;takes control&quot; of the Deployment&#39;s replica count. This is where your min and max boundaries live.&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;Dynamic Nature&lt;/b&gt;: The HPA monitors your pods (via &lt;b&gt;Metrics Server&lt;/b&gt;).&lt;/li&gt;&lt;li&gt;&lt;b&gt;Override Power:&lt;/b&gt; &lt;u&gt;When you link an HPA to a Deployment, the HPA dynamically updates the &lt;span style=&quot;font-family: courier;&quot;&gt;replicas&lt;/span&gt; field in the Deployment for you. If traffic is low, it sets it to your &lt;span style=&quot;font-family: courier;&quot;&gt;minReplicas&lt;/span&gt;; if traffic spikes, it pushes it toward &lt;span style=&quot;font-family: courier;&quot;&gt;maxReplicas&lt;/span&gt;.&lt;/u&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;# Inside an HPA&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; minReplicas: 2&amp;nbsp; # The floor&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; maxReplicas: 10 # The ceiling&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; scaleTargetRef:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; name: my-deployment # The Deployment to control&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;How They Work Together&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Think of the Deployment as the &quot;Engine&quot; and the HPA as the &quot;Cruise Control.&quot;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;The &quot;Deployment Conflict&quot; Warning&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;One mistake many engineers make is leaving a hardcoded replicas: 3 in their Deployment manifest while also using an HPA.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;What happens:&lt;/div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;You apply your Deployment with replicas: 3.&lt;/li&gt;&lt;li&gt;The HPA sees low traffic and scales the Deployment down to minReplicas: 1.&lt;/li&gt;&lt;li&gt;Later, you run kubectl apply on your Deployment file again.&lt;/li&gt;&lt;li&gt;The cluster briefly resets the pods to 3 because that&#39;s what&#39;s in your file, before the HPA notices and fights back to scale it back down to 1.&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;The Solution: Once you have an HPA configured, it is best practice to remove the replicas line from your Deployment manifest entirely. This ensures the HPA has sole authority over the pod count.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;---&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;HPA does not modify the replicas field in your Deployment manifest (the YAML file). Here&#39;s how it actually works:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;What HPA does: HPA dynamically updates the spec.replicas field of the live Deployment object in the Kubernetes API server (i.e., the in-cluster resource), not your source manifest file on disk. It does this by issuing a PATCH request to the API server whenever it decides to scale.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;What this means in practice:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Your deployment.yaml file stays unchanged — the replicas: 3 (or whatever you set) remains as-is on disk.&lt;/li&gt;&lt;li&gt;The actual running replica count in the cluster is controlled by HPA at runtime.&lt;/li&gt;&lt;li&gt;If you kubectl apply your manifest again, Kubernetes is smart enough (since k8s 1.21+ with server-side apply) to not override HPA&#39;s current value — but with client-side apply, re-applying can reset replicas back to what&#39;s in the file, which is a common footgun.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Recommended practice:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you&#39;re using HPA, you should either:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Omit replicas from your Deployment manifest entirely — Kubernetes defaults to 1, and HPA takes over immediately.&lt;/li&gt;&lt;li&gt;Or set it to a value within your HPA&#39;s minReplicas/maxReplicas range, and be aware of the re-apply caveat.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The control loop in short:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;HPA Controller &lt;/b&gt;(runs every 15s by default)&lt;/div&gt;&lt;div&gt;&amp;nbsp; → reads metrics (CPU, memory, custom)&lt;/div&gt;&lt;div&gt;&amp;nbsp; → calculates desired replicas&lt;/div&gt;&lt;div&gt;&amp;nbsp; → PATCHes the Deployment object in etcd&lt;/div&gt;&lt;div&gt;&amp;nbsp; → &lt;b&gt;Deployment controller &lt;/b&gt;reconciles actual pods&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So your manifest is the initial desired state, and HPA is a runtime override that continuously manages the live object — it never touches your files.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;---&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;h2&gt;HPA vs Karpenter&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In AWS EKS, it is perfectly normal to have Karpenter running without any HorizontalPodAutoscaler (HPA) manifests. This happens because they solve two entirely different scaling problems:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1. Karpenter vs. HPA: The &quot;Supply&quot; vs. &quot;Demand&quot; Gap&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;HPA manages Pods (The Demand): It decides how many pods you need (e.g., &quot;CPU is high, let&#39;s go from 2 pods to 5 pods&quot;).&lt;/li&gt;&lt;li&gt;Karpenter manages Nodes (The Supply): It provides the underlying infrastructure for those pods. It watches for pods that are &quot;Pending&quot; because there is no room for them, then quickly spins up a new EC2 instance that fits them perfectly.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you have no HPAs, it means your application replica counts are currently static (e.g., always 3 pods). Karpenter is only &quot;scaling&quot; when you manually change that number or when you deploy a new app that needs more room.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;2. Can pods be adjusted automatically without HPA?&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Yes, there are a few other ways pod counts or resources can be adjusted:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Vertical Pod Autoscaler (VPA)&lt;/b&gt;: Instead of adding more pods, VPA adjusts the CPU and Memory limits of your existing pods based on actual usage.&lt;/li&gt;&lt;li&gt;&lt;b&gt;KEDA (Kubernetes Event-driven Autoscaling)&lt;/b&gt;: Often used instead of standard HPA for complex triggers. It can scale pods to zero and back up based on external events like AWS SQS queue depth, Kafka lag, or Cron schedules.&lt;/li&gt;&lt;li&gt;&lt;b&gt;GitOps/CD Pipelines&lt;/b&gt;: Sometimes scaling is &quot;automated&quot; via external CI/CD tools (like ArgoCD) that update the replica count in your git repo based on specific triggers or schedules rather than in-cluster metrics.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;3. Why you might want to add HPA&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Without HPA, Karpenter is essentially a &quot;just-in-time&quot; provisioning tool for a static workload. If your traffic spikes, your pods might crash from resource exhaustion before Karpenter has a reason to act. Adding HPA allows your app to &quot;request&quot; more pods, which then triggers Karpenter to &quot;supply&quot; more nodes.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;To handle traffic spikes, HPA and Karpenter work as a two-stage relay:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;HPA (The Demand): Triggers when CPU/Memory usage spikes, creating &quot;Pending&quot; pods that cannot fit on current nodes.&lt;/li&gt;&lt;li&gt;Karpenter (The Supply): Sees those &quot;Pending&quot; pods and immediately provisions new EC2 instances to accommodate them.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The Combined YAML Example&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This configuration sets up an application to scale up during spikes and ensures Karpenter has the right &quot;instructions&quot; to provide nodes.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Part A: The Workload (Deployment)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You must define resource requests so HPA has a baseline and Karpenter knows what size node to buy.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;apiVersion: apps/v1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kind: Deployment&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;metadata:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; name: spike-app&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; replicas: 2&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; template:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; containers:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; - name: web-server&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; image: nginx&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; resources:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; requests:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cpu: &quot;500m&quot;&amp;nbsp; &amp;nbsp; # Crucial: HPA uses this for % calculation&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; memory: &quot;512Mi&quot; # Crucial: Karpenter uses this to select EC2 size&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Part B: The Scaling Rule (HPA)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This tells Kubernetes to add pods when the existing ones are busy.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;apiVersion: autoscaling/v2&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kind: HorizontalPodAutoscaler&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;metadata:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; name: spike-app-hpa&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; scaleTargetRef:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; apiVersion: apps/v1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; kind: Deployment&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; name: spike-app&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; minReplicas: 2&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; maxReplicas: 20&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; metrics:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; - type: Resource&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; resource:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; name: cpu&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; target:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; type: Utilization&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; averageUtilization: 60&amp;nbsp; # Scale up at 60% to give Karpenter time to boot nodes&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Part C: The Node Provisioner (Karpenter NodePool)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This tells Karpenter which AWS instances are &quot;allowed&quot; for your scaling pods.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;apiVersion: karpenter.sh/v1beta1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kind: NodePool&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;metadata:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; name: default&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; template:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; spec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; requirements:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - key: &quot;karpenter.sh/capacity-type&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; operator: In&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; values: [&quot;spot&quot;, &quot;on-demand&quot;] # Use Spot to save money during spikes&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - key: &quot;karpenter.k8s.aws/instance-category&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; operator: In&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; values: [&quot;c&quot;, &quot;m&quot;, &quot;r&quot;]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; nodeClassRef:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; name: default&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; disruption:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; consolidationPolicy: WhenUnderutilized # Automatically kill nodes when pods scale down&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Why this works for spikes&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Buffer Time: Setting the HPA to 60% (instead of 90%) ensures you start scaling before pods are overwhelmed, giving Karpenter ~60 seconds to join new nodes to the cluster.&lt;/li&gt;&lt;li&gt;Just-in-Time Nodes: Unlike the old Cluster Autoscaler, Karpenter doesn&#39;t wait for &quot;Node Groups&quot; to update; it calls the EC2 Fleet API directly to get exactly what your pending pods need.&lt;/li&gt;&lt;li&gt;Automatic Cleanup: When the spike ends, HPA reduces pod counts. Karpenter&#39;s consolidationPolicy then notices the nodes are empty and terminates them to stop AWS billing.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;In Kubernetes, &quot;700m&quot; stands for 700 millicores.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It is a unit of measurement for CPU processing power, where 1000m is equal to 1 vCPU (or 1 Core). Therefore, 700m is 0.7 of a vCPU.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;How it works in your HPA:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Since your HPA is using type: AverageValue (instead of Utilization), it is looking at the raw CPU usage rather than a percentage:&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;The Trigger: The HPA controller calculates the average CPU usage across all currently running pods in that deployment.&lt;/li&gt;&lt;li&gt;The Action: If the average usage exceeds 700m, the HPA will add more pods to spread the load and bring that average back down to 700m.&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Why use AverageValue instead of AverageUtilization?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;AverageUtilization (Percentage): Requires you to have resources.requests defined. It scales based on &quot;percentage of what I asked for.&quot;&lt;/li&gt;&lt;li&gt;AverageValue (Raw Number): Does not technically require a request baseline to function. It scales based on &quot;absolute CPU consumed.&quot; This is useful if your app has a hard performance limit (e.g., &quot;This app starts lagging if it hits 0.7 cores&quot;) regardless of what the pod&#39;s requested limit is.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Pro-Tip for Karpenter users:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;When using AverageValue, ensure your Deployment&#39;s CPU request is set to something sensible (like 800m or 1000m). If your request is lower than your HPA target (e.g., request is 500m but target is 700m), your pods will constantly throttle before they ever trigger a scale-up! Kubernetes Resource Management provides more details on these units.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you are using &lt;b data-index-in-node=&quot;26&quot; data-path-to-node=&quot;20,0&quot;&gt;Karpenter&lt;/b&gt; for node scaling, it works beautifully with HPA. Just remember that HPA and VPA generally shouldn&#39;t be used on the same metric (like CPU) for the same deployment, as they might fight each other.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Horizontal Pod Autoscaler and Upgrading Kubernetes version of the cluster&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;When upgrading your Kubernetes cluster version, the most critical Horizontal Pod Autoscaler (HPA) considerations involve API version deprecations, metrics server compatibility, and newly introduced scaling configuration fields.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1. API Version Deprecations &amp;amp; Removals&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Kubernetes frequently matures its APIs, meaning older HPA versions are deprecated and eventually removed.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;autoscaling/v2 &lt;/span&gt;is now GA (General Availability): As of Kubernetes v1.23, the &lt;span style=&quot;font-family: courier;&quot;&gt;autoscaling/v2&lt;/span&gt; API version is stable and generally available.&lt;/li&gt;&lt;li&gt;Removal of &lt;span style=&quot;font-family: courier;&quot;&gt;v2beta2&lt;/span&gt;: The autoscaling/v2beta2 version was removed in v1.26. If your manifests still use this version, they will fail to apply or update in clusters v1.26 and newer.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Manifest Updates&lt;/b&gt;: You must update the &lt;span style=&quot;font-family: courier;&quot;&gt;apiVersion&lt;/span&gt; in your YAML files. Note that fields like &lt;span style=&quot;font-family: courier;&quot;&gt;targetAverageUtilization&lt;/span&gt; in beta versions were replaced by a more structured &lt;span style=&quot;font-family: courier;&quot;&gt;target&lt;/span&gt; block in the stable v2 API.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;2. Metrics Server &amp;amp; Infrastructure&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The HPA depends on external components that may also require updates during a cluster upgrade.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;Metrics Server Compatibility&lt;/b&gt;: Ensure your Metrics Server version is compatible with your new Kubernetes version. Without it, HPA cannot fetch CPU or memory data, and scaling will fail.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Custom Metrics Adapters&lt;/b&gt;: if you use custom metrics (e.g., via Prometheus), ensure your &lt;b&gt;Prometheus Adapter&lt;/b&gt; supports the new Kubernetes API version, as some older adapters may still attempt to call removed API endpoints.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;3. New Features and Behaviors&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Upgrading allows you to leverage newer scaling controls that improve stability:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;Configurable Scaling Behavior&lt;/b&gt;: Introduced in v1.18 and matured in later versions, the behavior field allows you to set a &lt;span style=&quot;font-family: courier;&quot;&gt;stabilizationWindowSeconds&lt;/span&gt; for scale-up and scale-down independently. This is essential for preventing &quot;flapping&quot; (rapidly scaling up and then down).&lt;/li&gt;&lt;li&gt;&lt;b&gt;Configurable Tolerance&lt;/b&gt;: In very recent versions (e.g., v1.33), you can now fine-tune the 10% default tolerance. Previously, HPA would only act if the metric differed by more than 10%; you can now adjust this for more sensitive or coarser scaling needs.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;4. Best Practices for the Upgrade Process&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;Audit Before Upgrading&lt;/b&gt;: Use tools like Kube-no-trouble (kubent) or Pluto to find resources using deprecated HPA APIs.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Dry Runs&lt;/b&gt;: Run &lt;span style=&quot;font-family: courier;&quot;&gt;kubectl apply --dry-run=client&lt;/span&gt; on your HPA manifests against the target cluster version to catch schema errors before they impact production.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Monitor Events&lt;/b&gt;: After upgrading, watch HPA events using &lt;span style=&quot;font-family: courier;&quot;&gt;kubectl get events --field-selector involvedObject.kind=HorizontalPodAutoscaler &lt;/span&gt;to ensure it is still successfully fetching metrics and making decisions.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;When moving from the deprecated autoscaling/v2beta2 (removed in v1.26) to the stable autoscaling/v2 (available since v1.23), the primary change is the unification of target fields.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;YAML Comparison&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The stable v2 API replaces direct target fields (like averageUtilization) with a nested target block.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier; font-size: x-small;&quot;&gt;Feature &lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;Deprecated autoscaling/v2beta2&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;Stable autoscaling/v2&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier; font-size: x-small;&quot;&gt;-------&amp;nbsp; &amp;nbsp; &amp;nbsp;-------------------------------&amp;nbsp; ----------------------&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier; font-size: x-small;&quot;&gt;API Version&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;apiVersion: autoscaling/v2beta2&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;apiVersion: autoscaling/v2&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier; font-size: x-small;&quot;&gt;CPU Target&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; averageUtilization: 50&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;target:&lt;/span&gt;&lt;span style=&quot;font-family: courier; font-size: small;&quot;&gt;type:Utilization&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: courier; font-size: small;&quot;&gt;averageUtilization: 50&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier; font-size: small;&quot;&gt;Custom Target&lt;/span&gt;&lt;span style=&quot;font-family: courier; font-size: small; white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;span style=&quot;font-family: courier; font-size: small;&quot;&gt;averageValue: 100&lt;/span&gt;&lt;span style=&quot;font-family: courier; font-size: small; white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;span style=&quot;font-family: courier; font-size: small;&quot;&gt;target:&lt;/span&gt;&lt;span style=&quot;font-family: courier; font-size: small;&quot;&gt;type:AverageValue&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: courier; font-size: small;&quot;&gt;averageValue: 100&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Comparison Example:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;A comparison of the YAML structure shows how the apiVersion changes and the resource target is nested within a target block in the v2 version. You can see the full YAML example in the referenced documents.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Key Migration Notes&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Seamless Conversion: The Kubernetes API server can convert between these versions, allowing you to use &lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl get hpa &amp;lt;name&amp;gt; -o yaml --output-version=autoscaling/v2 &lt;/span&gt;to view HPAs in the new format.&lt;/li&gt;&lt;li&gt;Manifest Updates: While conversion is possible, you must update your CI/CD pipelines and YAML manifests to use autoscaling/v2 before upgrading to v1.26 to prevent errors.&lt;/li&gt;&lt;li&gt;Behavior Block: The behavior block remains the same structurally, but using the v2 API is required for long-term support.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;To identify which HPAs in your cluster are using deprecated API versions, you can use built-in kubectl commands or specialized open-source tools.&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;1. Using Built-in kubectl Commands&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;While kubectl doesn&#39;t have a single &quot;find-deprecated&quot; flag, you can use these methods to audit your resources:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Audit via API Server Warnings (v1.19+):&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The API server automatically sends a warning header when you access a deprecated endpoint. Simply listing them often triggers a warning in the console if they use deprecated APIs:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl get hpa -A&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Dry-Run Manifest Validation:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Before applying an update, use a client-side dry-run to see if the manifest will be accepted by the new cluster version&#39;s schema.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl apply -f your-hpa.yaml --dry-run=client&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Check Metrics for Requested Deprecated APIs:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can query the API server&#39;s raw metrics to see if any client (like an old CI/CD script) is still requesting deprecated HPA versions.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl get --raw /metrics | grep apiserver_requested_deprecated_apis&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;2. Using Specialized Audit Tools (Recommended)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Specialized tools are the most reliable way to find exactly which resources are affected before an upgrade.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Kube-no-trouble (kubent):&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This tool scans your live cluster and lists exactly which resources are using APIs scheduled for removal.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;# Install and run (requires no cluster installation)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;sh -c &quot;$(curl -sSL https://git.io/install-kubent)&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubent&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Pluto:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;While kubent scans the live cluster, Pluto is best for scanning your Helm charts and static YAML files in your git repository to catch issues before they are deployed.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;# Scan local directory&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;pluto detect-files -d .&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;3. Quick Check of Supported Versions&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To see which API versions your cluster currently supports for horizontal scaling, use the following command:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl api-versions | grep autoscaling&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Note: If you are upgrading to v1.26 or newer, any HPA using autoscaling/v2beta2 must be updated to autoscaling/v2, as the older version will no longer be served&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;How to use kubectl convert to automatically upgrade your existing YAML manifests to the latest API version?&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The kubectl convert command is no longer part of the standard kubectl binary; it is now a standalone plugin. You must install it to automatically upgrade your HPA manifests from v2beta2 to v2.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1. Install the kubectl-convert Plugin&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Choose the method that matches your operating system:&lt;/div&gt;&lt;div&gt;macOS (via Homebrew):&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;brew install kubectl-convert&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Manual Download (Linux/macOS/Windows):&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Download the binary for your architecture from the official Kubernetes release page and move it to your system path (e.g., /usr/local/bin/kubectl-convert).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Verification:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Run kubectl convert --help to confirm the plugin is active.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;2. Convert Your HPA Manifests&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Once installed, you can use the command to rewrite your old YAML files to the stable autoscaling/v2 version.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Convert a Specific File:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This command reads your v2beta2 file and outputs a clean v2 version to your terminal.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;kubectl convert -f old-hpa.yaml --output-version autoscaling/v2&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Save the Converted File:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;kubectl convert -f old-hpa.yaml --output-version autoscaling/v2 &amp;gt; new-hpa.yaml&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Bulk Conversion (Directory):&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can point it to a directory containing multiple manifests to update them all at once.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;kubectl convert -f ./my-hpa-folder/ --output-version autoscaling/v2&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;3. Alternative: Direct Export from the Cluster&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Because the Kubernetes API server internally handles conversion between versions, you can &quot;live-convert&quot; an existing HPA by explicitly requesting the target version during a get command:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;kubectl get hpa.v2.autoscaling &amp;lt;hpa-name&amp;gt; -o yaml &amp;gt; upgraded-hpa.yaml&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This method is often faster if the HPA is already running in your cluster, as it bypasses the need for the convert plugin.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;How to use Kustomize to handle these API version changes across multiple environments?&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Kustomize allows you to manage the transition from v2beta2 to v2 across multiple environments (e.g., Dev, Staging, Prod) by layering environment-specific changes over a common base configuration.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1. Structure Your Directory&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Keep your primary HPA manifest in a base folder and create overlays for each environment.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;├── base&lt;/div&gt;&lt;div&gt;│&amp;nbsp; &amp;nbsp;├── hpa.yaml&lt;/div&gt;&lt;div&gt;│&amp;nbsp; &amp;nbsp;└── kustomization.yaml&lt;/div&gt;&lt;div&gt;└── overlays&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; ├── dev&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; │&amp;nbsp; &amp;nbsp;└── kustomization.yaml&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; └── prod&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ├── hpa-v2-patch.yaml&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; └── kustomization.yaml&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;2. Strategy for Phased Upgrades&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you are upgrading clusters one by one, you can use Kustomize patches to change the apiVersion only for specific environments while keeping others on the older version.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Example: Upgrading &#39;Prod&#39; to v2&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If your base/hpa.yaml still uses v2beta2, you can create a patch in your Prod overlay to upgrade it to v2 without touching the base file used by other environments.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;overlays/prod/hpa-v2-patch.yaml:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;apiVersion: autoscaling/v2&lt;/div&gt;&lt;div&gt;kind: HorizontalPodAutoscaler&lt;/div&gt;&lt;div&gt;metadata:&lt;/div&gt;&lt;div&gt;&amp;nbsp; name: my-app-hpa&lt;/div&gt;&lt;div&gt;spec:&lt;/div&gt;&lt;div&gt;&amp;nbsp; metrics:&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; - type: Resource&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; resource:&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; name: cpu&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; target:&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; type: Utilization&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; averageUtilization: 60&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;overlays/prod/kustomization.yaml:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;resources:&lt;/div&gt;&lt;div&gt;&amp;nbsp; - ../../base&lt;/div&gt;&lt;div&gt;patches:&lt;/div&gt;&lt;div&gt;&amp;nbsp; - path: hpa-v2-patch.yaml&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; target:&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; kind: HorizontalPodAutoscaler&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; name: my-app-hpa&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;3. Validating the Conversion&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Before applying changes to a live cluster, use the following commands to ensure Kustomize has correctly merged the new apiVersion and schema:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;View Rendered YAML:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl kustomize overlays/prod&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Diff Against Live Cluster:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Use kubectl diff to see exactly what will change in the API server.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d; font-family: courier;&quot;&gt;kubectl diff -k overlays/prod&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;4. Best Practices&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Keep Base &quot;Newest&quot;: Once all clusters are upgraded, move the v2 configuration into the base and remove the patches from your overlays to keep your code DRY.&lt;/div&gt;&lt;div&gt;CI/CD Integration: Use Pluto in your CI pipeline to scan the output of kustomize build for any remaining deprecated API versions.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.bojankomazec.com/feeds/209440489779180388/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4912226416400969049/209440489779180388' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/209440489779180388'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4912226416400969049/posts/default/209440489779180388'/><link rel='alternate' type='text/html' href='http://www.bojankomazec.com/2026/02/kubernetes-horizontal-pod-autoscaler-hpa.html' title='Horizontal Pod Autoscaler (HPA) '/><author><name>Bojan Komazec</name><uri>http://www.blogger.com/profile/05437236807206825832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNcIpCzZVp3_zhSgcHAbs4YGdJzLIASdHB-KYbFKNi3lnjVygRjX4fDjnxWOXjrkqWuVOeP1Liq5LHCz-i8dwOfoo8M2otsV1D7UArIXfLoNZkx4MXG7T0u0GEHpHbjBklyjafBfwojeGxQrM7FP2XxSk1SZV5VTSQ4d2YdcVUSTpPUHtHNC7FXNiqQy4/s72-w638-h640-c/Screenshot%202024-07-27%20at%2023.26.17.png" height="72" width="72"/><thr:total>0</thr:total></entry></feed>