<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Fluxcd on Apurv Kiri | Tech Notes</title>
    <link>https://apurv.me/tags/fluxcd/</link>
    <description>Recent content in Fluxcd on Apurv Kiri | Tech Notes</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-gb</language>
    <lastBuildDate>Wed, 05 Mar 2025 01:55:15 +0530</lastBuildDate><atom:link href="https://apurv.me/tags/fluxcd/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Kubernetes - Replicate Secrets with Reflector</title>
      <link>https://apurv.me/posts/kubernetes-replicate-secrets-with-reflector/</link>
      <pubDate>Wed, 05 Mar 2025 01:55:15 +0530</pubDate>
      
      <guid>https://apurv.me/posts/kubernetes-replicate-secrets-with-reflector/</guid>
      
      <description>&lt;hr&gt;
&lt;p&gt;This post is part of our ongoing series of posts for Kubernetes. In this post, we will dive into replicating secrets across namespaces using Reflector, a powerful tool for ensuring consistency and security in your Kubernetes environment.&lt;/p&gt;
&lt;p&gt;By default, Kubernetes secrets are scoped to individual namespaces. However, there are common use cases where sensitive information, such as API tokens, database credentials, or container registry credentials, needs to be shared across multiple namespaces. Manually managing these secrets can be error-prone and time-consuming.&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>Kubernetes GitOps with FluxCD - Part 7 - Resource Optimization and Automated Version Management with Github Actions</title>
      <link>https://apurv.me/posts/kubernetes-gitops-with-fluxcd-part-7/</link>
      <pubDate>Tue, 04 Mar 2025 01:55:15 +0530</pubDate>
      
      <guid>https://apurv.me/posts/kubernetes-gitops-with-fluxcd-part-7/</guid>
      
      <description>&lt;hr&gt;
