<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Manohar Shimpi</title>
    <description>The latest articles on DEV Community by Manohar Shimpi (@mrshimpi17).</description>
    <link>https://dev.to/mrshimpi17</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1952639%2Fab08fe9f-0f42-4e05-b346-dd2e613aa1ff.jpg</url>
      <title>DEV Community: Manohar Shimpi</title>
      <link>https://dev.to/mrshimpi17</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mrshimpi17"/>
    <language>en</language>
    <item>
      <title>Resolving the "Request Entity Too Large" Error in Helm Deployments: Effective Strategies and Solutions</title>
      <dc:creator>Manohar Shimpi</dc:creator>
      <pubDate>Sat, 30 Nov 2024 16:21:28 +0000</pubDate>
      <link>https://dev.to/mrshimpi17/resolving-the-request-entity-too-large-error-in-helm-deployments-effective-strategies-and-2mkc</link>
      <guid>https://dev.to/mrshimpi17/resolving-the-request-entity-too-large-error-in-helm-deployments-effective-strategies-and-2mkc</guid>
      <description>&lt;p&gt;When deploying an application using Helm, you might encounter the error:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Error: INSTALLATION FAILED: create: failed to create: Request entity too large: limit is 3145728
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This error occurs when the size of the Helm chart or the generated Kubernetes resources exceeds the default size limit set by the Kubernetes API server or ingress controllers. This blog provides a comprehensive guide to resolving the issue, including an approach to split an umbrella Helm chart into multiple smaller charts.&lt;/p&gt;




&lt;h2&gt;
  
  
  Problem Overview
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What does the error mean?&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;The error indicates that the payload size of your Helm installation request is larger than the allowed size limit (3 MB by default).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Common causes include&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Large ConfigMaps or Secrets.&lt;/li&gt;
&lt;li&gt;Oversized &lt;code&gt;values.yaml&lt;/code&gt; files.&lt;/li&gt;
&lt;li&gt;Complex umbrella charts generating large manifests.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Solution: Splitting an Umbrella Chart
&lt;/h2&gt;

&lt;p&gt;Splitting an umbrella chart into smaller, more manageable charts is an effective way to address this error. Here’s how to do it:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. &lt;strong&gt;Analyze and Group Components&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Identify logical groupings within your current umbrella chart. For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Core Services&lt;/strong&gt;: Redis, PostgreSQL, RabbitMQ.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Application Modules&lt;/strong&gt;: Microservices or feature-specific components.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Auxiliary Tools&lt;/strong&gt;: Monitoring (e.g., Prometheus), logging (e.g., Fluentd), and alerting (e.g., Alertmanager).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. &lt;strong&gt;Create Smaller Umbrella Charts&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;For each logical grouping, create a new Helm chart with its own dependencies:&lt;/p&gt;

&lt;h4&gt;
  
  
  Folder Structure Example
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;umbrella-chart-core/
├── Chart.yaml
├── values.yaml
├── charts/
│   ├── redis/
│   ├── postgres/
│   └── rabbitmq/

