<?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 Vishal Gupta on Medium]]></title>
        <description><![CDATA[Stories by Vishal Gupta on Medium]]></description>
        <link>https://medium.com/@vishynit?source=rss-bf683e2808f2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*L7G4ETsXRqpLo9-H</url>
            <title>Stories by Vishal Gupta on Medium</title>
            <link>https://medium.com/@vishynit?source=rss-bf683e2808f2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 23:57:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vishynit/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[5 Essential Prometheus Metrics Every Developer Should Monitor]]></title>
            <link>https://medium.com/observability-101/5-essential-prometheus-metrics-every-developer-should-monitor-c201ed920037?source=rss-bf683e2808f2------2</link>
            <guid isPermaLink="false">https://medium.com/p/c201ed920037</guid>
            <category><![CDATA[promql]]></category>
            <category><![CDATA[prometheus]]></category>
            <category><![CDATA[prometheus-monitoring]]></category>
            <category><![CDATA[monitoring]]></category>
            <category><![CDATA[observability]]></category>
            <dc:creator><![CDATA[Vishal Gupta]]></dc:creator>
            <pubDate>Mon, 11 Nov 2024 13:21:03 GMT</pubDate>
            <atom:updated>2024-11-11T13:26:13.676Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*rWhJYh1585Y7Fxav22zd6A.png" /><figcaption>Prometheus Banner</figcaption></figure><p>Monitoring applications is critical for maintaining high availability, performance, and reliability. Prometheus, with its powerful querying capabilities, has become a favorite tool for gathering and visualizing metrics. In this article, we’ll explore five essential Prometheus metrics that every developer should monitor to ensure their applications remain healthy and performant.</p><h3>1. Request Rate (Throughput)</h3><h3>Why It’s Important</h3><p>The request rate, or throughput, shows how many requests your application is receiving over time. Monitoring request rates helps you understand normal traffic patterns, prepare for scaling during peak loads, and detect sudden changes that might signal a problem.</p><h3>How to Monitor Request Rate in Prometheus</h3><p>Use Prometheus’ rate() function to calculate the request rate over a defined time interval:</p><pre>rate(http_requests_total[1m])</pre><p>This query provides the average request rate per second over the past minute. You can further break down requests by HTTP status codes or endpoints for finer-grained insights:</p><pre>rate(http_requests_total{status_code=&quot;200&quot;}[1m])</pre><h3>When to Alert</h3><p>Set an alert for significant deviations from baseline values. For example, a sudden drop in the request rate could indicate an outage or connectivity issue.</p><h3>2. Error Rate</h3><h3>Why It’s Important</h3><p>Monitoring errors helps detect failed requests and issues in real time. High error rates usually point to bugs, misconfigurations, or system outages. Early detection allows developers to quickly diagnose and fix issues, reducing impact on users.</p><h3>How to Monitor Error Rate in Prometheus</h3><p>Filter errors by status code (like 500 for internal server errors) and calculate the error rate:</p><pre>rate(http_requests_total{status_code=~&quot;5..&quot;}[1m])</pre><p>This provides the rate of 5xx server errors per second. You can monitor specific endpoints or status codes to pinpoint error sources.</p><h3>When to Alert</h3><p>Set up alerts to notify you when error rates exceed a certain threshold (e.g., 1% of total requests). Alerts can help prevent prolonged downtime and improve user satisfaction.</p><h3>3. Latency (Request Duration)</h3><h3>Why It’s Important</h3><p>Latency, or response time, measures how quickly your application responds to requests. High latency often indicates bottlenecks, inefficient code, or overloaded infrastructure, which can impact user experience.</p><h3>How to Monitor Latency in Prometheus</h3><p>Use histogram-based metrics to measure latency across various percentiles. Here’s a typical query for a 95th percentile latency:</p><pre>histogram_quantile(0.95, rate(http_request_duration_seconds_bucket[5m]))</pre><p>This provides the 95th percentile latency over the last 5 minutes, which helps you understand worst-case scenarios experienced by your users.</p><h3>When to Alert</h3><p>Set alerts based on latency percentiles. For example, if the 95th percentile latency exceeds 1 second, this could signal a performance issue requiring immediate attention.</p><h3>4. CPU Usage</h3><h3>Why It’s Important</h3><p>CPU usage is a key indicator of how intensively your application is using system resources. High CPU usage might indicate a need for optimization or scaling, while consistently low usage could signal over-provisioned resources.</p><h3>How to Monitor CPU Usage in Prometheus</h3><p>Monitor CPU usage with node_exporter metrics (for host-level metrics) or container_cpu_usage_seconds_total (for Kubernetes containers):</p><pre>rate(container_cpu_usage_seconds_total[1m])</pre><p>This shows the CPU usage per second for each container, which can help identify hotspots or resource constraints.</p><h3>When to Alert</h3><p>Set alerts if CPU usage exceeds a certain threshold (e.g., 80%) over an extended period. High sustained CPU usage may require scaling or performance optimization.</p><h3>5. Memory Usage</h3><h3>Why It’s Important</h3><p>Memory usage monitoring helps prevent out-of-memory (OOM) errors and optimizes memory allocation. Insufficient memory can lead to crashes or degraded performance, while excessive memory usage could indicate memory leaks or unoptimized resource allocation.</p><h3>How to Monitor Memory Usage in Prometheus</h3><p>Use container_memory_usage_bytes to track memory consumption in a Kubernetes environment:</p><pre>container_memory_usage_bytes</pre><p>This metric provides real-time memory usage per container. To monitor memory usage at the host level, use node_memory_Active_bytes from node_exporter.</p><h3>When to Alert</h3><p>Set up alerts if memory usage consistently exceeds a certain percentage (e.g., 90%) or if it grows continuously, which could indicate a memory leak.</p><h3>Conclusion</h3><p>By monitoring these five essential metrics — request rate, error rate, latency, CPU usage, and memory usage — you’ll have a comprehensive view of your application’s health and performance. Setting up appropriate alerts ensures that you are notified of potential issues before they impact users, enabling you to maintain a stable and responsive application. Prometheus, combined with alerting and visualization tools like Grafana, offers a powerful observability stack for modern microservices.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c201ed920037" width="1" height="1" alt=""><hr><p><a href="https://medium.com/observability-101/5-essential-prometheus-metrics-every-developer-should-monitor-c201ed920037">5 Essential Prometheus Metrics Every Developer Should Monitor</a> was originally published in <a href="https://medium.com/observability-101">Observability 101</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setting Up Distributed Tracing with OpenTelemetry, Tempo, and Grafana]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/observability-101/setting-up-distributed-tracing-with-opentelemetry-tempo-and-grafana-2b3ba9161f4e?source=rss-bf683e2808f2------2"><img src="https://cdn-images-1.medium.com/max/1494/1*h5e_XY_c7ikbEQmPdaNBhw.png" width="1494"></a></p><p class="medium-feed-snippet">In modern applications, distributed tracing provides deep visibility into how requests flow through various services in a microservices&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/observability-101/setting-up-distributed-tracing-with-opentelemetry-tempo-and-grafana-2b3ba9161f4e?source=rss-bf683e2808f2------2">Continue reading on Observability 101 »</a></p></div>]]></description>
            <link>https://medium.com/observability-101/setting-up-distributed-tracing-with-opentelemetry-tempo-and-grafana-2b3ba9161f4e?source=rss-bf683e2808f2------2</link>
            <guid isPermaLink="false">https://medium.com/p/2b3ba9161f4e</guid>
            <category><![CDATA[observability]]></category>
            <category><![CDATA[distributed-tracing]]></category>
            <category><![CDATA[grafana]]></category>
            <category><![CDATA[tempo]]></category>
            <category><![CDATA[tracing]]></category>
            <dc:creator><![CDATA[Vishal Gupta]]></dc:creator>
            <pubDate>Sat, 09 Nov 2024 18:45:06 GMT</pubDate>
            <atom:updated>2024-11-11T13:07:01.662Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Distributed Tracing in Kubernetes using OpenTelemetry & Jaegar: A Step-by-Step Guide]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/observability-101/distributed-tracing-in-kubernetes-using-opentelemetry-jaegar-a-step-by-step-guide-a48899c2b27a?source=rss-bf683e2808f2------2"><img src="https://cdn-images-1.medium.com/max/1780/1*D6-apBVKvI340JiFbZooSQ.png" width="1780"></a></p><p class="medium-feed-snippet">Introduction</p><p class="medium-feed-link"><a href="https://medium.com/observability-101/distributed-tracing-in-kubernetes-using-opentelemetry-jaegar-a-step-by-step-guide-a48899c2b27a?source=rss-bf683e2808f2------2">Continue reading on Observability 101 »</a></p></div>]]></description>
            <link>https://medium.com/observability-101/distributed-tracing-in-kubernetes-using-opentelemetry-jaegar-a-step-by-step-guide-a48899c2b27a?source=rss-bf683e2808f2------2</link>
            <guid isPermaLink="false">https://medium.com/p/a48899c2b27a</guid>
            <category><![CDATA[observability]]></category>
            <category><![CDATA[opentelemetry]]></category>
            <category><![CDATA[distributed-tracing]]></category>
            <category><![CDATA[jaeger]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Vishal Gupta]]></dc:creator>
            <pubDate>Sat, 09 Nov 2024 16:40:40 GMT</pubDate>
            <atom:updated>2024-11-11T14:44:12.120Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Setting Up Harbor Registry on Kubernetes Using Helm Chart]]></title>
            <link>https://vishynit.medium.com/setting-up-harbor-registry-on-kubernetes-using-helm-chart-5989d7c8df2a?source=rss-bf683e2808f2------2</link>
            <guid isPermaLink="false">https://medium.com/p/5989d7c8df2a</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[helm]]></category>
            <category><![CDATA[harbor]]></category>
            <category><![CDATA[registry]]></category>
            <category><![CDATA[containers]]></category>
            <dc:creator><![CDATA[Vishal Gupta]]></dc:creator>
            <pubDate>Fri, 26 Jul 2024 17:20:48 GMT</pubDate>
            <atom:updated>2024-11-15T06:59:28.248Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R9ognrCgYdEuKnixyIXSHQ.png" /></figure><p>Harbor is an open-source container image registry that secures images with role-based access control, scans images for vulnerabilities, and signs images as trusted. Setting up Harbor on Kubernetes using Helm is a streamlined process that allows you to deploy a fully functional container registry quickly and efficiently. This guide walks you through the necessary steps to set up Harbor using a Helm chart.</p><h3>Prerequisites</h3><p>Before you start, ensure you have the following prerequisites:</p><ol><li><strong>Kubernetes Cluster</strong>: A running Kubernetes cluster (v1.12+).</li><li><strong>Helm</strong>: Helm 3 installed on your local machine.</li><li><strong>kubectl</strong>: kubectl installed and configured to interact with your Kubernetes cluster.</li></ol><h3>Step 1: Add the Harbor Helm Repository</h3><p>First, add the Harbor Helm repository to your Helm client:</p><pre>helm repo add harbor https://helm.goharbor.io<br>helm repo update</pre><h3>Step 2: Create a Namespace for Harbor</h3><p>Create a dedicated namespace for Harbor to keep things organized:</p><pre>kubectl create namespace harbor</pre><h3>Step 3: Install Harbor with Helm</h3><p>You can install Harbor with the default configuration using the following command:</p><pre>helm install harbor harbor/harbor --namespace harbor</pre><p>This will deploy Harbor with default settings. However, for production environments, you may want to customize the configuration.</p><h3>Step 4: Customize Harbor Configuration</h3><p>To customize Harbor’s settings, you need to have SSL certs and a custom configuration created in a values.yaml file. This file allows you to override default settings.</p><h4>Step 4a: Create SSL Certs</h4><p>Container registry needs to have TLS certificate signed by known certificate authority. Although self sign certificates can be used when deploying harbor but images push/pull will fail unless you trust CA. Free SSL certs signed by CA can be generated using LetsEncrypt certbot or from <a href="https://secure.ssl.com/">this portal</a>. Once you get the certificate and key, rename the cert to tls.crt and key to tls.key and store the certs content as a Secret.</p><pre>kubectl create secret tls harbor-cert --key tls.key --cert tls.crt -n harbor</pre><h4>Step 4b: Install Harbor using custom configuration</h4><p>Here is an example of a basic values.yaml file which uses the above secret create containing ssl cert. Make sure your Kubernetes service provider supports service type Load Balancer.</p><pre>expose:<br>  # Set how to expose the service. Set the type as &quot;ingress&quot;, &quot;clusterIP&quot;, &quot;nodePort&quot; or &quot;loadBalancer&quot;<br>  # and fill the information in the corresponding section<br>  type: loadBalancer<br>  tls:<br>    # Enable TLS or not.<br>    # Delete the &quot;ssl-redirect&quot; annotations in &quot;expose.ingress.annotations&quot; when TLS is disabled and &quot;expose.type&quot; is &quot;ingress&quot;<br>    # Note: if the &quot;expose.type&quot; is &quot;ingress&quot; and TLS is disabled,<br>    # the port must be included in the command when pulling/pushing images.<br>    # Refer to https://github.com/goharbor/harbor/issues/5291 for details.<br>    enabled: true<br>    # The source of the tls certificate. Set as &quot;auto&quot;, &quot;secret&quot;<br>    # or &quot;none&quot; and fill the information in the corresponding section<br>    # 1) auto: generate the tls certificate automatically<br>    # 2) secret: read the tls certificate from the specified secret.<br>    # The tls certificate can be generated manually or by cert manager<br>    # 3) none: configure no tls certificate for the ingress. If the default<br>    # tls certificate is configured in the ingress controller, choose this option<br>    certSource: secret<br>    auto:<br>      # The common name used to generate the certificate, it&#39;s necessary<br>      # when the type isn&#39;t &quot;ingress&quot;<br>      commonName: &quot;&quot;<br>    secret:<br>      # The name of secret which contains keys named:<br>      # &quot;tls.crt&quot; - the certificate<br>      # &quot;tls.key&quot; - the private key<br>      secretName: &quot;harbor-cert&quot;<br>      notarySecretName: &quot;harbor-cert&quot;<br>  ingress:<br>    hosts:<br>      core: harbor.mydomain.com<br>      notary: harbor.mydomain.com<br><br># The external URL for Harbor core service. It is used to<br># 1) populate the docker/helm commands showed on portal<br># 2) populate the token service URL returned to docker client<br>#<br># Format: protocol://domain[:port]. Usually:<br># 1) if &quot;expose.type&quot; is &quot;ingress&quot;, the &quot;domain&quot; should be<br># the value of &quot;expose.ingress.hosts.core&quot;<br># 2) if &quot;expose.type&quot; is &quot;clusterIP&quot;, the &quot;domain&quot; should be<br># the value of &quot;expose.clusterIP.name&quot;<br># 3) if &quot;expose.type&quot; is &quot;nodePort&quot;, the &quot;domain&quot; should be<br># the IP address of k8s node<br>#<br># If Harbor is deployed behind the proxy, set it as the URL of proxy<br>externalURL: https://harbor.mydomain.com<br><br># The initial password of Harbor admin. Change it from portal after launching Harbor<br># or give an existing secret for it<br># key in secret is given via (default to HARBOR_ADMIN_PASSWORD)<br># existingSecretAdminPassword:<br>existingSecretAdminPasswordKey: HARBOR_ADMIN_PASSWORD<br>harborAdminPassword: &quot;Harbor@12345&quot;</pre><h3>Step 5: Deploy Harbor with Custom Values</h3><p>Use your custom values.yaml file to deploy Harbor:</p><pre>helm install harbor harbor/harbor --namespace harbor -f values.yaml</pre><h3>Step 6: Verify the Installation</h3><p>Check the status of your Harbor deployment:</p><pre>helm status harbor -n harbor</pre><p>Ensure all Harbor components are running:</p><pre>kubectl get pods -n harbor</pre><h3>Step 7: Access Harbor</h3><p>If you’ve configured Harbor to use an ingress, you can access it via the URL specified in your values.yaml file (e.g., https://harbor.mydomain.com). Ensure your DNS settings are configured to point to your Kubernetes load balancer IP.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1006/1*0rfo0u-kzKRwGYAjiHYYjw.png" /></figure><h3>End Note</h3><p>Above configuration is a very basic configuration. For a production grade setup, make sure that you setup external Database and external Redis setup created and used with Harbor.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5989d7c8df2a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[High Availability Setup with CNPG PostgreSQL Operator]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://vishynit.medium.com/high-availability-setup-with-cnpg-postgresql-operator-8a0b39958fbb?source=rss-bf683e2808f2------2"><img src="https://cdn-images-1.medium.com/max/1566/1*Q_u318ulfvUWW_7ehl8U4g.jpeg" width="1566"></a></p><p class="medium-feed-snippet">High Availability (HA) is a critical requirement for databases in modern production environments. PostgreSQL, a robust and versatile&#x2026;</p><p class="medium-feed-link"><a href="https://vishynit.medium.com/high-availability-setup-with-cnpg-postgresql-operator-8a0b39958fbb?source=rss-bf683e2808f2------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://vishynit.medium.com/high-availability-setup-with-cnpg-postgresql-operator-8a0b39958fbb?source=rss-bf683e2808f2------2</link>
            <guid isPermaLink="false">https://medium.com/p/8a0b39958fbb</guid>
            <category><![CDATA[high-availability]]></category>
            <category><![CDATA[cnpg]]></category>
            <category><![CDATA[postgres]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Vishal Gupta]]></dc:creator>
            <pubDate>Sun, 21 Jul 2024 08:00:23 GMT</pubDate>
            <atom:updated>2024-08-27T11:01:54.546Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Monitoring PostgreSQL using PostgreSQL Exporter on Kubernetes]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/observability-101/monitoring-postgresql-using-postgresql-exporter-on-kubernetes-34503795ac5b?source=rss-bf683e2808f2------2"><img src="https://cdn-images-1.medium.com/max/717/1*_zNuoWUyRlhKmRe5VvwcjQ.png" width="717"></a></p><p class="medium-feed-snippet">In modern applications, monitoring databases is crucial to ensure their performance, availability, and reliability. PostgreSQL is a widely&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/observability-101/monitoring-postgresql-using-postgresql-exporter-on-kubernetes-34503795ac5b?source=rss-bf683e2808f2------2">Continue reading on Observability 101 »</a></p></div>]]></description>
            <link>https://medium.com/observability-101/monitoring-postgresql-using-postgresql-exporter-on-kubernetes-34503795ac5b?source=rss-bf683e2808f2------2</link>
            <guid isPermaLink="false">https://medium.com/p/34503795ac5b</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[postgresql]]></category>
            <category><![CDATA[postgres]]></category>
            <category><![CDATA[helm]]></category>
            <dc:creator><![CDATA[Vishal Gupta]]></dc:creator>
            <pubDate>Sun, 21 Jul 2024 07:40:34 GMT</pubDate>
            <atom:updated>2024-08-27T11:02:20.244Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Installing Grafana on Kubernetes — Observability 101]]></title>
            <link>https://medium.com/observability-101/unleashing-data-insights-installing-grafana-on-kubernetes-dc8de7872e2d?source=rss-bf683e2808f2------2</link>
            <guid isPermaLink="false">https://medium.com/p/dc8de7872e2d</guid>
            <category><![CDATA[helm]]></category>
            <category><![CDATA[grafana]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Vishal Gupta]]></dc:creator>
            <pubDate>Fri, 02 Feb 2024 05:00:18 GMT</pubDate>
            <atom:updated>2024-10-03T17:38:51.732Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KFyfkPGYkxTVAo57KwccHw.jpeg" /></figure><h3>Introduction</h3><p>In the dynamic landscape of data visualization and monitoring, Grafana has emerged as a powerhouse for creating interactive and insightful dashboards. Kubernetes, the leading container orchestration platform, offers unparalleled scalability and flexibility. Combining the two can unlock a world of possibilities for monitoring and visualizing your applications. In this article, we’ll take a unique approach to installing Grafana on Kubernetes, ensuring a seamless integration that goes beyond the typical setup.</p><p>Prerequisites</p><p>Before diving into the installation process, make sure you have the following prerequisites in place:</p><ol><li>A running Kubernetes cluster: Ensure that you have a Kubernetes cluster up and running, whether it’s a local development environment or a production-grade setup.</li><li>Helm installed: Helm is a package manager for Kubernetes that simplifies the deployment of applications. Install Helm on your local machine and configure it to work with your Kubernetes cluster.</li><li>kubectl: The Kubernetes command-line tool, kubectl, is essential for managing your cluster. Make sure it’s installed and configured to communicate with your cluster.</li></ol><p>Installation Steps</p><h4>Step 1: Create a Namespace</h4><p>To keep your Grafana installation organized, create a dedicated namespace. This step ensures that all Grafana components are isolated within this namespace.</p><pre>kubectl create namespace grafana</pre><p>🌐 <strong>Namespace created successfully!</strong></p><h4>Step 2: Configure Helm Repository</h4><p>Add the Grafana Helm repository to your Helm client to access the necessary charts for installation.</p><pre>helm repo add grafana https://grafana.github.io/helm-charts<br>helm repo update</pre><p>🚀 <strong>Helm repository configured and updated. Ready to set sail!</strong></p><h4>Step 3: Customize Grafana Values</h4><p>Create a custom <em>values.yaml</em> file to tailor the Grafana installation according to your requirements. This step allows you to specify parameters such as persistence, service type, and admin password.</p><pre># Example values.yaml<br>adminPassword: &quot;your_secure_password&quot;<br>service:<br>  type: LoadBalancer<br>persistence:<br>  enabled: true</pre><p>LoadBalancer will assign a public IP and is dependent if it is supported by your K8s Cluster provider. You can also use ServiceIP but that will not be available externally. In this case, you can use Port forwarding to access Grafana on your local machine.</p><p>🧰 <strong>Customization complete! Your Grafana, your rules.</strong></p><h4>Step 4: Install Grafana with Helm</h4><p>Deploy Grafana to your Kubernetes cluster using Helm, referencing the custom values.yaml file.</p><pre>helm install grafana grafana/grafana -n grafana -f values.yaml</pre><p>🚀 <strong>Grafana is launching into your Kubernetes galaxy!</strong></p><h4>Step 5: Access Grafana Dashboard</h4><p>Retrieve the external IP address or domain associated with the Grafana service.</p><pre>kubectl get svc -n grafana</pre><p>Access the Grafana dashboard using the obtained IP or domain, and log in with the provided admin credentials.</p><p>🌐 <strong>Found the gateway to your data universe!</strong></p><h4>Step 6: Install Data Sources and Dashboards</h4><p>Enhance Grafana’s capabilities by adding data sources and dashboards. Connect Grafana to your preferred data sources, such as Prometheus or InfluxDB, and import relevant dashboards for comprehensive monitoring.</p><p>📊 <strong>Unleash the power of visualization! Connect, import, and visualize.</strong></p><h3>Conclusion</h3><p>By following this approach to installing Grafana on Kubernetes, you’ve not only set up a powerful monitoring solution but also tailored it to your specific needs. The combination of Grafana’s visualization prowess and Kubernetes’ orchestration capabilities opens the door to a new realm of insights and analytics for your applications. Experiment with different configurations, explore Grafana plugins, and make the most of this dynamic duo to propel your data visualization and monitoring efforts to new heights 🚀📈</p><h3>Loved this?</h3><p><strong>So, did you find this article helpful?</strong> If you did, please consider buying me a coffee :-)</p><p><a href="https://buymeacoffee.com/vishynit">https://buymeacoffee.com/vishynit</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dc8de7872e2d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/observability-101/unleashing-data-insights-installing-grafana-on-kubernetes-dc8de7872e2d">Installing Grafana on Kubernetes — Observability 101</a> was originally published in <a href="https://medium.com/observability-101">Observability 101</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Simplifying Log Shipping in Kubernetes with Promtail, Loki, and Grafana]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/observability-101/simplifying-log-shipping-in-kubernetes-with-promtail-loki-and-grafana-8571ad5724e5?source=rss-bf683e2808f2------2"><img src="https://cdn-images-1.medium.com/max/2134/1*fsq63nFowu7llDTsSt52nA.jpeg" width="2134"></a></p><p class="medium-feed-snippet">Introduction</p><p class="medium-feed-link"><a href="https://medium.com/observability-101/simplifying-log-shipping-in-kubernetes-with-promtail-loki-and-grafana-8571ad5724e5?source=rss-bf683e2808f2------2">Continue reading on Observability 101 »</a></p></div>]]></description>
            <link>https://medium.com/observability-101/simplifying-log-shipping-in-kubernetes-with-promtail-loki-and-grafana-8571ad5724e5?source=rss-bf683e2808f2------2</link>
            <guid isPermaLink="false">https://medium.com/p/8571ad5724e5</guid>
            <category><![CDATA[loki]]></category>
            <category><![CDATA[promtail]]></category>
            <category><![CDATA[grafana]]></category>
            <category><![CDATA[logs]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Vishal Gupta]]></dc:creator>
            <pubDate>Fri, 02 Feb 2024 04:30:20 GMT</pubDate>
            <atom:updated>2024-08-27T11:03:07.712Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Understanding Mutual SSL Authentication]]></title>
            <link>https://vishynit.medium.com/understanding-mutual-ssl-authentication-85efb2b050f4?source=rss-bf683e2808f2------2</link>
            <guid isPermaLink="false">https://medium.com/p/85efb2b050f4</guid>
            <category><![CDATA[mtls-authentication]]></category>
            <category><![CDATA[kubernetes-ingress]]></category>
            <category><![CDATA[mutual-authentication]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Vishal Gupta]]></dc:creator>
            <pubDate>Sun, 28 Jan 2024 09:03:00 GMT</pubDate>
            <atom:updated>2024-08-27T11:03:19.242Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d-SQOTXrASBx0Iiw5kBNmw.jpeg" /></figure><p>Mutual authentication, also known as 2-way authentication, involves a bilateral verification process where both the client and server authenticate each other using digital certificates issued by a Certificate Authority. As defined by CodeProject.com, mutual SSL authentication ensures that both parties verify the provided digital certificate, establishing mutual trust in each other’s identity.</p><h4>Mutual Authentication Flow</h4><p>This tutorial utilizes the curl client and NGINX server to demonstrate the mutual authentication flow. Before diving into the setup, it’s crucial to configure the Ingress-Nginx controller on your Kubernetes cluster. Ensure compatibility with Minikube version 0.30 and Ingress-Nginx version 0.19, or refer to the Ingress-Nginx deployment documentation for alternative setups.</p><h4>Setting Up Mutual Authentication</h4><p>To implement mutual authentication, follow these essential steps:</p><ol><li><strong>Creating Certificates</strong></li></ol><p>Generate self-signed certificates (for testing purposes only) using OpenSSL. Key terms include CommonName (CN), Certificate Authority (CA), Server Certificate, and Client Certificate. These certificates establish secure communication between the client and server.</p><pre>$ openssl req -x509 -sha256 -newkey rsa:4096 -keyout ca.key -out ca.crt -days 356 -nodes -subj &#39;/CN=Fern Cert Authority&#39;<br>$ openssl req -new -newkey rsa:4096 -keyout server.key -out server.csr -nodes -subj &#39;/CN=meow.com&#39;<br>$ openssl x509 -req -sha256 -days 365 -in server.csr -CA ca.crt -CAkey ca.key -set_serial 01 -out server.crt<br>$ openssl req -new -newkey rsa:4096 -keyout client.key -out client.csr -nodes -subj &#39;/CN=Fern&#39;<br>$ openssl x509 -req -sha256 -days 365 -in client.csr -CA ca.crt -CAkey ca.key -set_serial 02 -out client.crt</pre><p><strong>2. Creating Kubernetes Secrets</strong></p><p>Store the generated certificates in a Kubernetes Secret, simplifying their usage in the Ingress-Nginx controller. For simplicity, the example combines the Server Certificate and CA Certificate into one Secret named “my-certs.”</p><pre>$ kubectl create secret generic my-certs --from-file=tls.crt=server.crt --from-file=tls.key=server.key --from-file=ca.crt=ca.crt<br>$ kubectl get secret my-certs</pre><p><strong>3. Deploying an Application with Mutual Authentication</strong></p><p>Deploy pods using deployments, expose them using services, and set up Ingress rules to access the service securely via HTTPS.</p><pre>#deployment.yaml content<br>apiVersion: extensions/v1beta1<br>kind: Deployment<br>metadata:<br>  name: meow<br>spec:<br>  replicas: 2<br>  selector:<br>    matchLabels:<br>      app: meow<br>  template:<br>    metadata:<br>      labels:<br>        app: meow<br>    spec:<br>      containers:<br>      - name: meow<br>        image: gcr.io/kubernetes-e2e-test-images/echoserver:2.1<br>        ports:<br>        - containerPort: 8080<br><br>#service.yaml content<br>apiVersion: v1<br>kind: Service<br>metadata:<br>  name: meow-svc<br>spec:<br>  ports:<br>  - port: 80<br>    targetPort: 8080<br>    protocol: TCP<br>    name: http<br>  selector:<br>    app: meow<br><br>#ingress.yaml content<br>apiVersion: extensions/v1beta1<br>kind: Ingress<br>metadata:<br>  annotations:<br>    nginx.ingress.kubernetes.io/auth-tls-verify-client: &quot;on&quot;<br>    nginx.ingress.kubernetes.io/auth-tls-secret: &quot;default/my-certs&quot;<br>  name: meow-ingress<br>  namespace: default<br>spec:<br>  rules:<br>  - host: meow.com<br>    http:<br>      paths:<br>      - backend:<br>          serviceName: meow-svc<br>          servicePort: 80<br>        path: /<br>  tls:<br>  - hosts:<br>    - meow.com<br>    secretName: my-certs</pre><pre># Deployment<br>$ kubectl apply -f deployment.yaml<br><br># Service<br>$ kubectl apply -f service.yaml<br><br># Ingress Rules<br>$ kubectl apply -f ingress.yaml<br>$ sudo -- sh -c &quot;echo $(minikube ip) meow.com &gt;&gt; /etc/hosts&quot;</pre><p><strong>4. Testing the Configuration</strong></p><p>Verify the mutual authentication setup by testing requests with and without the client certificate and key.</p><pre># Without Client Certificate and Key (Expect 400 Bad Request)<br>$ curl https://meow.com/ -k<br><br># With Client Certificate and Key (Expect successful redirection)<br>$ curl https://meow.com/ --cert client.crt --key client.key -k</pre><h4>Additional Settings and Troubleshooting</h4><p>Explore additional settings such as client certificate verification depth, error page redirection, and passing certificates to the upstream server. For troubleshooting, check NGINX configuration and logs.</p><pre># Check NGINX Configuration<br>$ kubectl exec -it -n kube-system nginx-ingress-controller-&lt;pod_id&gt; cat /etc/nginx/nginx.conf | grep ssl_client_certificate -A 1<br><br># Check NGINX Controller Logs<br>$ kubectl logs -n kube-system nginx-ingress-controller-&lt;pod_id&gt;</pre><blockquote><strong>If you found this content helpful or informative, consider giving it a thumbs up or expressing your appreciation! I’m here to assist and provide valuable information. Feel free to ask if you have any more questions or if there’s anything else I can help you with. Happy coding! 👍🚀</strong></blockquote><h3>Loved this?</h3><p><strong>So, did you find this article helpful?</strong> If you did, please consider buying me a coffee :-)</p><p><a href="https://buymeacoffee.com/vishynit">https://buymeacoffee.com/vishynit</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=85efb2b050f4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>