<?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 Farhanramzan on Medium]]></title>
        <description><![CDATA[Stories by Farhanramzan on Medium]]></description>
        <link>https://medium.com/@farhanramzan799?source=rss-3e006d95f537------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*y_GgmGmI3jBtP5GqRK52Tw.png</url>
            <title>Stories by Farhanramzan on Medium</title>
            <link>https://medium.com/@farhanramzan799?source=rss-3e006d95f537------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 09:57:22 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@farhanramzan799/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[Securing Grafana Datasources Using Kerberos Authentication via Azure & Linkerd]]></title>
            <link>https://medium.com/@farhanramzan799/securing-grafana-datasources-using-kerberos-authentication-via-azure-linkerd-fec6da55554c?source=rss-3e006d95f537------2</link>
            <guid isPermaLink="false">https://medium.com/p/fec6da55554c</guid>
            <category><![CDATA[kerberos-authentication]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[kubernetes-security]]></category>
            <category><![CDATA[kerberos]]></category>
            <category><![CDATA[devsecops]]></category>
            <dc:creator><![CDATA[Farhanramzan]]></dc:creator>
            <pubDate>Fri, 04 Jul 2025 09:49:52 GMT</pubDate>
            <atom:updated>2025-07-26T17:23:12.946Z</atom:updated>
            <content:encoded><![CDATA[<p>As enterprise observability grows, protecting access to Grafana’s data sources becomes critical — especially in multi-tenant or regulated environments. This post explores how to implement <a href="https://learn.microsoft.com/en-us/windows-server/security/kerberos/kerberos-authentication-overview"><strong>Kerberos authentication</strong></a> with <strong>Azure Active Directory (Azure AD)</strong> using <strong>Linkerd</strong> as a secure service mesh layer for Grafana data source access.</p><h4>Why Kerberos + Azure AD for Grafana?</h4><ul><li><strong>SSO Integration</strong>: Seamlessly leverage corporate identities via Azure AD.</li><li><strong>Stronger Authentication</strong>: Kerberos is ticket-based, eliminating password sharing.</li><li><strong>Data Source Security</strong>: Prevent unauthorized access to data sources (e.g., Prometheus, InfluxDB).</li><li><strong>Service Mesh Enforcement</strong>: Linkerd can enforce mTLS and route policies around Kerberos-authenticated flows.</li><li><strong>Enterprise Readiness</strong>: Aligns with Active Directory policies and audit trails.</li></ul><h4>Architecture Overview</h4><ul><li>Users authenticate with Azure AD.</li><li>A <strong>Kerberos ticket (TGT)</strong> is issued.</li><li>Grafana (or a middleware) uses this to access Kerberos-protected data sources.</li><li>Linkerd ensures mTLS, routing, and identity verification for all traffic.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AvzV_2Rs4fUlrLKIUaNotg.png" /></figure><h3>Prerequisites</h3><ul><li>Azure Active Directory</li><li>Keytab file for the service principal (or Kerberos credentials cache)</li><li>Grafana (self-hosted) running in Kubernetes</li><li>Linkerd installed in the cluster</li><li>KRB5 client utils on relevant pods</li><li>Kerberized data sources (e.g., Hadoop, Hive, Kafka, MSSQL)</li></ul><h4><strong>Step-by-Step Setup</strong></h4><ol><li>Create a Service Principal in Azure AD</li></ol><pre>az ad sp create-for-rbac --name grafana-kerberos</pre><p>2. Generate a Keytab File for the Service<br>Use Active Directory to generate:</p><pre>ktpass -out grafana.keytab -princ HTTP/grafana.yourdomain.com@YOURDOMAIN.COM -mapuser grafana-service -pass &lt;PASSWORD&gt; -ptype KRB5_NT_PRINCIPAL -crypto AES256-SHA1</pre><p>3. Mount Keytab and Configure in Grafana Pod<br>In your Grafana Kubernetes deployment:</p><pre>volumeMounts:<br>  - name: keytab<br>    mountPath: /etc/krb5.keytab<br>    readOnly: true<br>  - name: krb5-conf<br>    mountPath: /etc/krb5.conf</pre><p>4. Configure Data Source Authentication<br>Grafana supports Kerberos for certain backends. Example config:</p><pre>[auth]<br>enabled = true<br>auth_type = kerberos<br>kerberos_auth_type = KEYTAB<br>kerberos_keytab_path = /etc/krb5.keytab</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*I1uBH0urEJDvN7RrbEqv_g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/527/1*jv6ZrYDZPd1FeH0OZKzFBA.png" /></figure><p>You may need to customize the Grafana data source plugin or use a proxy layer (see next step).</p><p>5. Optional: Use a Kerberos Auth Proxy</p><p>Deploy a sidecar or reverse proxy (e.g., mod_auth_kerb, krb5-auth-proxy) between Grafana and your data source to manage ticket exchange.</p><p>6. Enable mTLS &amp; Access Control in Linkerd</p><p>Linkerd automatically enables mTLS, but you can enforce per-route access:</p><pre>apiVersion: policy.linkerd.io/v1beta1<br>kind: ServerAuthorization<br>metadata:<br>  name: allow-grafana-to-datasource<br>spec:<br>  server:<br>    name: datasource-server<br>  client:<br>    meshTLS:<br>      identities:<br>        - grafana.default.serviceaccount.identity.linkerd.cluster.local</pre><p>7. Verify Authentication</p><p>Use kinit and klist inside the pod to test the TGT:</p><pre>kinit -kt /etc/krb5.keytab HTTP/grafana.yourdomain.com<br>klist</pre><p>Ensure Grafana can connect to the data source without credentials in the connection string.</p><h4>Benefits Recap</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/741/1*Cuq5Ez6BdVoaXxQKu6DZbw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fec6da55554c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering Observability in SRE: Golden Signals, RED & USE Metrics]]></title>
            <link>https://medium.com/@farhanramzan799/mastering-observability-in-sre-golden-signals-red-use-metrics-005656c4fe7d?source=rss-3e006d95f537------2</link>
            <guid isPermaLink="false">https://medium.com/p/005656c4fe7d</guid>
            <dc:creator><![CDATA[Farhanramzan]]></dc:creator>
            <pubDate>Fri, 30 May 2025 06:33:04 GMT</pubDate>
            <atom:updated>2025-05-30T06:33:04.170Z</atom:updated>
            <content:encoded><![CDATA[<p>In the landscape of modern DevOps and Site Reliability Engineering (SRE), <strong>observability is a superpower</strong>. As systems scale across microservices and distributed cloud infrastructure, having the right observability framework helps teams respond faster to issues, reduce MTTR (Mean Time to Recovery), and ensure reliable performance. In this post, we explore the three most widely accepted monitoring models:</p><ul><li><strong>Golden Signals</strong></li><li><strong>RED Metrics</strong></li><li><strong>USE Method</strong></li></ul><p>These aren’t just metrics — they’re lenses through which you view your system’s health.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RDKBOuxyht6FKCltvwRCZw.png" /></figure><h3>Golden Signals: The SRE Standard</h3><p>First introduced in the <a href="https://sre.google/books/">Google SRE Book</a>, <strong>Golden Signals</strong> represent the four critical indicators of any user-facing system:</p><p><strong>User Experience Layer -&gt; Golden Signals (Latency, Traffic, Errors, Saturation)</strong></p><h3>1. Latency</h3><p>How long does it take to serve a request? High latency affects user experience. Measure both successful and failed requests.</p><h3>2. Traffic</h3><p>How much demand is being placed on your system? Track it using metrics like HTTP requests/sec, concurrent sessions, or messages/sec.</p><h3>3. Errors</h3><p>What percentage of requests fail? This includes server errors (5xx), client errors (4xx), timeouts, and application exceptions.</p><h3>4. Saturation</h3><p>How much of your system’s resources are being used? CPU, memory, disk I/O, and queue length indicate how close you are to your limits.</p><blockquote><strong><em>Use Case:</em></strong><em> Apply Golden Signals to understand application-wide health and detect critical bottlenecks quickly.</em></blockquote><h3>📊 RED Method: For Microservices Monitoring</h3><p>The <strong>RED Method</strong> (Rate, Errors, Duration) was developed by Tom Wilkie as a focused model for <strong>microservice observability</strong>. It’s ideal for APIs and HTTP-based services.</p><p><strong>API &amp; Microservices -&gt; RED Metrics (Rate, Errors, Duration)</strong></p><h3>R — Rate</h3><p>The number of requests per second your service is handling. This gives you a direct view of load.</p><h3>E — Errors</h3><p>The number of failed requests per second. This should be correlated with alerts and SLAs.</p><h3>D — Duration</h3><p>The amount of time each request takes. Use percentiles (like P95 or P99) to find anomalies.</p><blockquote><strong><em>Tip:</em></strong><em> RED metrics are great for building </em><strong><em>SLI/SLO dashboards</em></strong><em> and detecting regressions early.</em></blockquote><h3>⚖️ USE Method: Deep Dive Into Infrastructure</h3><p>The <strong>USE Method</strong> (Utilization, Saturation, Errors) is resource-centric and designed for system-level monitoring (e.g., hosts, containers, load balancers).</p><p><strong>Infrastructure &amp; Nodes -&gt; USE Metrics (Utilization, Saturation, Errors)</strong></p><h3>U — Utilization</h3><p>The average time a resource is busy. E.g., CPU at 90% utilization means it’s almost always in use.</p><h3>S — Saturation</h3><p>How much demand is waiting to be served. This could be CPU run queue length or disk IO wait time.</p><h3>E — Errors</h3><p>Actual faults with the resource, such as packet drops, memory faults, or disk read errors.</p><blockquote><strong><em>Best Use:</em></strong><em> Infrastructure, networking devices, databases, queues, and system-level components.</em></blockquote><h3>📊 Comparing the Three</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/782/1*QuvpOBUQr4OILK9LTlafkg.png" /></figure><h3>📈 Prometheus &amp; Grafana: Example Queries</h3><h3>Golden Signal — P95 Latency</h3><pre>histogram_quantile(0.95, rate(http_request_duration_seconds_bucket[5m]))</pre><h3>RED Example — HTTP Errors</h3><pre>rate(http_requests_total{status=~&quot;5..&quot;}[5m])</pre><h3>USE Example — CPU Utilization</h3><pre>rate(node_cpu_seconds_total{mode!=&quot;idle&quot;}[5m]) / on(instance) rate(node_cpu_seconds_total[5m])</pre><h3>🚀 Wrapping Up: Build Observability into Your DNA</h3><p>Modern systems demand modern observability. By applying <strong>Golden Signals</strong>, <strong>RED Metrics</strong>, and the <strong>USE Method</strong>, you build a layered, proactive approach to monitoring:</p><ul><li>Detect anomalies early</li><li>Triage incidents faster</li><li>Meet SLAs with confidence</li></ul><p>Each method serves a unique purpose and together, they cover the full stack — from the user’s request all the way to the system’s core.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=005656c4fe7d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setting Up a Kubernetes Cluster with KIND]]></title>
            <link>https://medium.com/@farhanramzan799/setting-up-a-kubernetes-cluster-with-kind-316d1dda566d?source=rss-3e006d95f537------2</link>
            <guid isPermaLink="false">https://medium.com/p/316d1dda566d</guid>
            <category><![CDATA[containerization]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[container-orchestration]]></category>
            <category><![CDATA[kind]]></category>
            <dc:creator><![CDATA[Farhanramzan]]></dc:creator>
            <pubDate>Fri, 01 Nov 2024 14:46:35 GMT</pubDate>
            <atom:updated>2024-11-01T14:46:35.124Z</atom:updated>
            <content:encoded><![CDATA[<p>Setting up a local Kubernetes cluster is essential for testing and development, and KIND (Kubernetes in Docker) makes this process straightforward. KIND runs a Kubernetes cluster inside Docker containers, creating a flexible and lightweight solution for deploying clusters without a heavy virtualization overhead. This guide will walk you through setting up a KIND cluster on your local machine.</p><h3>Prerequisites</h3><p>To set up a KIND cluster, you’ll need:</p><ol><li><strong>Docker</strong>: Ensure Docker is installed and running on your system, as KIND creates nodes within Docker containers.</li><li><strong>KIND CLI</strong>: Download and install the KIND CLI on your machine.</li><li><strong>kubectl CLI</strong>: Ensure kubectl is installed to manage your Kubernetes cluster.</li></ol><h3>Step 1: Install KIND</h3><ol><li><strong>Linux and macOS</strong>: Use the following command to install KIND:</li></ol><pre>curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.20.0/kind-linux-amd64<br>chmod +x ./kind<br>sudo mv ./kind /usr/local/bin/kind</pre><p>2. <strong>Windows</strong>: Download the kind.exe binary from <a href="https://github.com/kubernetes-sigs/kind/releases">KIND’s GitHub releases page</a> and add it to your system PATH.</p><p>Verify the installation by running:</p><pre>kind version</pre><h3>Step 2: Install kubectl</h3><ol><li>Download and install kubectl if not already installed:</li></ol><pre>curl -LO &quot;https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl&quot;<br>chmod +x kubectl<br>sudo mv kubectl /usr/local/bin/</pre><p>Check the installation by running:</p><pre>kubectl version --client</pre><h3>Step 3: Create a KIND Cluster</h3><p>With Docker, KIND, and kubectl installed, you’re ready to create a cluster.</p><ol><li>To create a basic single-node KIND cluster, use:</li></ol><pre>kind create cluster --name my-cluster</pre><p>2. If you want to create a multi-node cluster, create a configuration file (e.g., kind-config.yaml) with the following content:</p><pre>kind: Cluster<br>apiVersion: kind.x-k8s.io/v1alpha4<br>nodes:<br>  - role: control-plane<br>  - role: worker<br>  - role: worker</pre><p>Then, create the cluster with:</p><pre>kind create cluster --name my-cluster --config kind-config.yaml</pre><h3>Step 4: Verify the Cluster</h3><p>Once the cluster is up, you can verify its status with kubectl.</p><ol><li>List all clusters:</li></ol><pre>kubectl cluster-info --context kind-my-cluster</pre><p>View nodes in the cluster:</p><pre>kubectl get nodes</pre><h3>Step 5: Configuring kubectl for Your KIND Cluster</h3><p>The KIND CLI automatically configures kubectl to use the context for the new KIND cluster. You can check the current context by running:</p><pre>kubectl config current-context</pre><p>Switch to the KIND cluster context if needed:</p><pre>kubectl config use-context kind-my-cluster</pre><h3>Conclusion</h3><p>With KIND, you’ve now set up a fully functional local Kubernetes cluster within Docker containers. This setup is ideal for testing, local development, and experimenting with Kubernetes configurations. You can expand on this setup by deploying more applications, testing configurations, and building your Kubernetes expertise in a resource-friendly environment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=316d1dda566d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS Lambda function for scaling ECS]]></title>
            <link>https://awstip.com/aws-lambda-function-for-scaling-ecs-396ef325a768?source=rss-3e006d95f537------2</link>
            <guid isPermaLink="false">https://medium.com/p/396ef325a768</guid>
            <category><![CDATA[eventbridge]]></category>
            <category><![CDATA[amazon-web-services]]></category>
            <category><![CDATA[aws-ecs-fargate]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <dc:creator><![CDATA[Farhanramzan]]></dc:creator>
            <pubDate>Tue, 19 Dec 2023 11:36:11 GMT</pubDate>
            <atom:updated>2024-01-16T13:40:13.725Z</atom:updated>
            <content:encoded><![CDATA[<p>Here, in this tutorial we are going to see how we can write lambda functions that will help us to scale our AWS ECS services so that we reduce our cost. These lambda functions will be applicable on non-production environments running on ECS fargate, where we can scale down our resources in off-hours.</p><p><strong>ECS(Elastic Container Service):</strong><br>Amazon ECS (Elastic Container Service) is a fully managed container orchestration service provided by Amazon Web Services (AWS). It enables you to easily run, manage, and scale containerized applications using Docker containers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*MDRF3ibHD7IjymCHkEb96A.png" /></figure><h3><strong>Steps for Scaling:</strong></h3><h4>1. Set IAM policy for ECS cluster:</h4><p>Create an IAM policy that includes the required permissions for ECS interactions. For example, the policy might include permissions such as ecs:DescribeClusters, ecs:ListTasks, ecs:UpdateService, etc., depending on the actions your Lambda function needs to perform.</p><p>Here’s an example IAM policy granting a Lambda function permissions to describe ECS clusters and update ECS 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;ecs:DescribeClusters&quot;,<br>                &quot;ecs:ListTasks&quot;,<br>                &quot;ecs:UpdateService&quot;<br>            ],<br>            &quot;Resource&quot;: &quot;*&quot;<br>        }<br>    ]<br>}</pre><p>Once policy is created, now we have to create IAM role that will use this policy.</p><h3><strong>2. </strong>Create an IAM Role Using policy<strong>:</strong></h3><p>Create an IAM role in the AWS Identity and Access Management (IAM) console and attach the IAM policy created in the previous step to this role.</p><ul><li>Go to the IAM console.</li><li>Click on “<strong>Roles”</strong> in the left navigation pane.</li><li>Click “<strong>Create role</strong>” and name it “<strong>lambda_scale_ecs<em>”</em></strong></li><li>Choose “<strong>Lambda</strong>” as the service that will use this role.</li><li>Attach the previously created policy to this role.</li></ul><h3>3. Create Lambda function for Scale_Up_ECS:</h3><p>Once the IAM role is created, assign this role to the Lambda function and create lambda function.</p><ul><li>Go to the Lambda console.</li><li>Click on the Create function and name function “<strong>Scale_Up_ECS</strong>”.</li><li>In the “<strong>Permissions</strong>” tab, scroll down to “<strong>Execution role</strong>” and click “<strong>Edit</strong>.”</li><li>Choose “<strong>Use an existing role</strong>” and select the IAM role you created earlier “<strong>lambda_scale_ecs</strong>”.</li><li>Save the changes.</li><li>Then add the below code in the function:</li></ul><pre>import json<br>import boto3<br><br>def lambda_handler(event, context):<br>    client = boto3.client(&#39;ecs&#39;)<br>    scale_up_ecs_service(&quot;CLUSTER_NAME&quot;, &quot;SERVICE_NAME&quot;, client)<br>    #scale_up_ecs_service(&quot;CLUSTER_NAME&quot;, &quot;SERVICE_NAME&quot;, client)<br>    # TODO implement<br>    return {<br>        &#39;statusCode&#39;: 200,<br>        &#39;body&#39;: json.dumps(&#39;Hello from Lambda!&#39;)<br>    }<br><br><br>def scale_up_ecs_service(cluster_name, service_name, client):<br>    response = client.update_service(<br>    cluster=cluster_name,<br>    service=service_name,<br>    desiredCount=1)<br>    print(response)</pre><h3>4. Create Lambda function for Scale_Down_ECS:</h3><p>Now let’s create another function for scale down ECS:</p><ul><li>Go to the Lambda console.</li><li>Click on the Create function and name function “<strong>Scale_Down_ECS</strong>”.</li><li>In the “<strong>Permissions</strong>” tab, scroll down to “<strong>Execution role</strong>” and click “<strong>Edit</strong>.”</li><li>Choose “<strong>Use an existing role</strong>” and select the IAM role you created earlier “<strong>lambda_scale_ecs</strong>”.</li><li>Save the changes.</li><li>Then add the below code in the function:</li></ul><pre>import json<br>import boto3<br><br>def lambda_handler(event, context):<br>    client = boto3.client(&#39;ecs&#39;)<br>    scale_up_ecs_service(&quot;CLUSTER_NAME&quot;, &quot;SERIVCE_NAME&quot;, client)<br>    #scale_up_ecs_service(&quot;CLUSTER_NAME&quot;, &quot;SERIVCE_NAME&quot;, client)<br>    # TODO implement<br>    return {<br>        &#39;statusCode&#39;: 200,<br>        &#39;body&#39;: json.dumps(&#39;Hello from Lambda!&#39;)<br>    }<br><br><br>def scale_up_ecs_service(cluster_name, service_name, client):<br>    response = client.update_service(<br>    cluster=cluster_name,<br>    service=service_name,<br>    desiredCount=0)<br>    print(response)</pre><h3>5. Trigger functions using Event Bridge:</h3><p>AWS EventBridge can be used to trigger Lambda functions based on events emitted from various AWS services or custom events from your applications. EventBridge makes it easy to set up rules that match specific events and route them to specific targets, such as Lambda functions.</p><p><strong>EventBridge rule for scale up ECS:</strong></p><ul><li>Go to the AWS Management Console and navigate to the EventBridge service.</li><li>Choose to Create Rule and name it “<strong>Scale_Up_ECS_Rule</strong>”.</li><li>Select “<strong>Schedule</strong>” as rule type and move next.</li><li>Select “<strong>Recurring schedule</strong>” under occurrence, as we want to run it on regular basic.</li><li>Select “<strong>Cron-based schedule</strong>” under schedule type, as we want to run these functions on specific time.</li><li>Define the cron expression at which time you want to scale up for ECS.</li><li>Press “<strong>Next</strong>”</li><li>Chose the targeted AWS service, in our case it is lambda function that needs to be triggered.</li><li>Then select “<strong>Scale_UP_ECS” </strong>from the drop down on lambda functions.</li><li>Save the changes, now your AWS lambda function will be triggered on the time you specify in cronjob.</li></ul><p><strong>EventBridge rule for scale downECS:</strong></p><ul><li>Go to the AWS Management Console and navigate to the EventBridge service.</li><li>Choose to Create Rule and name it “<strong>Scale_Down_ECS_Rule</strong>”.</li><li>Select “<strong>Schedule</strong>” as rule type and move next.</li><li>Select “<strong>Recurring schedule</strong>” under occurrence, as we want to run it on regular basic.</li><li>Select “<strong>Cron-based schedule</strong>” under schedule type, as we want to run these functions on specific time.</li><li>Define the cron expression at which time you want to scale up for ECS.</li><li>Press “<strong>Next</strong>”</li><li>Chose the targeted AWS service, in our case it is lambda function that needs to be triggered.</li><li>Then select “<strong>Scale_Down_ECS” </strong>from the drop down on lambda functions.</li><li>Save the changes, now your AWS lambda function will be triggered on the time you specify in cronjob.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=396ef325a768" width="1" height="1" alt=""><hr><p><a href="https://awstip.com/aws-lambda-function-for-scaling-ecs-396ef325a768">AWS Lambda function for scaling ECS</a> was originally published in <a href="https://awstip.com/">AWS Tip</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is the role of service in kubernetes and its types]]></title>
            <link>https://medium.com/@farhanramzan799/what-is-the-role-of-service-in-kubernetes-and-its-types-8f271bcf5981?source=rss-3e006d95f537------2</link>
            <guid isPermaLink="false">https://medium.com/p/8f271bcf5981</guid>
            <category><![CDATA[load-balancer]]></category>
            <category><![CDATA[services]]></category>
            <category><![CDATA[kubernetes-cluster]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[kubernetes-service]]></category>
            <dc:creator><![CDATA[Farhanramzan]]></dc:creator>
            <pubDate>Mon, 18 Dec 2023 09:55:56 GMT</pubDate>
            <atom:updated>2024-01-15T06:13:16.971Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Service:</strong><br>An abstract way to expose an application running on a set of Pods as a network service.</h3><p>With Kubernetes you don’t need to modify your application to use an unfamiliar service discovery mechanism. Kubernetes gives Pods their own IP addresses and a single DNS name for a set of Pods, and can load-balance across them.</p><h3>Service Types:</h3><p>There are four types of Kubernetes services — <strong>ClusterIP, NodePort, LoadBalancer and ExternalName</strong>. The type property in the Service’s spec determines how the service is exposed to the network. If you don’t specify the service type in the yaml it will create service as a <strong>ClusterIP</strong> by default. Here is a sample for service yaml:</p><pre>            ---<br># https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer<br>apiVersion: v1<br>kind: Service<br>metadata:<br>  name: service-load-balancer-service<br>spec:<br>  selector:<br>    app: MyApp_AWS<br>  ports:<br>    - protocol: TCP<br>      port: 80<br>      targetPort: 9376<br>  type: LoadBalancer</pre><p><strong>Difference Between Service Types:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/814/1*-OTmSIe_yz1PaCGcMXhFwA.png" /></figure><h3>1. ClusterIP</h3><ul><li>ClusterIP is the default and most common service type.</li><li>Kubernetes will assign a cluster-internal IP address to ClusterIP service. This makes the service only reachable within the cluster.</li><li>You cannot make requests to service (pods) from outside the cluster.</li><li>You can optionally set cluster IP in the service definition file.</li></ul><h3>2. NodePort</h3><ul><li>NodePort service is an extension of ClusterIP service. A ClusterIP Service, to which the NodePort Service routes, is automatically created.</li><li>It exposes the service outside of the cluster by adding a cluster-wide port on top of ClusterIP.</li><li>NodePort exposes the service on each Node’s IP at a static port (the NodePort). Each node proxies that port into your Service. So, external traffic has access to fixed port on each Node. It means any request to your cluster on that port gets forwarded to the service.</li><li>You can contact the NodePort Service, from outside the cluster, by requesting &lt;NodeIP&gt;:&lt;NodePort&gt;.</li><li>Node port must be in the range of 30000–32767. Manually allocating a port to the service is optional. If it is undefined, Kubernetes will automatically assign one.</li><li>If you are going to choose node port explicitly, ensure that the port was not already used by another service.</li></ul><h3>3. LoadBalancer</h3><ul><li>LoadBalancer service is an extension of NodePort service. NodePort and ClusterIP Services, to which the external load balancer routes, are automatically created.</li><li>It integrates NodePort with cloud-based load balancers.</li><li>It exposes the Service externally using a cloud provider’s load balancer.</li><li>Each cloud provider (AWS, Azure, GCP, etc) has its own native load balancer implementation. The cloud provider will create a load balancer, which then automatically routes requests to your Kubernetes Service.</li><li>Traffic from the external load balancer is directed at the backend Pods. The cloud provider decides how it is load balanced.</li><li>The actual creation of the load balancer happens asynchronously.</li><li>Every time you want to expose a service to the outside world, you have to create a new LoadBalancer and get an IP address.</li></ul><h3>4. ExternalName</h3><ul><li>Services of type ExternalName map a Service to a DNS name, not to a typical selector such as my-service.</li><li>You specify these Services with the `spec.externalName` parameter.</li><li>It maps the Service to the contents of the externalName field (e.g. foo.bar.example.com), by returning a CNAME record with its value.</li><li>No proxying of any kind is established.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8f271bcf5981" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>