umbrella-chart-app/
├── Chart.yaml
├── values.yaml
├── charts/
│   ├── service-a/
│   ├── service-b/
│   └── service-c/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3.  &lt;strong&gt;Update Dependencies&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Define the dependencies in each new chart's &lt;code&gt;Chart.yaml&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Example  &lt;code&gt;Chart.yaml&lt;/code&gt;  for  &lt;code&gt;umbrella-chart-core&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apiVersion: v2
name: umbrella-chart-core
dependencies:
  - name: redis
    version: "6.0.8"
    repository: "https://charts.bitnami.com/bitnami"
  - name: postgres
    version: "12.9.0"
    repository: "https://charts.bitnami.com/bitnami"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Run the following command to update dependencies:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;helm dependency update&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4.  &lt;strong&gt;Externalize Shared Values&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Move shared configurations to an external location to avoid duplication:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Use Kubernetes ConfigMaps or Secrets for shared settings.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Example  &lt;code&gt;values.yaml&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;global:
  database:
    host: "db.example.com"
    username: "user"
    password: "password"`
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  5.  &lt;strong&gt;Deploy Charts Independently&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Deploy each smaller umbrella chart individually:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

helm install core-services umbrella-chart-core/
helm install app-services umbrella-chart-app/


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Best Practices
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Keep Charts Modular&lt;/strong&gt;: Avoid bloated umbrella charts.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Use External Storage&lt;/strong&gt;: Store large files (e.g., certificates) outside Kubernetes.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Test Chart Output&lt;/strong&gt;: Use  &lt;code&gt;helm template&lt;/code&gt;  to verify the size of generated manifests:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;helm template my-release my-chart &amp;gt; output.yaml&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>kubernetes</category>
      <category>tooling</category>
      <category>devops</category>
      <category>cloudnative</category>
    </item>
    <item>
      <title>Resolving the "Request Entity Too Large" Error in Helm Deployments: Effective Strategies and Solutions</title>
      <dc:creator>Manohar Shimpi</dc:creator>
      <pubDate>Sat, 30 Nov 2024 16:21:28 +0000</pubDate>
      <link>https://dev.to/mrshimpi17/resolving-the-request-entity-too-large-error-in-helm-deployments-effective-strategies-and-3h9e</link>
      <guid>https://dev.to/mrshimpi17/resolving-the-request-entity-too-large-error-in-helm-deployments-effective-strategies-and-3h9e</guid>
      <description>&lt;p&gt;When deploying an application using Helm, you might encounter the error:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Error: INSTALLATION FAILED: create: failed to create: Request entity too large: limit is 3145728
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This error occurs when the size of the Helm chart or the generated Kubernetes resources exceeds the default size limit set by the Kubernetes API server or ingress controllers. This blog provides a comprehensive guide to resolving the issue, including an approach to split an umbrella Helm chart into multiple smaller charts.&lt;/p&gt;




&lt;h2&gt;
  
  
  Problem Overview
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What does the error mean?&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;The error indicates that the payload size of your Helm installation request is larger than the allowed size limit (3 MB by default).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Common causes include&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Large ConfigMaps or Secrets.&lt;/li&gt;
&lt;li&gt;Oversized &lt;code&gt;values.yaml&lt;/code&gt; files.&lt;/li&gt;
&lt;li&gt;Complex umbrella charts generating large manifests.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Solution: Splitting an Umbrella Chart
&lt;/h2&gt;

&lt;p&gt;Splitting an umbrella chart into smaller, more manageable charts is an effective way to address this error. Here’s how to do it:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. &lt;strong&gt;Analyze and Group Components&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Identify logical groupings within your current umbrella chart. For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Core Services&lt;/strong&gt;: Redis, PostgreSQL, RabbitMQ.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Application Modules&lt;/strong&gt;: Microservices or feature-specific components.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Auxiliary Tools&lt;/strong&gt;: Monitoring (e.g., Prometheus), logging (e.g., Fluentd), and alerting (e.g., Alertmanager).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. &lt;strong&gt;Create Smaller Umbrella Charts&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;For each logical grouping, create a new Helm chart with its own dependencies:&lt;/p&gt;

&lt;h4&gt;
  
  
  Folder Structure Example
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;umbrella-chart-core/
├── Chart.yaml
├── values.yaml
├── charts/
│   ├── redis/
│   ├── postgres/
│   └── rabbitmq/

umbrella-chart-app/
├── Chart.yaml
├── values.yaml
├── charts/
│   ├── service-a/
│   ├── service-b/
│   └── service-c/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3.  &lt;strong&gt;Update Dependencies&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Define the dependencies in each new chart's &lt;code&gt;Chart.yaml&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Example  &lt;code&gt;Chart.yaml&lt;/code&gt;  for  &lt;code&gt;umbrella-chart-core&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apiVersion: v2
name: umbrella-chart-core
dependencies:
  - name: redis
    version: "6.0.8"
    repository: "https://charts.bitnami.com/bitnami"
  - name: postgres
    version: "12.9.0"
    repository: "https://charts.bitnami.com/bitnami"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Run the following command to update dependencies:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;helm dependency update&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4.  &lt;strong&gt;Externalize Shared Values&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Move shared configurations to an external location to avoid duplication:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Use Kubernetes ConfigMaps or Secrets for shared settings.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Example  &lt;code&gt;values.yaml&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;global:
  database:
    host: "db.example.com"
    username: "user"
    password: "password"`
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  5.  &lt;strong&gt;Deploy Charts Independently&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Deploy each smaller umbrella chart individually:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