&lt;p&gt;In our &lt;a href=&#34;https://apurv.me/posts/kubernetes-gitops-with-fluxcd-part-6/&#34;&gt;previous post&lt;/a&gt;, we set up push based reconciliation using webhooks. Building on what we&amp;rsquo;ve learned so far—&lt;a href=&#34;https://apurv.me/posts/kubernetes-gitops-with-fluxcd-part-1/&#34;&gt;basic FluxCD setup&lt;/a&gt;, &lt;a href=&#34;https://apurv.me/posts/kubernetes-gitops-with-fluxcd-part-2/&#34;&gt;SOPS-based secret management&lt;/a&gt;, &lt;a href=&#34;https://apurv.me/posts/kubernetes-gitops-with-fluxcd-part-3/&#34;&gt;image update automation&lt;/a&gt;, &lt;a href=&#34;https://apurv.me/posts/kubernetes-gitops-with-fluxcd-part-4/&#34;&gt;Helm chart automation&lt;/a&gt;, &lt;a href=&#34;https://apurv.me/posts/kubernetes-gitops-with-fluxcd-part-5/&#34;&gt;alerts&lt;/a&gt; and &lt;a href=&#34;https://apurv.me/posts/kubernetes-gitops-with-fluxcd-part-6/&#34;&gt;push based reconciliation&lt;/a&gt; — this article focuses on critical day-two operational concerns: optimizing FluxCD resource allocation and establishing automated version management through Github Actions.&lt;/p&gt;
&lt;h2 id=&#34;1-sizing-fluxcd-containers&#34;&gt;1. Sizing FluxCD Containers&lt;/h2&gt;
&lt;p&gt;By default, FluxCD components are provisioned with the following resource configurations for CPU and memory:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 1&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;kubectl -n flux-system get pods -o json &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; jq -r &lt;span class=&#34;s1&#34;&gt;&amp;#39;[&amp;#34;container&amp;#34;, &amp;#34;cpu_requests&amp;#34;, &amp;#34;cpu_limits&amp;#34;, &amp;#34;memory_requests&amp;#34;, &amp;#34;memory_limits&amp;#34;], (.items[].spec.containers[] | [.image, .resources.requests.cpu, .resources.limits.cpu, .resources.requests.memory, .resources.limits.memory]) | @csv&amp;#39;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; column -t -s,
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 2&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 3&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 4&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;container&amp;#34;&lt;/span&gt;                                           &lt;span class=&#34;s2&#34;&gt;&amp;#34;cpu_requests&amp;#34;&lt;/span&gt;  &lt;span class=&#34;s2&#34;&gt;&amp;#34;cpu_limits&amp;#34;&lt;/span&gt;  &lt;span class=&#34;s2&#34;&gt;&amp;#34;memory_requests&amp;#34;&lt;/span&gt;  &lt;span class=&#34;s2&#34;&gt;&amp;#34;memory_limits&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 5&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;ghcr.io/fluxcd/helm-controller:v1.2.0&amp;#34;&lt;/span&gt;               &lt;span class=&#34;s2&#34;&gt;&amp;#34;100m&amp;#34;&lt;/span&gt;          &lt;span class=&#34;s2&#34;&gt;&amp;#34;1&amp;#34;&lt;/span&gt;           &lt;span class=&#34;s2&#34;&gt;&amp;#34;64Mi&amp;#34;&lt;/span&gt;             &lt;span class=&#34;s2&#34;&gt;&amp;#34;1Gi&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 6&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;ghcr.io/fluxcd/image-automation-controller:v0.40.0&amp;#34;&lt;/span&gt;  &lt;span class=&#34;s2&#34;&gt;&amp;#34;100m&amp;#34;&lt;/span&gt;          &lt;span class=&#34;s2&#34;&gt;&amp;#34;1&amp;#34;&lt;/span&gt;           &lt;span class=&#34;s2&#34;&gt;&amp;#34;64Mi&amp;#34;&lt;/span&gt;             &lt;span class=&#34;s2&#34;&gt;&amp;#34;1Gi&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 7&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;ghcr.io/fluxcd/image-reflector-controller:v0.34.0&amp;#34;&lt;/span&gt;   &lt;span class=&#34;s2&#34;&gt;&amp;#34;100m&amp;#34;&lt;/span&gt;          &lt;span class=&#34;s2&#34;&gt;&amp;#34;1&amp;#34;&lt;/span&gt;           &lt;span class=&#34;s2&#34;&gt;&amp;#34;64Mi&amp;#34;&lt;/span&gt;             &lt;span class=&#34;s2&#34;&gt;&amp;#34;1Gi&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 8&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;ghcr.io/fluxcd/kustomize-controller:v1.5.0&amp;#34;&lt;/span&gt;          &lt;span class=&#34;s2&#34;&gt;&amp;#34;100m&amp;#34;&lt;/span&gt;          &lt;span class=&#34;s2&#34;&gt;&amp;#34;1&amp;#34;&lt;/span&gt;           &lt;span class=&#34;s2&#34;&gt;&amp;#34;64Mi&amp;#34;&lt;/span&gt;             &lt;span class=&#34;s2&#34;&gt;&amp;#34;1Gi&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 9&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;ghcr.io/fluxcd/notification-controller:v1.5.0&amp;#34;&lt;/span&gt;       &lt;span class=&#34;s2&#34;&gt;&amp;#34;100m&amp;#34;&lt;/span&gt;          &lt;span class=&#34;s2&#34;&gt;&amp;#34;1&amp;#34;&lt;/span&gt;           &lt;span class=&#34;s2&#34;&gt;&amp;#34;64Mi&amp;#34;&lt;/span&gt;             &lt;span class=&#34;s2&#34;&gt;&amp;#34;1Gi&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;10&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;ghcr.io/fluxcd/source-controller:v1.5.0&amp;#34;&lt;/span&gt;             &lt;span class=&#34;s2&#34;&gt;&amp;#34;50m&amp;#34;&lt;/span&gt;           &lt;span class=&#34;s2&#34;&gt;&amp;#34;1&amp;#34;&lt;/span&gt;           &lt;span class=&#34;s2&#34;&gt;&amp;#34;64Mi&amp;#34;&lt;/span&gt;             &lt;span class=&#34;s2&#34;&gt;&amp;#34;1Gi&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;For our environment with a smaller cluster footprint, these default limits are unnecessarily generous and could lead to resource contention. We&amp;rsquo;ll refine these allocations by modifying &lt;code&gt;cluster/default/flux-system/kustomization.yaml&lt;/code&gt; to better align with our actual resource capacity and workload requirements:&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>Kubernetes GitOps with FluxCD - Part 6 - Push-based Reconciliation with Webhook Receivers</title>
      <link>https://apurv.me/posts/kubernetes-gitops-with-fluxcd-part-6/</link>
      <pubDate>Mon, 03 Mar 2025 01:55:15 +0530</pubDate>
      
      <guid>https://apurv.me/posts/kubernetes-gitops-with-fluxcd-part-6/</guid>
      
      <description>&lt;hr&gt;
