<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ritik Kesharwani on Medium]]></title>
        <description><![CDATA[Stories by Ritik Kesharwani on Medium]]></description>
        <link>https://medium.com/@ritikkesharwani3?source=rss-36a89907ac0b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*mBI2KNZOnbtGsLNhnR1J0w.jpeg</url>
            <title>Stories by Ritik Kesharwani on Medium</title>
            <link>https://medium.com/@ritikkesharwani3?source=rss-36a89907ac0b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 19:20:39 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ritikkesharwani3/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Automatically Deploy Apps on Git Push with ArgoCD: App of Apps & ApplicationSet]]></title>
            <link>https://aws.plainenglish.io/automatically-deploy-apps-on-git-push-with-argocd-app-of-apps-applicationset-7a6e7cbd1891?source=rss-36a89907ac0b------2</link>
            <guid isPermaLink="false">https://medium.com/p/7a6e7cbd1891</guid>
            <category><![CDATA[kubernetes-argocd]]></category>
            <category><![CDATA[helm]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[helm-argocd]]></category>
            <category><![CDATA[gitops-with-argocd]]></category>
            <dc:creator><![CDATA[Ritik Kesharwani]]></dc:creator>
            <pubDate>Sun, 27 Jul 2025 07:58:21 GMT</pubDate>
            <atom:updated>2025-07-28T01:08:34.670Z</atom:updated>
            <content:encoded><![CDATA[<p>Ever wanted your applications to deploy automatically the moment you push code? I’ve got you covered.</p><blockquote><em>⚠️ </em><strong><em>Note</em></strong><em>: This is not a beginner-level tutorial. You should already be familiar with how to deploy apps using ArgoCD, connect your Git repository, helm charts and perform basic GitOps operations.</em></blockquote><p>In this article, I’ll walk you through <strong>ApplicationSet</strong> and <strong>App of Apps</strong> — two powerful ArgoCD concepts that can dramatically streamline your GitOps workflow.</p><h3><strong>The Problem: Repetitive ArgoCD App Definitions</strong></h3><p>If you’re manually writing a separate Application manifest for every Helm-based ArgoCD app, you’re likely repeating a lot of boilerplate YAML. This quickly becomes unmanageable as your app count grows.</p><p>Here’s a traditional example:</p><pre>apiVersion: argoproj.io/v1alpha1<br>kind: Application<br>metadata:<br>  name: guestbook<br>  namespace: argocd<br>spec:<br>  project: default<br>  source:<br>    repoURL: helm-chart-location #could be a git repo, OCI registry<br>    chart: demo-chart #chart name<br>    targetRevision: main<br>    helm:<br>      valueFiles: foo-app/values.yaml<br>  destination:<br>    server: https://kubernetes.default.svc<br>    namespace: guestbook<br>  syncPolicy:<br>    automated:<br>      prune: true<br>      selfHeal: true</pre><p>Now imagine doing this 30 times, once for each app. Not scalable.</p><h3>Solution #1: Use ApplicationSet for Templated Deployments</h3><p><strong>ApplicationSet</strong> allows you to create reusable templates and pass only the values that vary between applications — much like using Helm.</p><p>Here’s an example application-set.yaml:</p><pre>apiVersion: argoproj.io/v1alpha1<br>kind: ApplicationSet<br>metadata:<br>  name: my-application-set<br>  namespace: argocd<br>spec:<br>  generators:<br>  - list:<br>      elements:<br>        - name: foo-app<br>          targetRevision: 1.0.6<br>          namespace: foo<br>        - name: bar-app<br>          targetRevision: 1.0.6<br>          namespace: bar<br>  template:<br>      metadata:<br>        name: &#39;{{name}}&#39;<br>      spec:<br>        project: default<br>        source:<br>          - repoURL: helm-chart-location<br>            chart: demo-chart # chart name<br>            targetRevision: &#39;{{targetRevision}}&#39;<br>            helm:<br>              valueFiles: {{name}}/values.yaml<br>        destination:<br>          server: https://kubernetes.default.svc<br>          namespace: {{namespace}}<br>        syncPolicy:<br>          automated:<br>            prune: true<br>            selfHeal: true</pre><p>Now all you need to do is:</p><ul><li>Add a new element to the list</li><li>Add a values.yaml file for the new app</li><li>Push your changes to Git</li></ul><p>ArgoCD will pick it up and deploy it automatically.</p><h3>Solution #2: Use App of Apps for Centralised Management</h3><p>With <strong>App of Apps</strong>, you can deploy the ApplicationSet and other ArgoCD apps using a single parent Application. This becomes your <strong>bootstrapper</strong>.</p><p>Here’s an exampleapp-of-apps.yaml :</p><pre>apiVersion: argoproj.io/v1alpha1<br>kind: Application<br>metadata:<br>  name: apps-of-apps<br>  namespace: argocd<br>spec:<br>  project: default<br>  source:<br>    path: apps # We are telling ArgoCD to looks for apps at this path<br>    repoURL: &lt;ArgoCD repo URL&gt; #insert your repo URL where you have apps, values<br>    targetRevision: main<br>  destination:<br>    name: in-cluster # this means k8s cluster https://kubernetes.default.svc<br>    namespace: argocd<br><br>  syncPolicy:<br>    syncOptions:<br>      - CreateNamespace=true<br>    automated:<br>      prune: true<br>      selfHeal: true</pre><p>Just apply this once.</p><pre>kubectl apply -f app-of-apps.yaml</pre><p>Then, every time you update application-set.yaml or add new Helm chart values, just commit and push. ArgoCD will handle the rest.</p><h3>Directory Structure Sample</h3><pre>.<br>├── app-of-apps.yaml<br>└── apps<br>    ├── application-set.yaml<br>    ├── foo-app<br>    │   └── values.yaml<br>    └── bar-app<br>        └── values.yaml</pre><p>This structure ensures all your app configurations are managed in one place and deployed automatically through GitOps, giving you a <strong>DRY(Don’t Repeat Yourself)</strong>, <strong>templated</strong>, f<strong>ully automated</strong>, <strong>Helm-native</strong>, and <strong>scalable</strong> way to manage ArgoCD applications.</p><h3>Thank you for being a part of the community</h3><p><em>Before you go:</em></p><ul><li>Be sure to <strong>clap</strong> and <strong>follow</strong> the writer ️👏️<strong>️</strong></li><li>Follow us: <a href="https://x.com/inPlainEngHQ"><strong>X</strong></a> | <a href="https://www.linkedin.com/company/inplainenglish/"><strong>LinkedIn</strong></a> | <a href="https://www.youtube.com/@InPlainEnglish"><strong>YouTube</strong></a> | <a href="https://newsletter.plainenglish.io/"><strong>Newsletter</strong></a> | <a href="https://open.spotify.com/show/7qxylRWKhvZwMz2WuEoua0"><strong>Podcast</strong></a> | <a href="https://twitch.tv/inplainenglish"><strong>Twitch</strong></a></li><li><a href="https://differ.blog/"><strong>Start your own free AI-powered blog on Differ</strong></a> 🚀</li><li><a href="https://discord.gg/in-plain-english-709094664682340443"><strong>Join our content creators community on Discord</strong></a> 🧑🏻‍💻</li><li>For more content, visit <a href="https://plainenglish.io/"><strong>plainenglish.io</strong></a> + <a href="https://stackademic.com/"><strong>stackademic.com</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7a6e7cbd1891" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/automatically-deploy-apps-on-git-push-with-argocd-app-of-apps-applicationset-7a6e7cbd1891">Automatically Deploy Apps on Git Push with ArgoCD: App of Apps &amp; ApplicationSet</a> was originally published in <a href="https://aws.plainenglish.io/">AWS in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Automate DNS for Your Ingress: Kubernetes + Cloudflare + ExternalDNS]]></title>
            <link>https://aws.plainenglish.io/automate-dns-for-your-ingress-kubernetes-cloudflare-externaldns-133772cc46df?source=rss-36a89907ac0b------2</link>
            <guid isPermaLink="false">https://medium.com/p/133772cc46df</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[controller]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[ingress]]></category>
            <dc:creator><![CDATA[Ritik Kesharwani]]></dc:creator>
            <pubDate>Thu, 03 Jul 2025 11:31:53 GMT</pubDate>
            <atom:updated>2025-07-03T11:31:53.081Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/224/1*nnQT01aUKePpHKblq3oD3A.png" /></figure><p>This article is going to be <strong>short but highly effective</strong>.</p><p>If you’re using <strong>Ingress</strong> to expose your Kubernetes services to the outside world and you’re still <strong>creating DNS records manually</strong>, <strong>this guide is for you</strong>.</p><h3>What You’ll Learn</h3><p>I’ll walk you through <strong>how to automate DNS record creation in Cloudflare</strong> using the <strong>ExternalDNS controller</strong> in Kubernetes. With just <strong>one annotation</strong> on your Ingress, you can fully automate the process.</p><p>Here’s the annotation you need to add to your Ingress:</p><pre>external-dns.alpha.kubernetes.io/hostname: example.yourdomain.com</pre><h3>Prerequisites</h3><ol><li>You need a <strong>Cloudflare API Token</strong>.</li><li>Steps to get it:</li></ol><ul><li>Log in to <strong>Cloudflare</strong></li><li>Navigate to <strong>Manage Account → Account API Tokens</strong></li><li>Create a token with the following <strong>permissions</strong>: <strong>All Zones, Zone: Read, DNS: Edit</strong></li></ul><p>3. Create a <strong>Kubernetes Secret</strong> named cloudfare-token in your cluster:</p><pre>kubectl create secret generic cloudfare-token \<br>--from-literal=API_TOKEN=&lt;your-cloudflare-api-token&gt; \<br>-n kube-system</pre><h3>Deploying ExternalDNS</h3><p>You’ll need a <strong>ServiceAccount</strong>, <strong>ClusterRole</strong>, <strong>ClusterRoleBinding</strong>, and a <strong>Deployment</strong>. Below is the full manifest:</p><pre>apiVersion: v1<br>kind: ServiceAccount<br>metadata:<br>  name: external-dns<br>  namespace: kube-system<br>---<br>apiVersion: rbac.authorization.k8s.io/v1<br>kind: ClusterRole<br>metadata:<br>  name: external-dns<br>rules:<br>  - apiGroups: [&quot;&quot;]<br>    resources: [&quot;services&quot;, &quot;pods&quot;, &quot;nodes&quot;]<br>    verbs: [&quot;get&quot;, &quot;watch&quot;, &quot;list&quot;]<br>  - apiGroups: [&quot;extensions&quot;, &quot;networking.k8s.io&quot;]<br>    resources: [&quot;ingresses&quot;]<br>    verbs: [&quot;get&quot;, &quot;watch&quot;, &quot;list&quot;]<br>  - apiGroups: [&quot;&quot;]<br>    resources: [&quot;endpoints&quot;]<br>    verbs: [&quot;get&quot;, &quot;watch&quot;, &quot;list&quot;]<br>  - apiGroups: [&quot;externaldns.k8s.io&quot;]<br>    resources: [&quot;dnsendpoints&quot;]<br>    verbs: [&quot;get&quot;, &quot;watch&quot;, &quot;list&quot;]<br>---<br>apiVersion: rbac.authorization.k8s.io/v1<br>kind: ClusterRoleBinding<br>metadata:<br>  name: external-dns-viewer<br>roleRef:<br>  apiGroup: rbac.authorization.k8s.io<br>  kind: ClusterRole<br>  name: external-dns<br>subjects:<br>  - kind: ServiceAccount<br>    name: external-dns<br>    namespace: kube-system<br>---<br>apiVersion: apps/v1<br>kind: Deployment<br>metadata:<br>  name: external-dns<br>  namespace: kube-system<br>spec:<br>  replicas: 1<br>  selector:<br>    matchLabels:<br>      app: external-dns<br>  template:<br>    metadata:<br>      labels:<br>        app: external-dns<br>    spec:<br>      serviceAccountName: external-dns<br>      containers:<br>        - name: external-dns<br>          image: registry.k8s.io/external-dns/external-dns:v0.17.0<br>          args:<br>            - --source=service<br>            - --source=ingress<br>            - --zone-id-filter=&lt;Cloudfare ZONE ID&gt;<br>            - --provider=cloudflare<br>          env:<br>            - name: API_TOKEN<br>              valueFrom:<br>                secretKeyRef:<br>                  name: cloudfare-token<br>                  key: API_TOKEN</pre><p>This ExternalDNS controller is an <strong>excellent way to eliminate manual DNS record management</strong> and bring more automation into your Kubernetes workflow. Whether you’re managing dozens or hundreds of services, this setup ensures your DNS stays in sync <strong>automatically</strong>.</p><h3>Thank you for being a part of the community</h3><p><em>Before you go:</em></p><ul><li>Be sure to <strong>clap</strong> and <strong>follow</strong> the writer ️👏<strong>️️</strong></li><li>Follow us: <a href="https://x.com/inPlainEngHQ"><strong>X</strong></a> | <a href="https://www.linkedin.com/company/inplainenglish/"><strong>LinkedIn</strong></a> | <a href="https://www.youtube.com/@InPlainEnglish"><strong>YouTube</strong></a> | <a href="https://newsletter.plainenglish.io/"><strong>Newsletter</strong></a> | <a href="https://open.spotify.com/show/7qxylRWKhvZwMz2WuEoua0"><strong>Podcast</strong></a> | <a href="https://twitch.tv/inplainenglish"><strong>Twitch</strong></a></li><li><a href="https://differ.blog/"><strong>Start your own free AI-powered blog on Differ</strong></a> 🚀</li><li><a href="https://discord.gg/in-plain-english-709094664682340443"><strong>Join our content creators community on Discord</strong></a> 🧑🏻‍💻</li><li>For more content, visit <a href="https://plainenglish.io/"><strong>plainenglish.io</strong></a> + <a href="https://stackademic.com/"><strong>stackademic.com</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=133772cc46df" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/automate-dns-for-your-ingress-kubernetes-cloudflare-externaldns-133772cc46df">Automate DNS for Your Ingress: Kubernetes + Cloudflare + ExternalDNS</a> was originally published in <a href="https://aws.plainenglish.io/">AWS in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Secrets Made Easy in Kubernetes with External Secrets Operator (ESO)]]></title>
            <link>https://aws.plainenglish.io/secrets-made-easy-in-kubernetes-with-external-secrets-operator-eso-e9d1514a23eb?source=rss-36a89907ac0b------2</link>
            <guid isPermaLink="false">https://medium.com/p/e9d1514a23eb</guid>
            <category><![CDATA[secrets]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[helm]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Ritik Kesharwani]]></dc:creator>
            <pubDate>Sun, 22 Jun 2025 07:29:38 GMT</pubDate>
            <atom:updated>2025-06-24T00:41:55.874Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/834/0*tN3NKAy-9fDk6-mT.png" /></figure><p>Managing secrets in Kubernetes can feel like trying to store candy in a kindergarten classroom, everyone wants access, but only a few should get it! That’s where <strong>External Secrets Operator (ESO)</strong> steps in. If your secrets live in AWS Secrets Manager, Parameter Store, or Vault, ESO is like a friendly courier who fetches them securely and delivers them to your apps running in Kubernetes.</p><p>In this guide, we’ll walk through <strong>how to use ESO to pull secrets from AWS Secrets Manager and Parameter Store into your Kubernetes cluster</strong>, in just three simple steps:</p><h3>1. What is ESO?</h3><p><strong>ESO (External Secrets Operator)</strong> is a Kubernetes operator that lets you <strong>sync secrets from external providers</strong> (like AWS Secrets Manager or SSM Parameter Store) into Kubernetes secrets.</p><p>To extend Kubernetes to support this functionality, ESO introduces some new Custom Resource Definitions (CRDs):</p><ul><li><strong>ClusterSecretStore</strong>: Cluster-wide config for connecting to secret backends.</li><li><strong>SecretStore</strong>: Same as above, but namespace-scoped.</li><li><strong>ExternalSecret</strong>: Specifies which external secret to fetch and how to map it into a Kubernetes Secret.</li></ul><p>In this article, we’ll focus on ClusterSecretStore and ExternalSecret.</p><h3>2. Prerequisites</h3><blockquote>Before your cluster can whisper secrets to ESO, you’ll need a few things:</blockquote><h4>IAM Policy(eso_policy)</h4><p>Create a policy allowing access to the relevant AWS services</p><pre>{<br>    &quot;Version&quot; : &quot;2012-10-17&quot;,<br>    &quot;Statement&quot; : [<br>      {<br>        &quot;Effect&quot; : &quot;Allow&quot;,<br>        &quot;Action&quot; : [<br>          &quot;secretsmanager:GetSecretValue&quot;,<br>          &quot;secretsmanager:DescribeSecret&quot;,<br>          &quot;secretsmanager:ListSecrets&quot;,<br>          &quot;secretsmanager:BatchGetSecretValue&quot;,<br>          &quot;secretsmanager:GetResourcePolicy&quot;,<br>          &quot;secretsmanager:ListSecretVersionIds&quot;,<br>          &quot;ssm:GetParameter*&quot;<br>        ],<br>        &quot;Resource&quot; : &quot;*&quot;<br>      }</pre><h4>IAM role(eso_role)</h4><p>Create a role and attach the above policy. Then, set up the trust relationship so EKS can assume the role using OIDC:</p><pre>{<br>    Version = &quot;2012-10-17&quot;,<br>    Statement = [<br>      {<br>        Effect = &quot;Allow&quot;,<br>        Principal = {<br>          Federated = &quot;arn_of_clusters_identity_provider&quot;<br>        },<br>        Action = &quot;sts:AssumeRoleWithWebIdentity&quot;,<br>        Condition = {<br>          StringEquals = {<br>            &quot;${replace(data.aws_iam_openid_connect_provider.oidc_provider.url, &quot;https://&quot;, &quot;&quot;)}:sub&quot; = &quot;system:serviceaccount:{external_secrets_namespace}:{service_account_name}&quot;<br>            &quot;${replace(data.aws_iam_openid_connect_provider.oidc_provider.url, &quot;https://&quot;, &quot;&quot;)}:aud&quot; = &quot;sts.amazonaws.com&quot;<br>          }<br>        }<br>      }<br>    ]<br>  }</pre><h4>Kubernetes service account(kubernetes_service_account)</h4><p>Link the IAM role to a Kubernetes ServiceAccount via annotations:</p><pre>apiVersion: v1<br>kind: ServiceAccount<br>metadata:<br>  annotations:<br>     eks.amazonaws.com/role-arn: &quot;arn:aws:iam::&lt;account_id&gt;:role/eso_role&quot;<br>  name: kubernetes_service_account<br>  namespace: external-secrets</pre><h4>Install ESO via helm</h4><pre>helm repo add external-secrets https://charts.external-secrets.io<br><br>helm install external-secrets \<br>   external-secrets/external-secrets \<br>    -n external-secrets \<br>    --create-namespace \</pre><h3>3. Using ESO with AWS</h3><p>Let’s connect the dots! First, define the ClusterSecretStore.</p><h4>For AWS Secrets Manager:</h4><pre>apiVersion: external-secrets.io/v1beta1<br>kind: ClusterSecretStore<br>metadata:<br>  name: aws-secret-store<br>spec:<br>  provider:<br>    aws:<br>      service: SecretsManager<br>      region: &quot;aws_region&quot;<br>      auth:<br>        jwt:<br>          serviceAccountRef:<br>            name: external-secrets-svc-account<br>            namespace: external-secrets</pre><h4>For AWS SSM Parameter Store:</h4><pre>apiVersion: external-secrets.io/v1beta1<br>kind: ClusterSecretStore<br>metadata:<br>  name: aws-ssm-store<br>spec:<br>  provider:<br>    aws:<br>      service: ParameterStore <br>      region: &quot;aws_region&quot;<br>      auth:<br>        jwt:<br>          serviceAccountRef:<br>            name: external-secrets-svc-account<br>            namespace: external-secrets</pre><h3>4. Creating an ExternalSecret</h3><p>Let’s put ESO to work! Suppose you’ve stored your database credentials in <strong>AWS Secrets Manager</strong> — for example:</p><p>database-secret contains the key DB_USERNAME and DB_PASSWORD</p><p>Now you want to securely inject these values into your Kubernetes cluster.</p><p>Here’s how you define an ExternalSecret to fetch them:</p><pre>apiVersion: external-secrets.io/v1beta1<br>kind: ExternalSecret<br>metadata:<br>  name: database-credential #name of k8s secret<br>  namespace: your_preffered_namespace #namespace of secret <br>spec:<br>  refreshInterval: 1m #frequency to fetch secrets from AWS<br>  secretStoreRef:<br>    name: aws-secret-store<br>    kind: ClusterSecretStore<br>  target:<br>    name: database-credential  # Secret created by ESO in EKS cluster<br>    creationPolicy: Owner<br>  data:<br>    - secretKey: DB_USERNAME<br>      remoteRef:<br>        key: database-secret # name of secret which we have created in AWS<br>        property: DB_USERNAME<br>    - secretKey: DB_PASSWORD<br>      remoteRef:<br>        key: database-secret  # name of secret which we have created in AWS<br>        property: DB_PASSWORD</pre><p>Save this as secret.yaml, then apply it</p><pre>kubectl apply -f secret.yaml</pre><p>That’s it! 🎉</p><h4>ESO will now:</h4><p>Connect to AWS Secrets Manager using the IAM role tied to your Kubernetes ServiceAccount.</p><p>Pull the DB_USER and DB_PASSWORD values.</p><p>Create a Kubernetes Secret named database-credential in your specified namespace.</p><p>Refresh it every minute (refreshInterval: 1m) — so any change in AWS is automatically synced to your cluster.</p><blockquote>By default, ESO stores secrets in Kubernetes as base64-encoded values, which is standard for Kubernetes Secrets. So don’t worry if the data looks a bit scrambled — Kubernetes is just trying to be safe!</blockquote><h3>Thank you for being a part of the community</h3><p><em>Before you go:</em></p><ul><li>Be sure to <strong>clap</strong> and <strong>follow</strong> the writer ️👏<strong>️️</strong></li><li>Follow us: <a href="https://x.com/inPlainEngHQ"><strong>X</strong></a> | <a href="https://www.linkedin.com/company/inplainenglish/"><strong>LinkedIn</strong></a> | <a href="https://www.youtube.com/@InPlainEnglish"><strong>YouTube</strong></a> | <a href="https://newsletter.plainenglish.io/"><strong>Newsletter</strong></a> | <a href="https://open.spotify.com/show/7qxylRWKhvZwMz2WuEoua0"><strong>Podcast</strong></a> | <a href="https://twitch.tv/inplainenglish"><strong>Twitch</strong></a></li><li><a href="https://differ.blog/"><strong>Start your own free AI-powered blog on Differ</strong></a> 🚀</li><li><a href="https://discord.gg/in-plain-english-709094664682340443"><strong>Join our content creators community on Discord</strong></a> 🧑🏻‍💻</li><li>For more content, visit <a href="https://plainenglish.io/"><strong>plainenglish.io</strong></a> + <a href="https://stackademic.com/"><strong>stackademic.com</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e9d1514a23eb" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/secrets-made-easy-in-kubernetes-with-external-secrets-operator-eso-e9d1514a23eb">Secrets Made Easy in Kubernetes with External Secrets Operator (ESO)</a> was originally published in <a href="https://aws.plainenglish.io/">AWS in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS ECR + ArgoCD: Automate Helm Chart Access with Cross-Account Token Rotation]]></title>
            <link>https://aws.plainenglish.io/aws-ecr-argocd-automate-helm-chart-access-with-cross-account-token-rotation-582efe20a748?source=rss-36a89907ac0b------2</link>
            <guid isPermaLink="false">https://medium.com/p/582efe20a748</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[argo-cd]]></category>
            <category><![CDATA[gitops]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Ritik Kesharwani]]></dc:creator>
            <pubDate>Fri, 23 May 2025 14:20:31 GMT</pubDate>
            <atom:updated>2025-06-25T00:22:22.005Z</atom:updated>
            <content:encoded><![CDATA[<p>One major hurdle when using Amazon ECR as an OCI-compliant registry to store Helm charts and integrating it with ArgoCD for application deployments is the <strong>ECR authorization token</strong>, which <strong>expires every 12 hours</strong>. To ensure smooth and continuous deployments via ArgoCD, <strong>automating the token refresh process is critical</strong>.</p><p>This guide walks you through setting up an <strong>automated solution</strong> using <strong>two AWS accounts</strong>:</p><ul><li><strong>Account A</strong>: Hosts the <strong>Amazon EKS cluster</strong></li><li><strong>Account B</strong>: Stores the <strong>Helm charts in Amazon ECR</strong></li></ul><h3>Prerequisites</h3><p>To access the ECR repository across AWS accounts, we first need to establish a <strong>trust relationship</strong> between Account A and Account B.</p><h4>1. In Account A (EKS Cluster Account)</h4><ul><li><strong>Create an IAM Role</strong> for ArgoCD, e.g., argocd-image-updater, associated with the <strong>EKS cluster’s OIDC identity provider, service account, and namespace</strong>.</li></ul><pre>{<br>    &quot;Version&quot;: &quot;2012-10-17&quot;,<br>    &quot;Statement&quot;: [<br>        {<br>            &quot;Effect&quot;: &quot;Allow&quot;,<br>            &quot;Principal&quot;: {<br>                &quot;Federated&quot;: &lt;arn of cluster&#39;s OIDC provider&gt;<br>            },<br>            &quot;Action&quot;: &quot;sts:AssumeRoleWithWebIdentity&quot;,<br>            &quot;Condition&quot;: {<br>                &quot;StringEquals&quot;: {<br>                    &quot;&lt;OIDC ID&gt;:aud&quot;: &quot;sts.amazonaws.com&quot;,<br>                    &quot;&lt;OIDC ID&gt;:sub&quot;: &quot;system:serviceaccount:&lt;namespace&gt;:&lt;service account name&gt;&quot;<br>                }<br>            }<br>        }<br>    ]<br>}</pre><ul><li>Attach the following policies to the role:</li></ul><pre>{<br>    &quot;Version&quot;: &quot;2012-10-17&quot;,<br>    &quot;Statement&quot;: [<br>        {<br>            &quot;Sid&quot;: &quot;AssumeRoleInAccountB&quot;,<br>            &quot;Effect&quot;: &quot;Allow&quot;,<br>            &quot;Resource&quot;: &quot;arn:aws:iam::&lt;Account B&gt;:role/&lt;Role name present in Account B&gt;&quot;,<br>            &quot;Action&quot;: &quot;sts:AssumeRole&quot;<br>        }<br>    ]<br>}</pre><h4>2. In Account B (Chart Repository Account)</h4><ul><li><strong>Create an IAM Role </strong>image-updaterthat:</li><li>Has a <strong>trust relationship</strong> with the argocd-image-updater role in Account A</li></ul><pre>{<br>    &quot;Version&quot;: &quot;2012-10-17&quot;,<br>    &quot;Statement&quot;: [<br>        {<br>            &quot;Effect&quot;: &quot;Allow&quot;,<br>            &quot;Principal&quot;: {<br>                &quot;AWS&quot;: &quot;arn:aws:iam::&lt;Account A&gt;:role/argocd-image-updater&quot;<br>            },<br>            &quot;Action&quot;: &quot;sts:AssumeRole&quot;<br>        }<br>    ]<br>}</pre><ul><li>Grants <strong>ECR read-only permissions</strong> (AmazonEC2ContainerRegistryReadOnly)</li></ul><h3>Automating the Token Refresh</h3><p>To refresh the token automatically without manual intervention, we’ll create a Kubernetes CronJob.</p><blockquote><strong>Note:</strong> When you add a repo to ArgoCD, it creates a secret in the argocd namespace. The secret name used in the manifest should match that one.</blockquote><ul><li>Below is a minimal Kubernetes manifest file for required resources; for additional parameters, refer to this <a href="https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/"><strong>document</strong></a>.</li></ul><pre># cronjob which will run every 11th hour on 45th minute to patch the secret<br>apiVersion: batch/v1<br>kind: CronJob<br>metadata:<br>  name: argocd-ecr-login<br>  namespace: argocd<br>spec:<br>  schedule: &quot;45 */11 * * *&quot;  # this will run every 11 hour 45 mins<br>  jobTemplate:<br>    spec:<br>      template:<br>        spec:<br>          serviceAccountName: argocd-image-updater<br>          containers:<br>          - name: ecr-login<br>            image: amazonlinux:2<br>            command:<br>              - /bin/sh<br>              - -c<br>              - |<br>                # Install dependencies<br>                yum install -y curl jq tar gzip aws-cli<br>                # Download kubectl<br>                curl -LO https://s3.us-west-2.amazonaws.com/amazon-eks/1.32.3/2025-04-17/bin/linux/amd64/kubectl<br>                chmod +x ./kubectl<br>                mv ./kubectl /usr/local/bin/kubectl<br><br>                echo &quot;Assuming role...&quot;<br>                ROLE_ARN=&quot;arn:aws:iam::&lt;Account B&gt;:role/image-updater&quot;<br>                SESSION_NAME=&quot;argocd-image-updater-session&quot;<br><br>                read AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN &lt;&lt;EOF<br>                $(aws sts assume-role \<br>                  --role-arn &quot;$ROLE_ARN&quot; \<br>                  --role-session-name &quot;$SESSION_NAME&quot; \<br>                  --query &#39;Credentials.[AccessKeyId,SecretAccessKey,SessionToken]&#39; \<br>                  --output text)<br>                EOF<br><br>                export AWS_ACCESS_KEY_ID<br>                export AWS_SECRET_ACCESS_KEY<br>                export AWS_SESSION_TOKEN<br>                echo &quot;assumed role successfully...&quot;<br><br>                echo &quot;generating token...&quot;<br>                ECR_TOKEN=$(aws ecr get-authorization-token --query &quot;authorizationData[0].authorizationToken&quot; --output text)<br>                echo &quot;encoding token...&quot;<br>                DECODED=$(echo &quot;$ECR_TOKEN&quot; | base64 -d)<br>                PASSWORD=$(echo &quot;$DECODED&quot; | cut -d&#39;:&#39; -f2)<br>                ENCODED_PASSWORD=$(echo -n &quot;$PASSWORD&quot; | base64 | tr -d &#39;\n&#39;)<br><br>                ARGOCD_NAMESPACE=&quot;argocd&quot;<br>                ARGOCD_SECRET_NAME=&quot;&quot; #secret name to patch<br>                SECRET_KEY=&quot;password&quot;<br>                echo &quot;patching secret...&quot;<br>                # Patch the existing ArgoCD secret with the new password<br>                kubectl patch secret $ARGOCD_SECRET_NAME -n $ARGOCD_NAMESPACE -p &quot;{\&quot;data\&quot;:{\&quot;$SECRET_KEY\&quot;:\&quot;$ENCODED_PASSWORD\&quot;}}&quot;<br><br>          restartPolicy: OnFailure<br>---<br># Service Account<br>apiVersion: v1<br>kind: ServiceAccount<br>metadata:<br>  name: argocd-image-updater<br>  namespace: argocd<br>  annotations:<br>    eks.amazonaws.com/role-arn:  arn:aws:iam::&lt;Account A&gt;:role/argocd-image-updater<br>---<br><br># role which grants permission to get, patch and update the secret in argocd namespace<br>apiVersion: rbac.authorization.k8s.io/v1<br>kind: Role<br>metadata:<br>  name: secret-access-role<br>  namespace: argocd<br>rules:<br>  - apiGroups: [&quot;&quot;]<br>    resources: [&quot;secrets&quot;]<br>    verbs: [&quot;get&quot;, &quot;patch&quot;, &quot;update&quot;]<br>---<br><br># binding the role to service account<br><br>apiVersion: rbac.authorization.k8s.io/v1<br>kind: RoleBinding<br>metadata:<br>  name: secret-access-rolebinding<br>  namespace: argocd<br>roleRef:<br>  apiGroup: rbac.authorization.k8s.io<br>  kind: Role<br>  name: secret-access-role<br>subjects:<br>  - kind: ServiceAccount<br>    name: argocd-image-updater<br>    namespace: argocd</pre><h3>Summary</h3><ul><li>You <strong>eliminate manual token updates</strong>.</li><li>Ensure <strong>ArgoCD has continuous access</strong> to Helm charts stored in a cross-account ECR.</li><li>Maintain a <strong>secure and scalable</strong> approach using IAM roles and trust relationships.</li></ul><p>This approach is especially useful in <strong>enterprise environments</strong> where Helm charts are managed centrally but deployed across multiple environments or AWS accounts.</p><h3>Thank you for being a part of the community</h3><p><em>Before you go:</em></p><ul><li>Be sure to <strong>clap</strong> and <strong>follow</strong> the writer ️👏<strong>️️</strong></li><li>Follow us: <a href="https://x.com/inPlainEngHQ"><strong>X</strong></a> | <a href="https://www.linkedin.com/company/inplainenglish/"><strong>LinkedIn</strong></a> | <a href="https://www.youtube.com/@InPlainEnglish"><strong>YouTube</strong></a> | <a href="https://newsletter.plainenglish.io/"><strong>Newsletter</strong></a> | <a href="https://open.spotify.com/show/7qxylRWKhvZwMz2WuEoua0"><strong>Podcast</strong></a> | <a href="https://twitch.tv/inplainenglish"><strong>Twitch</strong></a></li><li><a href="https://differ.blog/"><strong>Start your own free AI-powered blog on Differ</strong></a> 🚀</li><li><a href="https://discord.gg/in-plain-english-709094664682340443"><strong>Join our content creators community on Discord</strong></a> 🧑🏻‍💻</li><li>For more content, visit <a href="https://plainenglish.io/"><strong>plainenglish.io</strong></a> + <a href="https://stackademic.com/"><strong>stackademic.com</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=582efe20a748" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/aws-ecr-argocd-automate-helm-chart-access-with-cross-account-token-rotation-582efe20a748">AWS ECR + ArgoCD: Automate Helm Chart Access with Cross-Account Token Rotation</a> was originally published in <a href="https://aws.plainenglish.io/">AWS in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Use Multiple Git Repositories for Helm Charts and Values with ArgoCD]]></title>
            <link>https://aws.plainenglish.io/how-to-use-multiple-git-repositories-for-helm-charts-and-values-with-argocd-bb48066e76b3?source=rss-36a89907ac0b------2</link>
            <guid isPermaLink="false">https://medium.com/p/bb48066e76b3</guid>
            <category><![CDATA[gitops]]></category>
            <category><![CDATA[argo-cd]]></category>
            <category><![CDATA[modular]]></category>
            <category><![CDATA[deployment]]></category>
            <dc:creator><![CDATA[Ritik Kesharwani]]></dc:creator>
            <pubDate>Sat, 17 May 2025 05:38:43 GMT</pubDate>
            <atom:updated>2025-06-25T00:22:25.484Z</atom:updated>
            <content:encoded><![CDATA[<p>When managing multiple microservices of the same kind on Amazon EKS using ArgoCD, it’s efficient to use a <strong>shared Helm chart</strong> and maintain <strong>separate </strong><strong>values.yaml files</strong> for each application. This strategy helps avoid the overhead of managing multiple individual charts while preserving flexibility in configuration.</p><p>However, this setup introduces a challenge: <strong>ArgoCD needs to pull data from multiple sources</strong> — one for the Helm chart and another for the application-specific values.</p><p>In this article, we’ll walk through how to configure ArgoCD to deploy an application using <strong>two Git repositories</strong>:</p><ul><li>One for the Helm chart</li><li>One for the values.yaml file</li></ul><p>Here’s a sample ArgoCD Application manifest that demonstrates this configuration:</p><pre>apiVersion: argoproj.io/v1alpha1<br>kind: Application<br>metadata:<br>  name: demo-app # Application name<br>  namespace: argocd # Namespace where ArgoCD is installed<br>spec:<br>  project: default<br>  sources:<br>    # Source 1: Git repo or OCI repo for the Helm chart<br>    - repoURL: https://github.com/xyz/helm-chart.git<br>      chart: demo-chart # Name of the Helm chart<br>      targetRevision: 1.0.0 # Chart version<br>      helm:<br>        valueFiles:<br>          - $values/&lt;path-to-values-file&gt;/values.yaml<br><br>    # Source 2: Git repo containing the values.yaml file<br>    - repoURL: https://github.com/xyz/argocd.git<br>      targetRevision: main # Git branch<br>      ref: values<br><br>  destination:<br>    server: https://kubernetes.default.svc<br>    namespace: destination # Target namespace for app deployment</pre><blockquote>ArgoCD <strong>expects a </strong><strong>values.yaml file</strong> in the Helm chart repository by default.<br> To prevent errors, you should keep a <strong>dummy </strong><strong>values.yaml</strong> in the Helm chart repository (e.g., helm-chart.git). This dummy file will be <strong>overridden by the actual values</strong> from the second repository.</blockquote><h3>Benefits of This Approach</h3><ul><li><strong>Reusability</strong>: Maintain one Helm chart for multiple microservices.</li><li><strong>Separation of concerns</strong>: Charts and configurations live in separate repositories.</li><li><strong>Cleaner GitOps model</strong>: Makes versioning and rollback simpler and more traceable.</li></ul><p>Using multiple sources in ArgoCD is a powerful way to <strong>decouple your Helm chart logic from application-specific values</strong>, improving maintainability and reducing duplication. With the above setup, you can deploy applications efficiently while keeping repositories clean and modular.</p><h3>Thank you for being a part of the community</h3><p><em>Before you go:</em></p><ul><li>Be sure to <strong>clap</strong> and <strong>follow</strong> the writer ️👏<strong>️️</strong></li><li>Follow us: <a href="https://x.com/inPlainEngHQ"><strong>X</strong></a> | <a href="https://www.linkedin.com/company/inplainenglish/"><strong>LinkedIn</strong></a> | <a href="https://www.youtube.com/@InPlainEnglish"><strong>YouTube</strong></a> | <a href="https://newsletter.plainenglish.io/"><strong>Newsletter</strong></a> | <a href="https://open.spotify.com/show/7qxylRWKhvZwMz2WuEoua0"><strong>Podcast</strong></a> | <a href="https://twitch.tv/inplainenglish"><strong>Twitch</strong></a></li><li><a href="https://differ.blog/"><strong>Start your own free AI-powered blog on Differ</strong></a> 🚀</li><li><a href="https://discord.gg/in-plain-english-709094664682340443"><strong>Join our content creators community on Discord</strong></a> 🧑🏻‍💻</li><li>For more content, visit <a href="https://plainenglish.io/"><strong>plainenglish.io</strong></a> + <a href="https://stackademic.com/"><strong>stackademic.com</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bb48066e76b3" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/how-to-use-multiple-git-repositories-for-helm-charts-and-values-with-argocd-bb48066e76b3">How to Use Multiple Git Repositories for Helm Charts and Values with ArgoCD</a> was originally published in <a href="https://aws.plainenglish.io/">AWS in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unfolding Logistic Regression]]></title>
            <link>https://medium.com/analytics-vidhya/unfolding-logistic-regression-7b2cf1db6623?source=rss-36a89907ac0b------2</link>
            <guid isPermaLink="false">https://medium.com/p/7b2cf1db6623</guid>
            <category><![CDATA[mathematics]]></category>
            <category><![CDATA[supervised-learning]]></category>
            <category><![CDATA[logistic-regression]]></category>
            <category><![CDATA[classification]]></category>
            <dc:creator><![CDATA[Ritik Kesharwani]]></dc:creator>
            <pubDate>Sat, 24 Oct 2020 16:23:45 GMT</pubDate>
            <atom:updated>2020-10-24T16:23:45.248Z</atom:updated>
            <content:encoded><![CDATA[<p>After reading this article you’ll be equipped with the following,</p><ol><li>Hypothesis Function</li><li>Sigmoid Function</li><li>Cost Function</li></ol><p>Don’t get confused with the name as it says regression but Logistic Regression is a supervised learning algorithm which is used for carrying out classification tasks.</p><p>To understand classification better let’s take an example,</p><blockquote>Let’s say A college wants to classify whether the students will get the admission or not based on there exam scores, using the historical data they have. This task can be done using logistic regression.</blockquote><p>Let’s start with the hypothesis function used in Logistic Regression.</p><blockquote>“Hypothesis function approximates a target function for mapping inputs to outputs.”</blockquote><p>Hypothesis Function and Sigmoid function which is used in Logistic Regression is given below,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*INgW0sItmg1mXGMHyhGWPg.png" /><figcaption>1. Hypothesis Function and 2. Sigmoid Function</figcaption></figure><p>Graphical representation of the <strong>sigmoid function</strong> is,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/1*8abZyGIQu8F1mU50lSNdjQ.png" /><figcaption>Note: at x=0, y=0.5</figcaption></figure><blockquote>“The sigmoid function is also known as the Logistic function.”</blockquote><blockquote>theta^T*x(theta transpose x) is passed in sigmoid function as z.</blockquote><p>where,</p><blockquote>‘theta’ is the random weight which we assign and ‘x’ is the feature, after calculating the hypothesis function it is then passed into our sigmoid function.</blockquote><p>Now, let’s consider <strong>Exam 1 score as ‘x1&#39;</strong> and <strong>Exam 2score as ‘x2’, </strong>from the below fig we can see that our decision boundary(blue line) is used to separate the two classes namely ‘Admitted’ and ‘Not admitted’. Hypothesis function is used to define our decision boundary.</p><blockquote>Our hypothesis function for the given decision boundary can be written as “x1+x2≥93&quot;.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nEHUro5xGdWFum5z3UjY9A.png" /><figcaption>Decision Boundary</figcaption></figure><blockquote>Our hypothesis function says “The student will get admitted into the college if he scores more than 93 in both the exams.”</blockquote><p>As we are halfway there let’s take a moment to digest the hypothesis and sigmoid function.</p><p>The cost function of logistic regression is given below and it represents the optimization objective.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/801/1*tjo9-vBX5vjH26uS_OFGSg.png" /><figcaption>Cost Function</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/1*MWKpeRBpqxYTg2JCV-42Sg.png" /><figcaption>Plot for the cost function</figcaption></figure><p>The above two functions can be compressed into a single function i.e.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/1*V3P9kpjYBDGiUToqNhK9Pw.png" /><figcaption>Compressed function</figcaption></figure><p><em>If you have made it till here, pat your back because now you know the mathematics behind one of the most important machines learning algorithm and if you find this article interesting, feel free to say hello over </em><a href="https://www.linkedin.com/in/ritikkesharwani/"><em>LinkedIn</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7b2cf1db6623" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/unfolding-logistic-regression-7b2cf1db6623">Unfolding Logistic Regression</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Different evaluation metrics for regression]]></title>
            <link>https://medium.com/analytics-vidhya/different-evaluation-metrics-for-regression-1b04b12e0254?source=rss-36a89907ac0b------2</link>
            <guid isPermaLink="false">https://medium.com/p/1b04b12e0254</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[regression]]></category>
            <category><![CDATA[evaluation-metric]]></category>
            <dc:creator><![CDATA[Ritik Kesharwani]]></dc:creator>
            <pubDate>Wed, 14 Oct 2020 13:42:03 GMT</pubDate>
            <atom:updated>2020-10-20T12:43:29.504Z</atom:updated>
            <content:encoded><![CDATA[<h3>Evaluation metrics for regression techniques</h3><p>To be able to choose between different evaluation metrics available out there let’s take a look at “What regression is?”</p><blockquote>Regression is a statistical method used to predict a dependent variable based on some other variables which are correlated with our predicting variable.</blockquote><p>Let’s take a classic example to understand it in a better way,</p><blockquote>Suppose we want to predict the prices of the house based on the available variable which is square feet of the house. We can use regression to predict the prices where our dependent variable is the ‘price’ and the independent variable is ‘square feet’, prediction of the prices can be done using Linear Regression.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/1*UDIO6rwBgiOwFTHYwSHvsg.jpeg" /></figure><p>Above Fig depicts the formulae, which is used to predict our dependent variable, to predict our dependent variable(y) using the independent variable(x) we need to calculate the Gradient of the line(m) and the y-intercept(c).</p><p>In this way, we can use Linear Regression to predict the house price based on the square feet of the house.</p><p><strong>Now, we’ve understood “what Regression is?” and also predicted the house prices using it but how can we decide that the predicted prices are correct?</strong></p><p>This is the time when evaluation metrics comes into play.</p><blockquote>As the name suggests, Evaluation Metrics are used to check whether our predicted prices are correct or not in simple words it is used to validate our findings.</blockquote><p>So, there are 3 frequently used metrics which are explained below,</p><ol><li><strong>Mean Absolute Error(MAE):</strong> The mean absolute error, it calculates the absolute difference between our actual and predicted values.</li></ol><blockquote>Good predictions will have lower MAE value since the difference between the actual and predicted values will be less.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/503/0*xuIVcK4BoTe4pqaK" /></figure><p><strong>2. Root Mean Squared Error(RMSE):</strong> The root means squared error gives the average of squared differences between actual and predicted values and finally, the square root is taken.</p><blockquote><strong>RMSE</strong> is most useful when large errors are particularly undesirable.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/402/0*zIwkG98utnrkd4IC" /></figure><p><strong>3. R-Squared Error: </strong>R-squared is the proportion of the variance in the dependent variable that is predictable from the independent variable.</p><blockquote>The R-Squared value should not be too small or too large.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*mcmvsqI_AVWxqMkA" /></figure><p>Where,</p><p>n= No. of training examples</p><p>yi= Actual Values</p><p>yhati= Predicted values</p><p>ybari= Average of values</p><p>SSRES= Squared difference of actual and predicted values</p><p>SSTOT= Squared difference of actual and average values</p><blockquote><strong>NOTE:</strong> For a model to be good it should have lower MAE, RMSE and higher R-Squared values.</blockquote><blockquote>As they say “A picture is worth a thousand words” So, let’s understand the errors using the below picture.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/688/0*W_V5dGkkBrzWF2mh" /></figure><ol><li><strong>MAE </strong>is the sum of absolute vertical distances of the observed data(<strong>yact</strong>) and Regression line(<strong>ypred</strong>) for all the values in training data.</li><li><strong>RMSE </strong>is the sum of root mean squares of the vertical distances between <strong>yact </strong>and <strong>ypred</strong>.</li><li><strong>SSRES</strong> is the sum of the squares of the vertical distances of the <strong>yact</strong> from the <strong>Regression line</strong>.</li><li><strong>SSTOT</strong> is the sum of the squares of the vertical distances of the <strong>yact </strong>from the <strong>Mean line</strong>.</li></ol><p>Now, you are fully equipped with regression and evaluation metrics.</p><p>Hope this will help.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1b04b12e0254" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/different-evaluation-metrics-for-regression-1b04b12e0254">Different evaluation metrics for regression</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>