{"id":33199,"date":"2025-06-10T13:09:47","date_gmt":"2025-06-10T11:09:47","guid":{"rendered":"https:\/\/www.codemotion.com\/magazine\/?p=33199"},"modified":"2025-06-11T09:30:28","modified_gmt":"2025-06-11T07:30:28","slug":"limitrange-e-resourcequota-cluster-kubernetes","status":"publish","type":"post","link":"https:\/\/www.codemotion.com\/magazine\/it\/devops-it\/cloud-it\/limitrange-e-resourcequota-cluster-kubernetes\/","title":{"rendered":"LimitRange e ResourceQuota: come tenere sotto controllo il tuo cluster Kubernetes"},"content":{"rendered":"\n<p>Hai mai notato che, scrivendo la definizione minima di un Pod, compare un warning che ti segnala l\u2019assenza del campo <code>resources<\/code>?<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/i.imgur.com\/orfIRrc.png\" alt=\"\"\/><\/figure>\n\n\n<div class=\"gb-container gb-container-3e196317\">\n\n<pre class=\"wp-block-preformatted\">One or more containers do not have resources - this can cause noisy neighbor issues<\/pre>\n\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p>Cosa significa esattamente quel messaggio? Facciamo un passo indietro e partiamo dalle basi.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-cos-e-un-pod\">Cos&#8217;\u00e8 un Pod?<\/h2>\n\n\n\n<p>Come possiamo leggere dalla documentazione un <a href=\"https:\/\/kubernetes.io\/docs\/concepts\/workloads\/pods\/\">Pod<\/a> \u00e8 la pi\u00f9 piccola unit\u00e0 eseguibile in Kubernetes. Pu\u00f2 contenere uno o pi\u00f9 container che condividono alcune risorse di sistema, come il networking e lo storage.<\/p>\n\n\n\n<p>Per creare un Pod con la configurazione minima ti basta definire il nome, almeno un container e l\u2019immagine da utilizzare. Con kubectl si pu\u00f2 fare direttamente con: <code>kubectl run --image=nginx nginx<\/code><\/p>\n\n\n\n<p>Pod schedulato! Ma\u2026 senza specificare quante risorse potr\u00e0 usare.<\/p>\n\n\n\n<div class=\"wp-block-uagb-advanced-heading uagb-block-76020a69\"><h2 class=\"uagb-heading-text\">Le risorse di un Pod<\/h2><\/div>\n\n\n\n<p>Nel campo <code>resources<\/code> si pu\u00f2 definire quanto un container <strong>richiede<\/strong> e quale sar\u00e0 il <strong>limite massimo<\/strong> delle risorse che potr\u00e0 usare:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">apiVersion: v1\n<span class=\"hljs-attr\">kind<\/span>: Pod\n<span class=\"hljs-attr\">metadata<\/span>:\n  name: cpu-demo\n  <span class=\"hljs-attr\">namespace<\/span>: cpu-example\n<span class=\"hljs-attr\">spec<\/span>:\n  containers:\n  - name: cpu-demo-ctr\n    <span class=\"hljs-attr\">image<\/span>: vish\/stress\n    <span class=\"hljs-attr\">resources<\/span>:\n      limits:\n        cpu: <span class=\"hljs-string\">\"1\"<\/span>\n      <span class=\"hljs-attr\">requests<\/span>:\n        cpu: <span class=\"hljs-string\">\"0.5\"<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>In questo esempio:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>requests<\/code>\u00a0definisce la quantit\u00e0 minima di risorse necessarie per schedulare il Pod.<\/li>\n\n\n\n<li><code>limits<\/code>\u00a0rappresenta il massimo che il container potr\u00e0 utilizzare.<\/li>\n<\/ul>\n\n\n\n<p>Se le risorse richieste (<code>requests<\/code>) non sono disponibili, il Pod rester\u00e0 in stato&nbsp;<strong>Pending<\/strong>&nbsp;e non verr\u00e0 schedulato. Se invece viene schedulato e consuma pi\u00f9 di quanto indicato in&nbsp;<code>limits<\/code>, il container potr\u00e0 essere&nbsp;<strong>penalizzato o terminato<\/strong>, a seconda del tipo di risorsa.<\/p>\n\n\n\n<p>Nel nostro esempio il container chiede&nbsp;<strong>0.5 CPU<\/strong>&nbsp;e pu\u00f2 usarne al massimo&nbsp;<strong>1<\/strong>. Ma che succede se omettiamo completamente il campo&nbsp;<code>resources<\/code>? In quel caso, il container potrebbe teoricamente prendersi&nbsp;<strong>tutte le risorse del nodo<\/strong>: CPU, memoria, tutto. Ed \u00e8 qui che entra in gioco il problema del&nbsp;<em>noisy neighbor<\/em>: un container rumoroso che si prende tutto per s\u00e9, rallentando o bloccando gli altri Pod, proprio come un vicino che mette la musica a tutto volume.<\/p>\n\n\n\n<p><strong>Come possiamo prevenire questo comportamento?<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-limitrange-e-resourcequota\">LimitRange e ResourceQuota<\/h2>\n\n\n\n<p>Kubernetes ci viene in soccorso con due risorse utilissime: <strong>LimitRange<\/strong> e <strong>ResourceQuota<\/strong>. Entrambe funzionano a livello di <strong>Namespace<\/strong>.<\/p>\n\n\n\n<div class=\"wp-block-uagb-advanced-heading uagb-block-bdeee13e\"><h2 class=\"uagb-heading-text\">LimitRange<\/h2><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>Con un <code><a href=\"https:\/\/kubernetes.io\/docs\/concepts\/policy\/limit-range\/\">LimitRange<\/a><\/code> si possono:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Definire valori <strong>di default<\/strong>, che verranno applicati ai Pod\/container che non specificano risorse.<\/li>\n\n\n\n<li>Impostare valori <strong>minimi<\/strong> e <strong>massimi<\/strong>.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\"><\/pre>\n\n\n\n<p>I <a href=\"https:\/\/kubernetes.io\/docs\/concepts\/policy\/limit-range\/\">LimitRange<\/a> ci permettono di definire dei valori di default, e anche dei valori minimi e massimi. Quando un container viene schedulato senza risorse il <em>LimitRanger admission controller<\/em>* provveder\u00e0 ad applicare i default predefiniti. Nel caso in cui invece le risorse fossero definite allora provveder\u00e0 semplicemente a verificare che rientrino nei valori stabiliti.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">apiVersion: v1\n<span class=\"hljs-attr\">kind<\/span>: LimitRange\n<span class=\"hljs-attr\">metadata<\/span>:\n  name: cpu-resource-constraint\n<span class=\"hljs-attr\">spec<\/span>:\n  limits:\n  - <span class=\"hljs-keyword\">default<\/span>:\n      cpu: <span class=\"hljs-number\">500<\/span>m\n    <span class=\"hljs-attr\">defaultRequest<\/span>:\n      cpu: <span class=\"hljs-number\">500<\/span>m\n    <span class=\"hljs-attr\">max<\/span>:\n      cpu: <span class=\"hljs-string\">\"1\"<\/span>\n    <span class=\"hljs-attr\">min<\/span>:\n      cpu: <span class=\"hljs-number\">100<\/span>m\n    <span class=\"hljs-attr\">type<\/span>: Container<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>\u26a0\ufe0f <strong>Nota<\/strong>: il <code>LimitRange<\/code> funziona grazie all\u2019admission controller <code>LimitRanger<\/code>, che intercetta le richieste <em>in ingresso<\/em>. Quindi si applica solo ai nuovi Pod, non a quelli gi\u00e0 schedulati.<\/p>\n\n\n\n<div class=\"wp-block-uagb-advanced-heading uagb-block-962394c9\"><h2 class=\"uagb-heading-text\">ResourceQuota<\/h2><\/div>\n\n\n\n<p>Le <a href=\"https:\/\/kubernetes.io\/docs\/concepts\/policy\/resource-quotas\/\">ResourceQuota<\/a> invece permettono di definire dei <strong>limiti totali<\/strong> per l\u2019intero Namespace: CPU, memoria, numero di Pod, storage, ecc. \u00c8 come mettere un tetto massimo al consumo complessivo. Puoi anche filtrare le risorse da conteggiare usando uno scopeSelector. Ad esempio:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">apiVersion: v1\n<span class=\"hljs-attr\">kind<\/span>: ResourceQuota\n<span class=\"hljs-attr\">metadata<\/span>:\n  name: pods-medium\n<span class=\"hljs-attr\">spec<\/span>:\n  hard:\n    cpu: <span class=\"hljs-string\">\"10\"<\/span>\n    <span class=\"hljs-attr\">memory<\/span>: <span class=\"hljs-string\">\"20Gi\"<\/span>\n    <span class=\"hljs-attr\">pods<\/span>: <span class=\"hljs-string\">\"10\"<\/span>\n  <span class=\"hljs-attr\">scopeSelector<\/span>:\n    matchExpressions:\n    - operator: In\n      <span class=\"hljs-attr\">scopeName<\/span>: PriorityClass\n      <span class=\"hljs-attr\">values<\/span>: &#91;<span class=\"hljs-string\">\"medium\"<\/span>]<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>In questo caso stiamo contando solo le risorse associate ai Pod con PriorityClass \u201cmedium\u201d.<\/p>\n\n\n\n<div class=\"wp-block-uagb-advanced-heading uagb-block-8d4ff35b\"><h2 class=\"uagb-heading-text\">Conclusione<\/h2><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>LimitRange e ResourceQuota sono strumenti fondamentali per garantire un utilizzo corretto e bilanciato delle risorse all\u2019interno di un cluster Kubernetes. Anche se spesso introdotti come strumenti per l\u2019amministrazione, possono rivelarsi estremamente utili anche per chi sviluppa: sapere che esistono, e come funzionano, pu\u00f2 aiutarti a capire perch\u00e9 un workload non viene schedulato, o viene improvvisamente terminato.<\/p>\n\n\n\n<p>Imparare a leggere questi segnali e impostare correttamente le risorse ti permette non solo di evitare errori difficili da diagnosticare, ma anche di scrivere manifest in maniera pi\u00f9 consapevole, pronti per la produzione!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hai mai notato che, scrivendo la definizione minima di un Pod, compare un warning che ti segnala l\u2019assenza del campo resources? One or more containers do not have resources &#8211; this can cause noisy neighbor issues Cosa significa esattamente quel messaggio? Facciamo un passo indietro e partiamo dalle basi. Cos&#8217;\u00e8 un Pod? Come possiamo leggere&#8230; <a class=\"more-link\" href=\"https:\/\/www.codemotion.com\/magazine\/it\/devops-it\/cloud-it\/limitrange-e-resourcequota-cluster-kubernetes\/\">Read more<\/a><\/p>\n","protected":false},"author":325,"featured_media":26130,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_editorskit_title_hidden":false,"_editorskit_reading_time":0,"_editorskit_is_block_options_detached":false,"_editorskit_block_options_position":"{}","_uag_custom_page_level_css":"","_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[10291],"tags":[12854,12240],"collections":[12702],"class_list":{"0":"post-33199","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-cloud-it","8":"tag-backend-it","9":"tag-kubernetes-it","10":"collections-kubernetes","11":"entry"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.9 (Yoast SEO v26.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>LimitRange e ResourceQuota: come tenere sotto controllo il tuo cluster Kubernetes - Codemotion Magazine<\/title>\n<meta name=\"description\" content=\"LimitRange e ResourceQuota sono strumenti fondamentali per garantire un utilizzo corretto e bilanciato delle risorse all\u2019interno di un cluster Kubernetes.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.codemotion.com\/magazine\/it\/devops-it\/cloud-it\/limitrange-e-resourcequota-cluster-kubernetes\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"LimitRange e ResourceQuota: come tenere sotto controllo il tuo cluster Kubernetes\" \/>\n<meta property=\"og:description\" content=\"LimitRange e ResourceQuota sono strumenti fondamentali per garantire un utilizzo corretto e bilanciato delle risorse all\u2019interno di un cluster Kubernetes.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.codemotion.com\/magazine\/it\/devops-it\/cloud-it\/limitrange-e-resourcequota-cluster-kubernetes\/\" \/>\n<meta property=\"og:site_name\" content=\"Codemotion Magazine\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Codemotion.Italy\/\" \/>\n<meta property=\"article:published_time\" content=\"2025-06-10T11:09:47+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-11T07:30:28+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/02\/DALL\u00b7E-2024-02-22-15.27.20-A-landscape-oriented-image-that-embodies-the-concept-of-a-lightweight-proxy-approach-in-a-cloud-native-scenario-with-a-special-focus-on-Kubernetes.-T.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1792\" \/>\n\t<meta property=\"og:image:height\" content=\"1024\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"Enrico Candino\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@CodemotionIT\" \/>\n<meta name=\"twitter:site\" content=\"@CodemotionIT\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Enrico Candino\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/it\/devops-it\/cloud-it\/limitrange-e-resourcequota-cluster-kubernetes\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/it\/devops-it\/cloud-it\/limitrange-e-resourcequota-cluster-kubernetes\/\"},\"author\":{\"name\":\"Enrico Candino\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/19bc320ffb94683af0a08e5109c149f3\"},\"headline\":\"LimitRange e ResourceQuota: come tenere sotto controllo il tuo cluster Kubernetes\",\"datePublished\":\"2025-06-10T11:09:47+00:00\",\"dateModified\":\"2025-06-11T07:30:28+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/it\/devops-it\/cloud-it\/limitrange-e-resourcequota-cluster-kubernetes\/\"},\"wordCount\":563,\"publisher\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/it\/devops-it\/cloud-it\/limitrange-e-resourcequota-cluster-kubernetes\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/02\/DALL\u00b7E-2024-02-22-15.27.20-A-landscape-oriented-image-that-embodies-the-concept-of-a-lightweight-proxy-approach-in-a-cloud-native-scenario-with-a-special-focus-on-Kubernetes.-T.webp\",\"keywords\":[\"Backend\",\"Kubernetes\"],\"articleSection\":[\"Cloud\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/it\/devops-it\/cloud-it\/limitrange-e-resourcequota-cluster-kubernetes\/\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/it\/devops-it\/cloud-it\/limitrange-e-resourcequota-cluster-kubernetes\/\",\"name\":\"LimitRange e ResourceQuota: come tenere sotto controllo il tuo cluster Kubernetes - Codemotion Magazine\",\"isPartOf\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/it\/devops-it\/cloud-it\/limitrange-e-resourcequota-cluster-kubernetes\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/it\/devops-it\/cloud-it\/limitrange-e-resourcequota-cluster-kubernetes\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/02\/DALL\u00b7E-2024-02-22-15.27.20-A-landscape-oriented-image-that-embodies-the-concept-of-a-lightweight-proxy-approach-in-a-cloud-native-scenario-with-a-special-focus-on-Kubernetes.-T.webp\",\"datePublished\":\"2025-06-10T11:09:47+00:00\",\"dateModified\":\"2025-06-11T07:30:28+00:00\",\"description\":\"LimitRange e ResourceQuota sono strumenti fondamentali per garantire un utilizzo corretto e bilanciato delle risorse all\u2019interno di un cluster Kubernetes.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/it\/devops-it\/cloud-it\/limitrange-e-resourcequota-cluster-kubernetes\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.codemotion.com\/magazine\/it\/devops-it\/cloud-it\/limitrange-e-resourcequota-cluster-kubernetes\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/it\/devops-it\/cloud-it\/limitrange-e-resourcequota-cluster-kubernetes\/#primaryimage\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/02\/DALL\u00b7E-2024-02-22-15.27.20-A-landscape-oriented-image-that-embodies-the-concept-of-a-lightweight-proxy-approach-in-a-cloud-native-scenario-with-a-special-focus-on-Kubernetes.-T.webp\",\"contentUrl\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/02\/DALL\u00b7E-2024-02-22-15.27.20-A-landscape-oriented-image-that-embodies-the-concept-of-a-lightweight-proxy-approach-in-a-cloud-native-scenario-with-a-special-focus-on-Kubernetes.-T.webp\",\"width\":1792,\"height\":1024,\"caption\":\"A-landscape-oriented-image-that-embodies-the-concept-of-a-lightweight-proxy-approach-in-a-cloud-native-scenario-with-a-special-focus\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/it\/devops-it\/cloud-it\/limitrange-e-resourcequota-cluster-kubernetes\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.codemotion.com\/magazine\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"DevOps\",\"item\":\"https:\/\/www.codemotion.com\/magazine\/it\/devops-it\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Cloud\",\"item\":\"https:\/\/www.codemotion.com\/magazine\/it\/devops-it\/cloud-it\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"LimitRange e ResourceQuota: come tenere sotto controllo il tuo cluster Kubernetes\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#website\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/\",\"name\":\"Codemotion Magazine\",\"description\":\"We code the future. Together\",\"publisher\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.codemotion.com\/magazine\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#organization\",\"name\":\"Codemotion\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png\",\"contentUrl\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png\",\"width\":225,\"height\":225,\"caption\":\"Codemotion\"},\"image\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/Codemotion.Italy\/\",\"https:\/\/x.com\/CodemotionIT\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/19bc320ffb94683af0a08e5109c149f3\",\"name\":\"Enrico Candino\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/a9219e4c20800c49c33caa4b7bd7f3003da51ac468267399495f71b464c03beb?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/a9219e4c20800c49c33caa4b7bd7f3003da51ac468267399495f71b464c03beb?s=96&d=mm&r=g\",\"caption\":\"Enrico Candino\"},\"description\":\"I\u2019m a passionate Software Engineer, building exciting things in Golang on Kubernetes while designing (hopefully) reliable infrastructures and products. Beyond coding, I foster the Go community as the organizer of Golang Roma Meetups and host \\\"Mamma Mia, Let Me Go!\\\", Italy\u2019s first podcast dedicated to Go.\",\"sameAs\":[\"https:\/\/www.enricocandino.it\",\"https:\/\/www.linkedin.com\/in\/enricocandino\/\"],\"url\":\"https:\/\/www.codemotion.com\/magazine\/author\/enrichman\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"LimitRange e ResourceQuota: come tenere sotto controllo il tuo cluster Kubernetes - Codemotion Magazine","description":"LimitRange e ResourceQuota sono strumenti fondamentali per garantire un utilizzo corretto e bilanciato delle risorse all\u2019interno di un cluster Kubernetes.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.codemotion.com\/magazine\/it\/devops-it\/cloud-it\/limitrange-e-resourcequota-cluster-kubernetes\/","og_locale":"en_US","og_type":"article","og_title":"LimitRange e ResourceQuota: come tenere sotto controllo il tuo cluster Kubernetes","og_description":"LimitRange e ResourceQuota sono strumenti fondamentali per garantire un utilizzo corretto e bilanciato delle risorse all\u2019interno di un cluster Kubernetes.","og_url":"https:\/\/www.codemotion.com\/magazine\/it\/devops-it\/cloud-it\/limitrange-e-resourcequota-cluster-kubernetes\/","og_site_name":"Codemotion Magazine","article_publisher":"https:\/\/www.facebook.com\/Codemotion.Italy\/","article_published_time":"2025-06-10T11:09:47+00:00","article_modified_time":"2025-06-11T07:30:28+00:00","og_image":[{"width":1792,"height":1024,"url":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/02\/DALL\u00b7E-2024-02-22-15.27.20-A-landscape-oriented-image-that-embodies-the-concept-of-a-lightweight-proxy-approach-in-a-cloud-native-scenario-with-a-special-focus-on-Kubernetes.-T.webp","type":"image\/webp"}],"author":"Enrico Candino","twitter_card":"summary_large_image","twitter_creator":"@CodemotionIT","twitter_site":"@CodemotionIT","twitter_misc":{"Written by":"Enrico Candino","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.codemotion.com\/magazine\/it\/devops-it\/cloud-it\/limitrange-e-resourcequota-cluster-kubernetes\/#article","isPartOf":{"@id":"https:\/\/www.codemotion.com\/magazine\/it\/devops-it\/cloud-it\/limitrange-e-resourcequota-cluster-kubernetes\/"},"author":{"name":"Enrico Candino","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/19bc320ffb94683af0a08e5109c149f3"},"headline":"LimitRange e ResourceQuota: come tenere sotto controllo il tuo cluster Kubernetes","datePublished":"2025-06-10T11:09:47+00:00","dateModified":"2025-06-11T07:30:28+00:00","mainEntityOfPage":{"@id":"https:\/\/www.codemotion.com\/magazine\/it\/devops-it\/cloud-it\/limitrange-e-resourcequota-cluster-kubernetes\/"},"wordCount":563,"publisher":{"@id":"https:\/\/www.codemotion.com\/magazine\/#organization"},"image":{"@id":"https:\/\/www.codemotion.com\/magazine\/it\/devops-it\/cloud-it\/limitrange-e-resourcequota-cluster-kubernetes\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/02\/DALL\u00b7E-2024-02-22-15.27.20-A-landscape-oriented-image-that-embodies-the-concept-of-a-lightweight-proxy-approach-in-a-cloud-native-scenario-with-a-special-focus-on-Kubernetes.-T.webp","keywords":["Backend","Kubernetes"],"articleSection":["Cloud"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.codemotion.com\/magazine\/it\/devops-it\/cloud-it\/limitrange-e-resourcequota-cluster-kubernetes\/","url":"https:\/\/www.codemotion.com\/magazine\/it\/devops-it\/cloud-it\/limitrange-e-resourcequota-cluster-kubernetes\/","name":"LimitRange e ResourceQuota: come tenere sotto controllo il tuo cluster Kubernetes - Codemotion Magazine","isPartOf":{"@id":"https:\/\/www.codemotion.com\/magazine\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.codemotion.com\/magazine\/it\/devops-it\/cloud-it\/limitrange-e-resourcequota-cluster-kubernetes\/#primaryimage"},"image":{"@id":"https:\/\/www.codemotion.com\/magazine\/it\/devops-it\/cloud-it\/limitrange-e-resourcequota-cluster-kubernetes\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/02\/DALL\u00b7E-2024-02-22-15.27.20-A-landscape-oriented-image-that-embodies-the-concept-of-a-lightweight-proxy-approach-in-a-cloud-native-scenario-with-a-special-focus-on-Kubernetes.-T.webp","datePublished":"2025-06-10T11:09:47+00:00","dateModified":"2025-06-11T07:30:28+00:00","description":"LimitRange e ResourceQuota sono strumenti fondamentali per garantire un utilizzo corretto e bilanciato delle risorse all\u2019interno di un cluster Kubernetes.","breadcrumb":{"@id":"https:\/\/www.codemotion.com\/magazine\/it\/devops-it\/cloud-it\/limitrange-e-resourcequota-cluster-kubernetes\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.codemotion.com\/magazine\/it\/devops-it\/cloud-it\/limitrange-e-resourcequota-cluster-kubernetes\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codemotion.com\/magazine\/it\/devops-it\/cloud-it\/limitrange-e-resourcequota-cluster-kubernetes\/#primaryimage","url":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/02\/DALL\u00b7E-2024-02-22-15.27.20-A-landscape-oriented-image-that-embodies-the-concept-of-a-lightweight-proxy-approach-in-a-cloud-native-scenario-with-a-special-focus-on-Kubernetes.-T.webp","contentUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/02\/DALL\u00b7E-2024-02-22-15.27.20-A-landscape-oriented-image-that-embodies-the-concept-of-a-lightweight-proxy-approach-in-a-cloud-native-scenario-with-a-special-focus-on-Kubernetes.-T.webp","width":1792,"height":1024,"caption":"A-landscape-oriented-image-that-embodies-the-concept-of-a-lightweight-proxy-approach-in-a-cloud-native-scenario-with-a-special-focus"},{"@type":"BreadcrumbList","@id":"https:\/\/www.codemotion.com\/magazine\/it\/devops-it\/cloud-it\/limitrange-e-resourcequota-cluster-kubernetes\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.codemotion.com\/magazine\/"},{"@type":"ListItem","position":2,"name":"DevOps","item":"https:\/\/www.codemotion.com\/magazine\/it\/devops-it\/"},{"@type":"ListItem","position":3,"name":"Cloud","item":"https:\/\/www.codemotion.com\/magazine\/it\/devops-it\/cloud-it\/"},{"@type":"ListItem","position":4,"name":"LimitRange e ResourceQuota: come tenere sotto controllo il tuo cluster Kubernetes"}]},{"@type":"WebSite","@id":"https:\/\/www.codemotion.com\/magazine\/#website","url":"https:\/\/www.codemotion.com\/magazine\/","name":"Codemotion Magazine","description":"We code the future. Together","publisher":{"@id":"https:\/\/www.codemotion.com\/magazine\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.codemotion.com\/magazine\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.codemotion.com\/magazine\/#organization","name":"Codemotion","url":"https:\/\/www.codemotion.com\/magazine\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/","url":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png","contentUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png","width":225,"height":225,"caption":"Codemotion"},"image":{"@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/Codemotion.Italy\/","https:\/\/x.com\/CodemotionIT"]},{"@type":"Person","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/19bc320ffb94683af0a08e5109c149f3","name":"Enrico Candino","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/a9219e4c20800c49c33caa4b7bd7f3003da51ac468267399495f71b464c03beb?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a9219e4c20800c49c33caa4b7bd7f3003da51ac468267399495f71b464c03beb?s=96&d=mm&r=g","caption":"Enrico Candino"},"description":"I\u2019m a passionate Software Engineer, building exciting things in Golang on Kubernetes while designing (hopefully) reliable infrastructures and products. Beyond coding, I foster the Go community as the organizer of Golang Roma Meetups and host \"Mamma Mia, Let Me Go!\", Italy\u2019s first podcast dedicated to Go.","sameAs":["https:\/\/www.enricocandino.it","https:\/\/www.linkedin.com\/in\/enricocandino\/"],"url":"https:\/\/www.codemotion.com\/magazine\/author\/enrichman\/"}]}},"featured_image_src":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/02\/DALL\u00b7E-2024-02-22-15.27.20-A-landscape-oriented-image-that-embodies-the-concept-of-a-lightweight-proxy-approach-in-a-cloud-native-scenario-with-a-special-focus-on-Kubernetes.-T-600x400.webp","featured_image_src_square":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/02\/DALL\u00b7E-2024-02-22-15.27.20-A-landscape-oriented-image-that-embodies-the-concept-of-a-lightweight-proxy-approach-in-a-cloud-native-scenario-with-a-special-focus-on-Kubernetes.-T-600x600.webp","author_info":{"display_name":"Enrico Candino","author_link":"https:\/\/www.codemotion.com\/magazine\/author\/enrichman\/"},"uagb_featured_image_src":{"full":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/02\/DALL\u00b7E-2024-02-22-15.27.20-A-landscape-oriented-image-that-embodies-the-concept-of-a-lightweight-proxy-approach-in-a-cloud-native-scenario-with-a-special-focus-on-Kubernetes.-T.webp",1792,1024,false],"thumbnail":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/02\/DALL\u00b7E-2024-02-22-15.27.20-A-landscape-oriented-image-that-embodies-the-concept-of-a-lightweight-proxy-approach-in-a-cloud-native-scenario-with-a-special-focus-on-Kubernetes.-T-150x150.webp",150,150,true],"medium":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/02\/DALL\u00b7E-2024-02-22-15.27.20-A-landscape-oriented-image-that-embodies-the-concept-of-a-lightweight-proxy-approach-in-a-cloud-native-scenario-with-a-special-focus-on-Kubernetes.-T-300x171.webp",300,171,true],"medium_large":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/02\/DALL\u00b7E-2024-02-22-15.27.20-A-landscape-oriented-image-that-embodies-the-concept-of-a-lightweight-proxy-approach-in-a-cloud-native-scenario-with-a-special-focus-on-Kubernetes.-T-768x439.webp",768,439,true],"large":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/02\/DALL\u00b7E-2024-02-22-15.27.20-A-landscape-oriented-image-that-embodies-the-concept-of-a-lightweight-proxy-approach-in-a-cloud-native-scenario-with-a-special-focus-on-Kubernetes.-T-1024x585.webp",1024,585,true],"1536x1536":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/02\/DALL\u00b7E-2024-02-22-15.27.20-A-landscape-oriented-image-that-embodies-the-concept-of-a-lightweight-proxy-approach-in-a-cloud-native-scenario-with-a-special-focus-on-Kubernetes.-T-1536x878.webp",1536,878,true],"2048x2048":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/02\/DALL\u00b7E-2024-02-22-15.27.20-A-landscape-oriented-image-that-embodies-the-concept-of-a-lightweight-proxy-approach-in-a-cloud-native-scenario-with-a-special-focus-on-Kubernetes.-T.webp",1792,1024,false],"small-home-featured":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/02\/DALL\u00b7E-2024-02-22-15.27.20-A-landscape-oriented-image-that-embodies-the-concept-of-a-lightweight-proxy-approach-in-a-cloud-native-scenario-with-a-special-focus-on-Kubernetes.-T-100x100.webp",100,100,true],"sidebar-featured":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/02\/DALL\u00b7E-2024-02-22-15.27.20-A-landscape-oriented-image-that-embodies-the-concept-of-a-lightweight-proxy-approach-in-a-cloud-native-scenario-with-a-special-focus-on-Kubernetes.-T-180x128.webp",180,128,true],"genesis-singular-images":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/02\/DALL\u00b7E-2024-02-22-15.27.20-A-landscape-oriented-image-that-embodies-the-concept-of-a-lightweight-proxy-approach-in-a-cloud-native-scenario-with-a-special-focus-on-Kubernetes.-T-896x504.webp",896,504,true],"archive-featured":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/02\/DALL\u00b7E-2024-02-22-15.27.20-A-landscape-oriented-image-that-embodies-the-concept-of-a-lightweight-proxy-approach-in-a-cloud-native-scenario-with-a-special-focus-on-Kubernetes.-T-400x225.webp",400,225,true],"gb-block-post-grid-landscape":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/02\/DALL\u00b7E-2024-02-22-15.27.20-A-landscape-oriented-image-that-embodies-the-concept-of-a-lightweight-proxy-approach-in-a-cloud-native-scenario-with-a-special-focus-on-Kubernetes.-T-600x400.webp",600,400,true],"gb-block-post-grid-square":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/02\/DALL\u00b7E-2024-02-22-15.27.20-A-landscape-oriented-image-that-embodies-the-concept-of-a-lightweight-proxy-approach-in-a-cloud-native-scenario-with-a-special-focus-on-Kubernetes.-T-600x600.webp",600,600,true]},"uagb_author_info":{"display_name":"Enrico Candino","author_link":"https:\/\/www.codemotion.com\/magazine\/author\/enrichman\/"},"uagb_comment_info":0,"uagb_excerpt":"Hai mai notato che, scrivendo la definizione minima di un Pod, compare un warning che ti segnala l\u2019assenza del campo resources? One or more containers do not have resources - this can cause noisy neighbor issues Cosa significa esattamente quel messaggio? Facciamo un passo indietro e partiamo dalle basi. Cos&#8217;\u00e8 un Pod? Come possiamo leggere&#8230;&hellip;","lang":"it","_links":{"self":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts\/33199","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/users\/325"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/comments?post=33199"}],"version-history":[{"count":3,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts\/33199\/revisions"}],"predecessor-version":[{"id":33297,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts\/33199\/revisions\/33297"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/media\/26130"}],"wp:attachment":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/media?parent=33199"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/categories?post=33199"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/tags?post=33199"},{"taxonomy":"collections","embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/collections?post=33199"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}