&lt;p&gt;In our &lt;a href=&#34;https://apurv.me/posts/kubernetes-gitops-with-fluxcd-part-5/&#34;&gt;previous post&lt;/a&gt;, we set up Discord alerts to get notifications about our cluster&amp;rsquo;s status. Building on what we&amp;rsquo;ve learned so far—&lt;a href=&#34;https://apurv.me/posts/kubernetes-gitops-with-fluxcd-part-1/&#34;&gt;basic FluxCD setup&lt;/a&gt;, &lt;a href=&#34;https://apurv.me/posts/kubernetes-gitops-with-fluxcd-part-2/&#34;&gt;SOPS-based secret management&lt;/a&gt;, &lt;a href=&#34;https://apurv.me/posts/kubernetes-gitops-with-fluxcd-part-3/&#34;&gt;image update automation&lt;/a&gt;, &lt;a href=&#34;https://apurv.me/posts/kubernetes-gitops-with-fluxcd-part-4/&#34;&gt;Helm chart automation&lt;/a&gt;, and &lt;a href=&#34;https://apurv.me/posts/kubernetes-gitops-with-fluxcd-part-5/&#34;&gt;alerts&lt;/a&gt;—this article focuses on &lt;strong&gt;webhook receivers&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;By default, FluxCD polls Git repositories at the configured frequency to detect changes. With webhook receivers, your Git provider can notify FluxCD immediately when changes occur, ensuring the reconciliation process doesn&amp;rsquo;t have to wait for the next scheduled polling interval. This significantly expedites deployments and enhances overall cluster efficiency.&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>Kubernetes - Setup Cert Manager for Automated TLS Management</title>
      <link>https://apurv.me/posts/kubernetes-setup-cert-manager-automated-tls-management/</link>
      <pubDate>Sat, 01 Mar 2025 01:55:15 +0530</pubDate>
      
      <guid>https://apurv.me/posts/kubernetes-setup-cert-manager-automated-tls-management/</guid>
      
      <description>&lt;hr&gt;
&lt;p&gt;This post is part of our ongoing series on Kubernetes infrastructure management. In this installment, we&amp;rsquo;re focusing on setting up Cert Manager, a critical component for automating TLS certificate management. Although we&amp;rsquo;re working on a local Kubernetes cluster, we&amp;rsquo;ve implemented prerequisites in &lt;a href=&#34;https://apurv.me/posts/kubernetes-routing-external-traffic-to-local-cluster/&#34;&gt;Kubernetes - Routing external traffic to local Kubernetes cluster&lt;/a&gt; to enable access to our internal cluster via public IP address, as well as configuring DNS automation with &lt;a href=&#34;https://apurv.me/posts/kubernetes-setup-external-dns/&#34;&gt;Kubernetes - Setup External DNS&lt;/a&gt;.&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>Kubernetes - Setup External DNS</title>
      <link>https://apurv.me/posts/kubernetes-setup-external-dns/</link>
      <pubDate>Fri, 28 Feb 2025 01:55:15 +0530</pubDate>
      
      <guid>https://apurv.me/posts/kubernetes-setup-external-dns/</guid>
      
      <description>&lt;hr&gt;