helm install core-services umbrella-chart-core/
helm install app-services umbrella-chart-app/


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Best Practices
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Keep Charts Modular&lt;/strong&gt;: Avoid bloated umbrella charts.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Use External Storage&lt;/strong&gt;: Store large files (e.g., certificates) outside Kubernetes.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Test Chart Output&lt;/strong&gt;: Use  &lt;code&gt;helm template&lt;/code&gt;  to verify the size of generated manifests:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;helm template my-release my-chart &amp;gt; output.yaml&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>kubernetes</category>
      <category>tooling</category>
    </item>
    <item>
      <title>Exploring Helm Template Dictionary Objects: Syntax Evolution and Best Practices</title>
      <dc:creator>Manohar Shimpi</dc:creator>
      <pubDate>Tue, 20 Aug 2024 04:19:15 +0000</pubDate>
      <link>https://dev.to/mrshimpi17/exploring-helm-template-dictionary-objects-syntax-evolution-and-best-practices-ikk</link>
      <guid>https://dev.to/mrshimpi17/exploring-helm-template-dictionary-objects-syntax-evolution-and-best-practices-ikk</guid>
      <description>&lt;p&gt;Helm, the Kubernetes package manager, offers a robust templating system to streamline the deployment of applications. One powerful feature within Helm charts is the ability to define and manipulate dictionary objects using its templating language. In this blog post, we'll delve into the usage of Helm template dictionary objects, examining the evolution of syntax for storing properties and highlighting best practices.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Introduction to Helm Template Dictionary Objects&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Template File viewed with Word Wrap on&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5d7e3kecfic4x8cz4kab.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5d7e3kecfic4x8cz4kab.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Template File viewed with Word Wrap off&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbqen0hgw4f0051trvnil.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbqen0hgw4f0051trvnil.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This syntax allowed for creating a dictionary ($globDict) containing multiple properties and their corresponding values. The problem with the above syntax is that it is too difficult to add/update/delete entries where we have a large set of properties as it stores them in a single line.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax Evolution: Refining Dictionary Property Addition&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As Helm evolved, a more concise and efficient syntax for adding properties to an existing dictionary emerged. Instead of creating the entire dictionary in a single line, the set function became the preferred method for appending properties to an existing dictionary. &lt;/p&gt;

&lt;p&gt;The evolution looks like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5yt1j63ansk6pbfssyuo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5yt1j63ansk6pbfssyuo.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This refined approach allows for the incremental addition of properties to the $globDict dictionary. Each subsequent set function appends a new key-value pair without recreating the entire dictionary, improving code readability and maintainability.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best Practices and Considerations&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Incremental Addition&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Embrace the incremental addition of properties to dictionaries using the set function. This practice enhances code clarity and reduces redundancy.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Avoiding Reassignment&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Minimize reassignment of variables like $globDict to maintain consistency and prevent unintentional overrides or data loss.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Consistent Naming Conventions&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Adopt consistent naming conventions for keys within dictionaries to facilitate readability and maintainability across the Helm charts.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Testing and Validation&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Validate Helm templates by rendering them and conducting thorough testing to ensure that the generated Kubernetes manifests reflect the expected configurations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion:&lt;/strong&gt;&lt;br&gt;
Helm template dictionary objects offer a flexible and powerful way to manage properties within Kubernetes deployments. By understanding the evolution of syntax and following best practices, developers can create cleaner, more maintainable Helm charts. For more information on this, you can &lt;a href="https://helm.sh/docs/chart_template_guide/function_list/#dictionaries-and-dict-functions" rel="noopener noreferrer"&gt;visit&lt;/a&gt; here.&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>go</category>
      <category>tpl</category>
      <category>tooling</category>
    </item>
  </channel>
</rss>