&lt;p&gt;This post is part of our ongoing series of posts for Kubernetes. In this post we are focusing on setting up External DNS, a critical component for automating DNS record management. Although we are working on a local Kubernetes cluster, we have implemented prerequisites in &lt;a href=&#34;https://apurv.me/posts/kubernetes-routing-external-traffic-to-local-cluster/&#34;&gt;Kubernetes - Routing external traffic to local Kubernetes cluster&lt;/a&gt; to enable access to our internal cluster via public ip.&lt;/p&gt;
&lt;p&gt;We are using Cloudflare as our DNS Provider and implementing this solution using declarative GitOps principles with Flux.&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>Kubernetes GitOps with FluxCD - Part 5 - Implementing Discord Alerts</title>
      <link>https://apurv.me/posts/kubernetes-gitops-with-fluxcd-part-5/</link>
      <pubDate>Thu, 27 Feb 2025 01:55:15 +0530</pubDate>
      
      <guid>https://apurv.me/posts/kubernetes-gitops-with-fluxcd-part-5/</guid>
      
      <description>&lt;hr&gt;
&lt;p&gt;In &lt;a href=&#34;https://apurv.me/posts/kubernetes-gitops-with-fluxcd-part-4/&#34;&gt;previous post&lt;/a&gt;, we explored how to setup helm chart automation with FluxCD, Building on our &lt;a href=&#34;https://apurv.me/posts/kubernetes-gitops-with-fluxcd-part-1/&#34;&gt;foundation of basic Flux CD setup&lt;/a&gt;, &lt;a href=&#34;https://apurv.me/posts/kubernetes-gitops-with-fluxcd-part-2/&#34;&gt;SOPS-based secret management&lt;/a&gt;, &lt;a href=&#34;https://apurv.me/posts/kubernetes-gitops-with-fluxcd-part-3/&#34;&gt;image update automation&lt;/a&gt; and &lt;a href=&#34;https://apurv.me/posts/kubernetes-gitops-with-fluxcd-part-4/&#34;&gt;Helm Chart Automation&lt;/a&gt;, this article focuses on implementing &lt;strong&gt;FluxCD Alerts&lt;/strong&gt; with Discord integration to enhance GitOps observability stack.&lt;/p&gt;
&lt;p&gt;Alerts provide real-time notifications about the state of our GitOps operations, helping us respond promptly to issues and stay informed about successful reconciliations. Let&amp;rsquo;s dive into configuring in our Kubernetes cluster.&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>Kubernetes GitOps with FluxCD - Part 4 - Helm Chart Automation - Kube Prometheus Stack</title>
      <link>https://apurv.me/posts/kubernetes-gitops-with-fluxcd-part-4/</link>
      <pubDate>Wed, 26 Feb 2025 22:55:15 +0530</pubDate>
      
      <guid>https://apurv.me/posts/kubernetes-gitops-with-fluxcd-part-4/</guid>
      
      <description>&lt;hr&gt;
&lt;p&gt;In our &lt;a href=&#34;https://apurv.me/posts/kubernetes-gitops-with-fluxcd-part-3/&#34;&gt;previous post&lt;/a&gt;, we explored how Flux CD enables automated image updates while maintaining GitOps principles. Building on our &lt;a href=&#34;https://apurv.me/posts/kubernetes-gitops-with-fluxcd-part-1/&#34;&gt;foundation of basic Flux CD setup&lt;/a&gt;, &lt;a href=&#34;https://apurv.me/posts/kubernetes-gitops-with-fluxcd-part-2/&#34;&gt;SOPS-based secret management&lt;/a&gt;, and &lt;a href=&#34;https://apurv.me/posts/kubernetes-gitops-with-fluxcd-part-3/&#34;&gt;image update automation&lt;/a&gt;, this article focuses on &lt;strong&gt;Helm Chart Automation&lt;/strong&gt; - a sophisticated capability that further enhances your GitOps workflow by declaratively managing Helm releases.&lt;/p&gt;
&lt;p&gt;Helm serves as Kubernetes&amp;rsquo; package manager, simplifying the deployment of complex applications through charts that bundle related Kubernetes resources. While Helm itself is powerful, managing Helm releases manually contradicts GitOps principles of full automation and declarative configuration. Flux CD bridges this gap with its Helm Controller, allowing teams to define, deploy, and update Helm releases through Git-based declarations rather than imperative commands.&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>Kubernetes GitOps with FluxCD - Part 3 - Automated Image Updates</title>
      <link>https://apurv.me/posts/kubernetes-gitops-with-fluxcd-part-3/</link>
      <pubDate>Tue, 25 Feb 2025 22:55:15 +0530</pubDate>
      
      <guid>https://apurv.me/posts/kubernetes-gitops-with-fluxcd-part-3/</guid>
      
      <description>&lt;hr&gt;
&lt;p&gt;In our &lt;a href=&#34;https://apurv.me/posts/kubernetes-gitops-with-fluxcd-part-2/&#34;&gt;previous post&lt;/a&gt;, we explored how to manage secrets in FluxCD with SOPS. Building on our GitOps foundation from part 1 and secure secrets handling from part 2, this article will focus on image update automation - a powerful FluxCD feature that automatically updates your deployments when new container images are available, maintaining GitOps principles while eliminating manual image version updates.&lt;/p&gt;
&lt;h2 id=&#34;1-setup-image-repository&#34;&gt;1. Setup image repository&lt;/h2&gt;
&lt;p&gt;To demonstrate image automation, we&amp;rsquo;ll create a sample application using Quarkus, a Kubernetes-native Java framework.&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>Kubernetes GitOps with FluxCD - Part 2 - Secret Management using SOPS</title>
      <link>https://apurv.me/posts/kubernetes-gitops-with-fluxcd-part-2/</link>
      <pubDate>Mon, 24 Feb 2025 22:55:15 +0530</pubDate>
      
      <guid>https://apurv.me/posts/kubernetes-gitops-with-fluxcd-part-2/</guid>
      
      <description>&lt;hr&gt;
&lt;p&gt;In Kubernetes-based GitOps workflows, securely managing sensitive information presents a unique challenge. While GitOps principles encourage storing all cluster configurations in Git repositories, committing plaintext secrets creates significant security risks. SOPS (Secrets OPerationS) offers an elegant solution to this problem when integrated with FluxCD.&lt;/p&gt;
&lt;p&gt;In our &lt;a href=&#34;https://apurv.me/posts/kubernetes-gitops-with-fluxcd-part-1/&#34;&gt;previous post&lt;/a&gt;, we explored how to perform the initial setup of FluxCD in a Kubernetes cluster. Building on that foundation, we&amp;rsquo;ll now address one of the most critical aspects of GitOps implementation: &lt;strong&gt;Secret Management&lt;/strong&gt;.&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>Kubernetes GitOps with FluxCD - Part 1 - Initial Setup</title>
      <link>https://apurv.me/posts/kubernetes-gitops-with-fluxcd-part-1/</link>
      <pubDate>Sun, 23 Feb 2025 22:55:15 +0530</pubDate>
      
      <guid>https://apurv.me/posts/kubernetes-gitops-with-fluxcd-part-1/</guid>
      
      <description>&lt;hr&gt;
&lt;p&gt;GitOps practice enables us to define our infrastructure as code in a declarative manner. It serves as an audited single source of truth for our cloud/cluster state, providing benefits like:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Version control and audit trails for infrastructure changes&lt;/li&gt;
&lt;li&gt;Automated reconciliation between desired and actual states&lt;/li&gt;
&lt;li&gt;Improved security through encrypted credentials and access control&lt;/li&gt;
&lt;li&gt;Simplified rollback capabilities&lt;/li&gt;
&lt;li&gt;Enhanced collaboration through Git workflows&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;FluxCD is a CNCF graduated project that enables GitOps practices in the Kubernetes ecosystem. It automates the deployment, monitoring, and reconciliation of cluster resources based on Git repositories.&lt;/p&gt;</description>
      
    </item>
    
  </channel>
</rss>
