<?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 Nasrullah Pandu Dewantara on Medium]]></title>
        <description><![CDATA[Stories by Nasrullah Pandu Dewantara on Medium]]></description>
        <link>https://medium.com/@nasrullahpandu?source=rss-13924de28996------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ZblSw-fkMUlNMY85LjPaBw.jpeg</url>
            <title>Stories by Nasrullah Pandu Dewantara on Medium</title>
            <link>https://medium.com/@nasrullahpandu?source=rss-13924de28996------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 07:30:18 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nasrullahpandu/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[Compliance as Code Meets Developer Portals: Kyverno + Backstage]]></title>
            <link>https://medium.com/@nasrullahpandu/compliance-as-code-meets-developer-portals-kyverno-backstage-012d6ec126d0?source=rss-13924de28996------2</link>
            <guid isPermaLink="false">https://medium.com/p/012d6ec126d0</guid>
            <category><![CDATA[internal-developer-portal]]></category>
            <category><![CDATA[backstage]]></category>
            <category><![CDATA[kyverno]]></category>
            <category><![CDATA[container-security]]></category>
            <dc:creator><![CDATA[Nasrullah Pandu Dewantara]]></dc:creator>
            <pubDate>Thu, 16 Jul 2026 10:00:55 GMT</pubDate>
            <atom:updated>2026-07-16T10:00:55.438Z</atom:updated>
            <content:encoded><![CDATA[<h3>Overview</h3><p>This project is a Proof of Concept (PoC) that integrates Kyverno, a Kubernetes-native policy engine with Backstage, an open-source developer portal. The goal is to surface Kubernetes compliance status directly inside the developer portal, so engineers can see whether their services are meeting security policies without ever touching kubectl.</p><p>The PoC runs entirely on a local Kubernetes cluster (k3d) and demonstrates a real-world scenario where some workloads are compliant and others are not, with the results visible in Backstage via a custom Kyverno plugin.</p><p>In most organizations, Kubernetes security policies are enforced by platform or security teams, but the results are invisible to developers. This creates several friction points:</p><ul><li>Developers don’t know their workloads are violating policies until something breaks or they get a ticket</li><li>Security teams have to manually chase down violations across namespaces</li><li>There is no single place where a developer can see “is my service compliant?”</li><li>Policy violations are buried in Kubernetes CRDs (PolicyReport) that require kubectl access to read</li></ul><p>The gap between policy enforcement and developer awareness leads to slow remediation cycles and repeated violations.</p><h3>Goals</h3><ul><li>Deploy Kyverno on a local Kubernetes cluster with real security policies</li><li>Generate PolicyReport resources automatically via Kyverno&#39;s background scanning</li><li>Build a custom Backstage plugin that reads PolicyReport data from the Kubernetes API</li><li>Display compliance status per service/namespace inside the Backstage developer portal</li><li>Demonstrate the contrast between a compliant workload and a violating workload</li></ul><h3>Benefits</h3><p><strong>For Developers</strong></p><ul><li>See compliance status of their services directly in the developer portal — no kubectl required</li><li>Understand exactly which policy is failing and why, with human-readable messages</li><li>Faster feedback loop: know about violations before they become incidents</li></ul><p><strong>For Platform / Security Teams</strong></p><ul><li>Policies are defined as code (GitOps-friendly YAML)</li><li>Violations are automatically tracked via PolicyReport CRDs</li><li>Backstage becomes the single pane of glass for compliance visibility</li><li>Reduces manual audit effort and back-and-forth with development teams</li></ul><p><strong>For the Organization</strong></p><ul><li>Shift-left security: compliance is visible at the developer level, not just at the ops level</li><li>Audit trail via Kyverno PolicyReports</li><li>Scalable — adding new policies automatically surfaces in the portal</li></ul><h3>Architecture</h3><pre>┌─────────────────────────────────────────────────────────┐<br>│                    Developer Browser                     │<br>└──────────────────────────┬──────────────────────────────┘<br>                           │ http://localhost:3000<br>┌──────────────────────────▼──────────────────────────────┐<br>│              Backstage (Docker Compose)                  │<br>│                                                          │<br>│  Frontend (React)                                        │<br>│  ┌─────────────────────────────────────────────────┐    │<br>│  │  Catalog Page  │  Kyverno Plugin Tab             │    │<br>│  │  - Components  │  - Policy List                  │    │<br>│  │  - Services    │  - Compliance Score             │    │<br>│  │                │  - Violation Details            │    │<br>│  └─────────────────────────────────────────────────┘    │<br>│                                                          │<br>│  Backend (Node.js) :7007                                 │<br>│  ┌─────────────────────────────────────────────────┐    │<br>│  │  Kyverno Backend Plugin                         │    │<br>│  │  - /api/kyverno/policies                        │    │<br>│  │  - /api/kyverno/policyreports/:namespace        │    │<br>│  │  - /api/kyverno/clusterpolicyreports            │    │<br>│  └────────────────────┬────────────────────────────┘    │<br>└───────────────────────┼─────────────────────────────────┘<br>                        │ kubeconfig (mounted volume)<br>                        │ Kubernetes API :6443<br>┌───────────────────────▼─────────────────────────────────┐<br>│                  k3d Cluster (sandbox)                   │<br>│                                                          │<br>│  ┌─────────────────────┐   ┌──────────────────────────┐ │<br>│  │  Kyverno Engine     │   │  ClusterPolicy           │ │<br>│  │  (kyverno namespace)│──▶│  - disallow-privileged   │ │<br>│  └─────────────────────┘   │  - require-non-root      │ │<br>│                            │  - disallow-latest-tag   │ │<br>│                            └──────────────────────────┘ │<br>│                                                          │<br>│  ┌──────────────────────────────────────────────────┐   │<br>│  │  PolicyReport (per namespace)                    │   │<br>│  └──────────────────────────────────────────────────┘   │<br>│                                                          │<br>│  namespace: demo-compliant    namespace: demo-violation  │<br>│  ┌──────────────────────┐    ┌───────────────────────┐  │<br>│  │  app-good            │    │  app-bad              │  │<br>│  │  - non-root ✓        │    │  - privileged ✗       │  │<br>│  │  - no latest tag ✓   │    │  - runs as root ✗     │  │<br>│  │  - not privileged ✓  │    │  - latest tag ✗       │  │<br>│  └──────────────────────┘    └───────────────────────┘  │<br>└─────────────────────────────────────────────────────────┘</pre><h3>Kyverno Components</h3><p><strong>PolicyReport</strong> — A Kubernetes CRD created by Kyverno per namespace that records the pass/fail result of each policy against each resource. This is the primary data source for the Backstage plugin.</p><p><strong>ClusterPolicyReport</strong> — Same as PolicyReport but cluster-scoped, for cluster-level resources.</p><p><strong>Audit mode</strong> — Kyverno validates resources and records results in PolicyReports without blocking deployments. Used in this PoC so violating workloads can still be deployed and shown in Backstage.</p><p><strong>Enforce mode</strong> — Kyverno blocks non-compliant resources at admission time. Recommended for production.</p><p><strong>Policy Reporter</strong> — An open-source UI that reads Kyverno PolicyReport and ClusterPolicyReport CRDs and presents them in a human-readable dashboard. In this PoC, Policy Reporter is integrated into Backstage, allowing teams to see policy name, compliance status (pass/fail), and severity level per workload — all without direct Kubernetes access.</p><h3>Policies</h3><h4>1. Disallow Privileged Containers</h4><p>Privileged containers have access to all Linux kernel capabilities and host devices. This policy ensures no container runs with privileged: true across all workload types (containers, initContainers, ephemeralContainers).</p><p>Excluded namespaces: kube-system, kyverno, policy-reporter, falco</p><h4>2. Require runAsNonRoot</h4><p>Running containers as root is a security risk. This policy requires either the pod-level or container-level securityContext to have runAsNonRoot: true.</p><p>Excluded namespaces: kube-system, kyverno, policy-reporter, falco</p><h4>3. Block Latest Image Tag</h4><p>Using the latest tag makes deployments unpredictable and non-reproducible. This policy blocks any container image that uses the :latest tag.</p><p>Excluded namespaces: kube-system, kyverno, policy-reporter, falco</p><h3>Result</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xeu7r-yIjM24akD3wIzPeQ.png" /></figure><p>One of the key advantages of this integration is how it simplifies the audit process. Instead of running kubectl get policyreport -A and parsing raw YAML, auditors and security teams can open Backstage and immediately see:</p><ul><li><strong>Policy name</strong> — which specific rule is being evaluated (e.g. disallow-privileged-containers, require-run-as-non-root)</li><li><strong>Status</strong> — whether the workload passes or fails each policy</li><li><strong>Severity</strong> — the risk level of each violation (High, Medium, Low)</li></ul><p>This makes compliance reviews faster and accessible to non-Kubernetes users. A security auditor does not need cluster access or kubectl knowledge — the information is already surfaced in the developer portal.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=012d6ec126d0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Three Ways of DevOps: Flow, Feedback, and Continuous Learning]]></title>
            <link>https://medium.com/@nasrullahpandu/the-three-ways-of-devops-flow-feedback-and-continuous-learning-19b7e38d3bbb?source=rss-13924de28996------2</link>
            <guid isPermaLink="false">https://medium.com/p/19b7e38d3bbb</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[devsecops]]></category>
            <dc:creator><![CDATA[Nasrullah Pandu Dewantara]]></dc:creator>
            <pubDate>Wed, 08 Jul 2026 16:35:11 GMT</pubDate>
            <atom:updated>2026-07-08T16:43:13.594Z</atom:updated>
            <content:encoded><![CDATA[<p>DevOps is often misunderstood as a set of tools, a job title, or a team responsible for CI/CD pipelines, cloud infrastructure, and Kubernetes. In reality, DevOps is much broader than that. DevOps is a culture and a way of working that brings development, operations, security, and other teams together to deliver value more quickly, safely, and consistently.</p><p>An organization can use modern tools such as Terraform, Jenkins, GitLab CI, Kubernetes, and Prometheus, yet still struggle with slow releases, long approval processes, recurring incidents, fragmented ownership, and teams blaming one another when something goes wrong. Having DevOps tools does not automatically mean an organization is practicing DevOps.</p><p>True DevOps begins when teams stop optimizing only their individual responsibilities and start viewing software delivery as one interconnected system. Developers care about how applications run in production. Operations teams help make delivery safer and easier. Security and quality are integrated throughout the process rather than added at the end. Most importantly, everyone shares responsibility for the outcome delivered to the customer.</p><p>This is where The Three Ways of DevOps become important. Introduced in <em>The Phoenix Project</em> and further explained in <em>The DevOps Handbook</em>, the framework describes three fundamental principles:</p><ol><li>The First Way: Principles of Flow</li><li>The Second Way: Principles of Feedback</li><li>The Third Way: Principles of Continuous Learning</li></ol><p>These principles explain how organizations can improve the flow of work, build faster feedback loops, and create a culture that continuously learns and improves.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yJCTTAU7r17lbv618JZN7w.png" /></figure><h3>The First Way: Principles of Flow</h3><p>The First Way focuses on accelerating the flow of work from the initial business idea until value is delivered to the customer. Gene Kim also refers to the First Way as Systems Thinking. Both terms describe the same core idea: software delivery should be viewed as one continuous system rather than a collection of isolated teams.</p><p>Typical software delivery flow may look like this:</p><pre>Business Idea<br>      ↓<br>Development<br>      ↓<br>Testing<br>      ↓<br>Security<br>      ↓<br>Operations<br>      ↓<br>Customer</pre><p>The goal is not to make one individual team work faster. The goal is to improve the performance of the entire system. For example, increasing development speed provides little value when testing, security review, or deployment remains a bottleneck.</p><p>The First Way encourages teams to remove silos and continuously optimize how work moves from left to right.</p><h4>Make Work Visible</h4><p>Unlike a manufacturing process, where physical products can be observed moving across a factory floor, software development work is often invisible.<br>A task may be waiting for:</p><ul><li>Code review</li><li>Testing</li><li>Security approval</li><li>Environment provisioning</li><li>Deployment approval</li><li>Another team to take action</li></ul><p>Because these waiting periods are not always visible, teams may struggle to identify where work is being delayed.<br>Tools such as Kanban boards help visualize the movement of work through each development phase.</p><pre>Backlog → Development → Review → Testing → Deployment → Done</pre><p>Making work visible allows teams to identify bottlenecks, blocked tasks, and overloaded stages in the delivery process.</p><h4><strong>Limit Work in Progress</strong></h4><p>Starting more work does not always mean completing more work. When teams handle too many tasks simultaneously, they experience more multitasking and context switching. Developers may continuously move between features, incidents, meetings, and operational requests without completing any of them quickly.</p><p>Limiting work in progress helps teams focus on completing existing tasks before starting new ones.</p><p>Instead of having ten partially completed features, it is often better to have two features completed and delivered to customers.</p><h4><strong>Reduce Batch Sizes</strong></h4><p>Large releases introduce greater risk because they contain more changes, take longer to test, and are more difficult to troubleshoot.</p><p>The First Way encourages teams to divide work into smaller batches.</p><p>For example, instead of releasing one large feature after several months, teams can deliver smaller improvements through short iterations.</p><p>Smaller batch sizes provide several benefits:</p><ul><li>Features reach customers faster</li><li>Problems are identified earlier</li><li>Changes are easier to review</li><li>Rollbacks are less complicated</li><li>Deployment risks are reduced</li></ul><p>This principle is commonly applied through small pull requests, short development iterations, and frequent deployments.</p><h4><strong>Reduce Hand-Offs Between Teams</strong></h4><p>Every hand-off creates the possibility of lost information, misunderstanding, and delay. A traditional delivery process may involve development handing work to testing, testing handing it to security, and security handing it to operations.</p><p>This often creates a “throw it over the wall” mentality, where each team focuses only on completing its own responsibilities. Although hand-offs cannot always be completely eliminated, their impact can be reduced through close communication and shared responsibility.</p><p>Development, security, and operations teams should collaborate throughout the delivery process rather than only interacting during formal hand-offs. The goal is to make hand-offs feel like a natural continuation of the work instead of a major event.</p><h4><strong>Identify and Remove Constraints and Waste</strong></h4><p>A constraint is anything that limits the performance of the overall delivery system.</p><p>Common constraints may include:</p><ul><li>Limited testing environments</li><li>Slow environment provisioning</li><li>Manual approval processes</li><li>Complex deployment procedures</li><li>Tightly coupled architecture</li><li>Long security review cycles</li></ul><p>Waste refers to activities that consume time without directly delivering customer value.</p><p>Examples include:</p><ul><li>Repetitive manual work</li><li>Unnecessary waiting</li><li>Excessive meetings</li><li>Rework caused by unclear requirements</li><li>Context switching</li><li>Dependence on individual “heroes”</li></ul><p>The First Way encourages organizations to continuously identify these constraints and remove them through process improvement, automation, and better collaboration.</p><h3>The Second Way: Principles of Feedback</h3><p>Moving quickly is not enough. A team can deliver software rapidly, but without effective feedback, it may also introduce failures rapidly.</p><p>The Second Way focuses on creating fast and continuous feedback loops throughout the development life cycle.</p><p>While the First Way moves work from development toward the customer, the Second Way ensures that information moves back from production, operations, security, testing, and customers toward the people who can improve the system.</p><pre>Development<br>      ↓<br>Testing<br>      ↓<br>Deployment<br>      ↓<br>Production<br>      ↓<br>Monitoring and Customer Feedback<br>      ↓<br>Development</pre><p>The shorter the feedback loop, the faster a team can detect and correct problems.</p><h4>Swarm and Solve Problems to Build Knowledge</h4><p>When a problem occurs, teams should work together to understand and resolve it instead of passing it from one team to another.</p><p>This is sometimes called swarming. For example, when a deployment causes production errors, developers, operations engineers, security engineers, and other relevant teams may collaborate immediately.</p><p>The objective is not only to restore the service but also to build shared knowledge about:</p><ul><li>What happened</li><li>Why it happened</li><li>How it was detected</li><li>How it was resolved</li><li>How the system can be improved</li></ul><p>This supports a “fail fast” approach, where problems are discovered and addressed as early as possible. Failing fast does not mean accepting careless failure. It means designing processes that expose problems quickly, while they are still easier and less expensive to fix.</p><h4>Push Quality Closer to the Source</h4><p>Quality should not be inspected only at the end of the development process. When defects, security vulnerabilities, or configuration problems are discovered late, remediation becomes more difficult and expensive.</p><p>The Second Way encourages teams to move quality controls closer to where the work begins.</p><p>Examples include:</p><ul><li>Running automated tests during development</li><li>Scanning dependencies in CI pipelines</li><li>Validating infrastructure code before deployment</li><li>Performing security checks during pull requests</li><li>Using policy enforcement before resources reach production</li></ul><p>This principle is central to DevSecOps. Security is treated as part of the development process rather than as a final approval step before production.</p><pre>Code Change<br>    ↓<br>Automated Test<br>    ↓<br>Security Scan<br>    ↓<br>Configuration Validation<br>    ↓<br>Deployment</pre><p>Early feedback helps developers correct issues while they still understand the context of the change.</p><h4>Optimize for Downstream Work Centers</h4><p>Each team should consider how its work affects the teams that receive it later. Developers should not consider their work complete simply because the code works on their local machines. They should also consider whether the application is testable, secure, observable, deployable, and operable.</p><p>Likewise, operations teams should provide platforms and processes that make it easier for developers to deploy and operate applications safely.</p><p>This principle works against the “throw it over the wall” mentality. Instead of optimizing only for local team performance, teams should optimize for the success of the entire delivery system.</p><p>For example, development teams can help downstream operations teams by providing:</p><ul><li>Health-check endpoints</li><li>Meaningful application logs</li><li>Metrics and dashboards</li><li>Clear deployment documentation</li><li>Safe rollback mechanisms</li><li>Predictable configuration management</li></ul><p>The result is shared ownership of software from development through production.</p><h3>The Third Way: Principles of Continuous Learning</h3><p>The Third Way focuses on creating a culture of continuous learning, experimentation, and improvement.</p><p>Software systems are complex, and not every failure can be predicted. Organizations therefore need the ability to learn quickly and improve continuously.</p><p>The objective is not to create a system where mistakes never happen. The objective is to create a system where mistakes produce knowledge and lead to measurable improvements.</p><h4>Enable Organizational Learning and a Safety Culture</h4><p>People are unlikely to report problems, admit mistakes, or propose experiments when they fear punishment. A learning organization needs psychological safety. Organization must create an environment where employees can:</p><ul><li>Raise concerns</li><li>Share failures</li><li>Ask questions</li><li>Challenge existing processes</li><li>Experiment with new approaches</li><li>Learn from mistakes</li></ul><p>A safety culture does not mean removing accountability. It means examining why the system allowed a failure to happen instead of stopping the investigation after identifying the person involved.</p><p>For example, when an engineer accidentally deploys an incorrect configuration, the organization should not only ask:</p><blockquote><em>Who made the mistake?</em></blockquote><p>It should also ask:</p><ul><li>Why was the configuration not automatically validated?</li><li>Why could one mistake reach production?</li><li>Why was the problem not detected earlier?</li><li>Why was recovery difficult?</li><li>What safeguards should be added?</li></ul><p>This shifts the focus from individual blame toward system improvement.</p><h4>Institutionalize Continuous Improvement in Daily Work</h4><p>Improvement should not be treated as a separate annual initiative. It should become part of everyday work. Teams should regularly examine how they develop, test, deploy, operate, and recover software.</p><p>Daily improvement may include:</p><ul><li>Automating a repetitive task</li><li>Improving a deployment pipeline</li><li>Updating a runbook</li><li>Reducing alert noise</li><li>Adding automated validation</li><li>Improving system documentation</li><li>Removing an unnecessary approval</li><li>Refining incident response procedures</li></ul><p>Small improvements made continuously can produce significant long-term results. Without dedicated improvement, operational problems tend to accumulate.</p><p>Teams become busy responding to incidents and manual requests, leaving less time to address the causes of those problems.</p><h4>Transform Local Discoveries into Global Improvements</h4><p>A solution discovered by one team should not remain isolated within that team.</p><p>Organizations should create mechanisms for sharing knowledge across the company. For example, when one team develops a safer deployment strategy, the pattern can be shared with other teams through:</p><ul><li>Reusable CI/CD templates</li><li>Shared infrastructure modules</li><li>Internal documentation</li><li>Engineering communities</li><li>Platform capabilities</li><li>Architecture guidelines</li><li>Internal technical talks</li></ul><p>This transforms a local discovery into a global organizational improvement. Without knowledge sharing, different teams may repeatedly solve the same problems or repeat the same mistakes.</p><h4>Inject Resilience Patterns into Daily Work</h4><p>Resilience should be actively practiced rather than assumed. Teams can prepare for failure by regularly testing how systems behave when components become unavailable.</p><p>Examples include:</p><ul><li>Testing application recovery</li><li>Rehearsing incident response</li><li>Simulating infrastructure failure</li><li>Validating backup restoration</li><li>Testing rollback procedures</li><li>Conducting game days</li><li>Improving deployment and recovery metrics</li></ul><p>By rehearsing failures, teams gain confidence that their systems and procedures will work during real incidents. A recovery process that has never been tested is only a theory.</p><h4>Leaders Must Reinforce the Learning Culture</h4><p>Continuous learning is unlikely to become part of the organization unless leaders actively support it. Leaders influence whether teams feel safe to experiment, report problems, and challenge inefficient processes.</p><p>They must consistently communicate that learning and improvement are valued.</p><p>This includes providing time for improvement work, supporting blameless incident reviews, encouraging knowledge sharing, and avoiding punishment for well-intentioned experiments. A learning culture cannot exist only in presentations or organizational values. It must be reflected in daily leadership decisions.</p><h3>Summary</h3><p>The Three Ways are not independent practices.</p><p>They reinforce one another.</p><pre>Priciple of Flow<br>Deliver value quickly<br>        ↓<br>Priciple of Feedback<br>Detect problems quickly<br>        ↓<br>Priciple of Continuous Learning<br>Improve the system continuously<br>        ↓<br>Faster and safer Flow</pre><ul><li>The First Way improves how quickly work moves through the organization.</li><li>The Second Way ensures teams receive information about the quality and impact of that work.</li><li>The Third Way uses that information to improve the system, strengthen resilience, and prevent repeated failures.</li><li>An organization that focuses only on Flow may release changes quickly but create instability.</li><li>An organization that focuses only on Feedback may detect many problems but fail to improve the underlying system.</li><li>An organization that discusses learning without improving Flow or Feedback may produce many meetings and documents without meaningful operational change.</li></ul><p>Effective DevOps requires all three.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=19b7e38d3bbb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Enforcing Kubernetes Security Policies on Amazon EKS with Kyverno]]></title>
            <link>https://medium.com/@nasrullahpandu/enforcing-kubernetes-security-policies-on-amazon-eks-with-kyverno-0aa477951564?source=rss-13924de28996------2</link>
            <guid isPermaLink="false">https://medium.com/p/0aa477951564</guid>
            <dc:creator><![CDATA[Nasrullah Pandu Dewantara]]></dc:creator>
            <pubDate>Mon, 06 Jul 2026 09:53:40 GMT</pubDate>
            <atom:updated>2026-07-06T10:06:23.674Z</atom:updated>
            <content:encoded><![CDATA[<p>Blocking privileged containers, root users, and untrusted image registries before workloads are created.</p><h3>Overview</h3><p>In this demonstrates the implementation of Kyverno as a Kubernetes-native policy engine to enforce security, operational, and governance best practices across cluster workloads. Currently, several Kubernetes workloads in the environment still operate with insecure or non-standard configurations, including:</p><ul><li>Containers running in privileged mode</li><li>Workloads running as the root user (runAsRoot)</li><li>Images pulled directly from external registries instead of approved private registries</li><li>Missing CPU and memory resource limits</li><li>Inconsistent workload labeling and governance standards</li></ul><p>These configurations increase the risk of:</p><ul><li>Privilege escalation</li><li>Container breakout vulnerabilities</li><li>Supply chain security exposure</li><li>Operational inconsistency across clusters</li></ul><p>Today, validation and governance are still largely dependent on manual review processes, which are difficult to scale and prone to human error. In this demonstrates evaluates whether Kyverno can serve as a centralized policy enforcement layer to:</p><ul><li>Automatically block non-compliant workloads</li><li>Enforce Kubernetes security standards</li><li>Standardize deployment configurations</li><li>Reduce operational and security risks</li><li>Improve governance consistency across environments</li></ul><h3>Goals</h3><ul><li>Enforce Kubernetes security and operational best practices</li><li>Prevent deployment of non-compliant workloads</li><li>Improve standardization across namespaces and teams</li></ul><h3>Benefits</h3><h4>Security</h4><ul><li>Prevent privileged containers</li><li>Enforce non-root execution</li><li>Enforce trusted container registries</li><li>Restrict dangerous Linux capabilities</li><li>Continuous policy enforcement</li></ul><h4>Operational Efficiency</h4><ul><li>Standardize workload configurations</li><li>Reduce human error during deployment</li></ul><h3>Scope</h3><p>In this demonstrates covers enforcement of the following best practices:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/1*nAD9gGIahVSphp5BUCw-Pg.png" /></figure><h3>Implementation Walkthrough</h3><p>Prerequisites</p><ul><li>Kubernetes cluster</li><li>Kubectl access to the target cluster</li><li>Helm installed</li></ul><ol><li>Install Kyverno</li></ol><pre>helm repo add kyverno https://kyverno.github.io/kyverno/<br>helm repo update<br><br>helm install kyverno kyverno/kyverno -n kyverno --create-namespace<br>kubectl get pods -n kyverno</pre><p>2. Create Validation Policies</p><p>Usecase 1: disallow privileged containers</p><pre>apiVersion: kyverno.io/v1<br>kind: ClusterPolicy<br>metadata:<br>name: disallow-privileged-containers<br>spec:<br>validationFailureAction: Enforce<br>background: true<br>rules:<br>- name: validate-privileged<br>match:<br>any:<br>- resources:<br>kinds: [Pod]<br>exclude:<br>any:<br>- resources:<br>namespaces:<br>- kube-system<br>- kyverno<br>- policy-reporter<br>- falco<br>validate:<br>message: &quot;Privileged containers are not allowed.&quot;<br>pattern:<br>spec:<br>containers:<br>- =(securityContext):<br>=(privileged): false<br>=(initContainers):<br>- =(securityContext):<br>=(privileged): false<br>=(ephemeralContainers):<br>- =(securityContext):<br>=(privileged): false</pre><p>Usecase 2: require non root user</p><pre>apiVersion: kyverno.io/v1<br>kind: ClusterPolicy<br>metadata:<br>name: require-non-root-user<br>spec:<br>validationFailureAction: Enforce<br>background: true<br>rules:<br>- name: validate-run-as-non-root<br>match:<br>any:<br>- resources:<br>kinds: [Pod]<br>exclude:<br>any:<br>- resources:<br>namespaces:<br>- kube-system<br>- kyverno<br>- policy-reporter<br>- falco<br>validate:<br>message: &quot;Containers must not run as root. Set<br>runAsNonRoot: true or runAsUser &gt; 0.&quot;<br>anyPattern:<br>- spec:<br>securityContext:<br>runAsNonRoot: true<br>- spec:<br>securityContext:<br>runAsUser: &quot;&gt;0&quot;<br>- spec:<br>containers:<br>- securityContext:<br>runAsNonRoot: true<br>- spec:<br>containers:<br>- securityContext:<br>runAsUser: &quot;&gt;0&quot;<br>- name: deny-root-user-id<br>match:<br>any:<br>- resources:<br>kinds: [Pod]<br>exclude:<br>any:<br>- resources:<br>namespaces:<br>- kube-system<br>- kyverno<br>- policy-reporter<br>- falco<br>validate:<br>message: &quot;runAsUser must not be 0 (root).&quot;<br>pattern:<br>spec:<br>containers:<br>- =(securityContext):<br>=(runAsUser): &quot;&gt;0&quot;<br>=(initContainers):<br>- =(securityContext):<br>=(runAsUser): &quot;&gt;0&quot;<br>=(ephemeralContainers):<br>- =(securityContext):<br>=(runAsUser): &quot;&gt;0&quot;</pre><p>Usecase 3: restrict image registry</p><pre>apiVersion: kyverno.io/v1<br>kind: ClusterPolicy<br>metadata:<br>name: restrict-image-registry<br>spec:<br>validationFailureAction: Enforce<br>background: true<br>rules:<br>- name: validate-registry<br>match:<br>any:<br>- resources:<br>kinds: [Pod]<br>exclude:<br>any:<br>- resources:<br>namespaces:<br>- kube-system<br>- kyverno<br>- policy-reporter<br>- falco<br>validate:<br>message: &quot;Image must be from ECR:<br>&lt;account-id&gt;.dkr.ecr.ap-southeast-3.amazonaws.com&quot;<br>pattern:<br>spec:<br>containers:<br>- image: &quot;&lt;account-id&gt;.dkr.ecr.ap-southeast-<br>3.amazonaws.com/*&quot;<br>=(initContainers):<br>- image: &quot;&lt;account-id&gt;.dkr.ecr.ap-southeast-<br>3.amazonaws.com/*&quot;<br>=(ephemeralContainers):<br>- image: &quot;&lt;account-id&gt;.dkr.ecr.ap-southeast-<br>3.amazonaws.com/*&quot;</pre><p>Usecase 4: disallow latest tag</p><pre>apiVersion: kyverno.io/v1<br>kind: ClusterPolicy<br>metadata:<br>name: disallow-latest-tag<br>spec:<br>validationFailureAction: Enforce<br>background: true<br>rules:<br>- name: validate-image-tag<br>match:<br>any:<br>- resources:<br>kinds: [Pod]<br>validate:<br>message: &quot;Image tag &#39;:latest&#39; is not allowed. Use a<br>specific tag or digest instead.&quot;<br>pattern:<br>spec:<br>containers:<br>- image: &quot;!*:latest&quot;<br>=(initContainers):<br>- image: &quot;!*:latest&quot;<br>=(ephemeralContainers):<br>- image: &quot;!*:latest&quot;<br>- name: validate-image-has-tag<br>match:<br>any:<br>- resources:<br>kinds: [Pod]<br>validate:<br>message: &quot;Image must have an explicit tag or digest.<br>Tagless images are not allowed.&quot;<br>pattern:<br>spec:<br>containers:<br>- image: &quot;*:*&quot;<br>=(initContainers):<br>- image: &quot;*:*&quot;<br>=(ephemeralContainers):<br>- image: &quot;*:*&quot;</pre><p>Apply the configuration and verify with kubectl get clusterpolicy</p><h3>Result</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4_0dV2izuhXYWq4s8MSRmA.jpeg" /><figcaption>Kyverno successfully blocked a Deployment that attempted to run a container with privileged: true</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JsQkZZpORfd_QTJcc6QzZw.jpeg" /><figcaption>Kyverno denied the Deployment because the container was configured to run as the root user</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*08vdvLC91Oz-XOGIBOuKIg.jpeg" /><figcaption>Kyverno denied the Deployment because the container was configured to run as the root user</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*38HqWlIztmQATwI4N-4qaA.jpeg" /><figcaption>Kyverno blocked the Deployment because the container image was not pulled from the approved ECR registry</figcaption></figure><p>Why does Kyverno show autogen in the error message?<br>In the error output, Kyverno shows rules with the autogen prefix, such as:<br>autogen-validate-privileged</p><p>Kyverno automatically generates policy rules for Kubernetes workload controllers like Deployment, StatefulSet, DaemonSet, Job, and CronJob when the original policy is written for Pods.</p><p>For example, a Pod policy usually checks this path:<br>/spec/containers/0/securityContext/privileged</p><p>But when we apply a Deployment, the container specification is located under the Pod template:<br>/spec/template/spec/containers/0/securityContext/privileged</p><p>Kyverno’s autogen feature automatically translates the Pod-level policy so it can also validate the Deployment before the Pod is created.</p><p>So, when Kyverno blocks the nginx Deployment and shows:<br>autogen-validate-privileged</p><p>Tt means the original Pod security policy was automatically applied to the Deployment’s Pod template.</p><p>In short, autogen is not an error. It is Kyverno ensuring that Pod security policies are also enforced consistently across higher-level Kubernetes controllers.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0aa477951564" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pod Identity for Pods Level Security]]></title>
            <link>https://medium.com/@nasrullahpandu/pod-identity-for-pods-level-security-04421d62a9ff?source=rss-13924de28996------2</link>
            <guid isPermaLink="false">https://medium.com/p/04421d62a9ff</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud-security]]></category>
            <dc:creator><![CDATA[Nasrullah Pandu Dewantara]]></dc:creator>
            <pubDate>Fri, 03 Jul 2026 09:30:51 GMT</pubDate>
            <atom:updated>2026-07-03T09:30:51.969Z</atom:updated>
            <content:encoded><![CDATA[<p>Previously, I shared how IRSA works on Amazon EKS. This time, I explored EKS Pod Identity — a simpler approach to grant IAM permissions to Kubernetes workloads without manually configuring an OIDC provider or adding IAM role annotations to ServiceAccounts.</p><h3>Overview</h3><p>EKS Pod Identity is an AWS mechanism that automatically and securely delivers IAM credentials to pods running in EKS — without storing AWS access keys inside containers, environment variables, or Kubernetes Secrets. Pod Identity is the evolution of IRSA (IAM Roles for Service Accounts). Both solve the same problem — granting AWS access to EKS workloads — but Pod Identity offers simpler configuration and greater flexibility.</p><p>Currently, we use the traditional EC2 instance profile model where IAM roles are attached at the node level. This approach has significant limitations:</p><ul><li>Shared credentials, all pods running on the same node inherit the same IAM permissions from the EC2 instance profile</li><li>No least privilege, impossible to implement granular, pod-specific permissions</li><li>Security risk, pods that don’t require certain AWS permissions still have access to them</li><li>Over-privileged workloads, to accommodate different application needs, node roles often contain excessive permissions</li><li>Limited auditability, difficult to trace which specific pod made which AWS API call</li></ul><p>So, we would like to implement Pod Identity to addresses these security and operational challenges by:</p><ul><li>Enabling pod-level IAM role assignment through Kubernetes Service Accounts, so each workload gets its own identity rather than sharing a node-level role</li><li>Implementing least privilege access by granting each workload only the permissions it needs — scoped per namespace and ServiceAccount</li><li>Providing credential isolation so a compromised pod cannot access credentials belonging to other workloads</li><li>Creating clear audit trails that link AWS API calls to specific pods and Service Accounts via STS session tags</li><li>Eliminating long-term AWS credentials from application configurations, container images, and Kubernetes Secrets entirely</li><li>Simplifying cross-cluster role reuse without updating IAM trust policies each time a new cluster is added</li></ul><h3>Goals</h3><ul><li>No AWS access keys stored anywhere in the workload lifecycle: not in code, not in environment variables, not in Kubernetes Secrets</li><li>Every workload has its own distinct IAM identity, scoped to its namespace and Service Account, rather than inheriting a broad node-level role</li><li>Reduce IAM configuration overhead by decoupling trust policy setup from per-cluster OIDC management</li><li>Allow a single IAM role to be safely reused across multiple clusters and environments without modifying the trust policy each time</li><li>Credentials are issued, rotated, and expired automatically by the EKS platform, with no manual intervention required</li></ul><h3>Benefits</h3><ul><li>Least Privilege access, each pod receives only the permissions it requires, reducing blast radius in case of compromise</li><li>With credential isolation, pods cannot access credentials intended for other workloads</li><li>No Long-term Credentials, eliminates the need to store AWS access keys in Kubernetes secrets or configuration files</li><li>No OIDC issuer URLs in trust policies; one generic trust principal works for all clusters (pods.eks.amazonaws.com)</li><li>AWS SDKs pick up credentials automatically via the credential provider chain</li><li>Credential rotation is handled by the EKS agent — no restart, no re-deploy, no cron job</li></ul><h3>Concept</h3><p><strong>Traditional Approach 1: Access Keys + Secret Keys</strong></p><p>Application Code / Kubernetes Secret<br>├── AWS_ACCESS_KEY_ID: AKIAIOSFODNN7EXAMPLE<br>├── AWS_SECRET_ACCESS_KEY: wJalrXUtnFEMI/K7MDENG/bPxR<br>└── Hardcoded or stored in ConfigMap/Secret/environtment variables</p><p>All pods using these credentials share the same identity <br>Limitations:</p><ul><li>High Security Risk: Credentials can be accidentally committed to Git repositories.</li><li>Manual Rotation: Access keys must be manually rotated every 90 days</li><li>Exposure Risk: Keys visible in ‘kubectl get secret’ output (base64 encoded, not encrypted)</li><li>Difficult Revocation: Revoking keys requires updating all applications using them</li><li>No Automatic Expiration: Keys remain valid until manually deleted</li></ul><p><strong>Traditional Approach 2:</strong> <strong>EC2 Instance Profile (IAM Role)</strong></p><p>EC2 Node<br>└── Instance Profile (IAM Role)<br>├── Pod A → Uses node’s IAM role<br>├── Pod B → Uses node’s IAM role<br>└── Pod C → Uses node’s IAM role</p><p>Problem: All pods share the same permissions. <br>Limitations:</p><ul><li>All pods on a node share the same IAM role</li><li>Cannot implement least privilege at the pod level</li><li>Difficult to audit which pod made which AWS API call</li><li>Security risk: compromised pod has access to all node permissions</li><li>Over-privileged nodes: Must grant union of all pod permissions to node role</li></ul><p><strong>IRSA Approach</strong></p><p>EC2 Node (minimal IAM role for node operations)<br>├── Pod A → ServiceAccount A → IAM Role A (S3 read-only)<br>├── Pod B → ServiceAccount B → IAM Role B (DynamoDB write)<br>└── Pod C → ServiceAccount C → IAM Role C (SQS consume)</p><p>Solution: Each pod has unique, scoped permissions <br>Advantages:</p><ul><li>Granular permission assignment per workload</li><li>Namespace isolation for multi-tenant clusters</li><li>Clear audit trail linking API calls to specific pods</li><li>Automatic credential management by AWS SDK</li></ul><p><strong>Pod Identity Approach</strong></p><p>EC2 Node (minimal IAM role for node operations)</p><p>├── Pod A → ServiceAccount A → IAM Role A → S3 read-only access<br>├── Pod B → ServiceAccount B → IAM Role B → DynamoDB write access<br>└── Pod C → ServiceAccount C → IAM Role C → SQS consume access</p><p>Solution: Each pod has unique, scoped permissions<br>Advantages:</p><ul><li>Granular permission assignment per workload</li><li>Better namespace isolation for multi-tenant clusters</li><li>Clear audit trail that links AWS API calls to specific workloads</li><li>Automatic credential management through the AWS SDK</li><li>No OIDC provider setup required</li><li>Easier IAM role reuse across clusters</li><li>No ServiceAccount annotation required</li></ul><p><strong>Pod Identity Flow</strong></p><ol><li>Pod Identity Agent is installed as a DaemonSet on every node via the eks-pod-identity-agent EKS addon.</li><li>A Pod Identity Association is configured in EKS, mapping: <br><em>Namespace + ServiceAccount → IAM Role</em></li><li>When a pod starts using the associated ServiceAccount, the Pod Identity Agent detects the mapping.</li><li>The agent requests temporary credentials from AWS STS on behalf of the mapped IAM role.</li><li>Credentials are injected into the pod via a file at: /var/run/secrets/pods.eks.amazonaws.com/serviceaccount/</li><li>The AWS SDK inside the pod (boto3, AWS SDK for Go, etc.) automatically reads those credentials via the credential provider chain — no extra code needed.</li><li>Credentials are <strong>r</strong>otated automatically by the agent before they expire — no pod restart required.</li></ol><h3>Scenario</h3><h4>Implementation Details</h4><p>EKS Cluster: k8s-optimizer-dev-eks <br>Region: ap-southeast-3 <br>Service account: s3-access-sa <br>IAM Role: poc-pod-identity-s3-role</p><pre>| Scenario   | Description                   | Service Account       | Expected Result           |<br>|------------|-------------------------------|-----------------------|---------------------------|<br>| Scenario 1 | AWS CLI container with PI     | s3-access-sa          | List S3 Bucket            |<br>| Scenario 2 | Python Flask app with PI      | s3-access-sa          | Read and Write S3 Bucket  |</pre><h4><strong>Scenario Walkthrough</strong></h4><ol><li>Install EKS Pod Identity Agent</li></ol><pre>aws eks create-addon \<br>  --cluster-name &quot;${CLUSTER_NAME}&quot; \<br>  --addon-name eks-pod-identity-agent \<br>  --region &quot;${REGION}&quot;<br><br>kubectl get pods \<br>  -n kube-system \<br>  -l app.kubernetes.io/name=eks-pod-identity-agent</pre><p>2. Create Pod Identity Trust Policy</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;Principal&quot;: {<br>        &quot;Service&quot;: &quot;pods.eks.amazonaws.com&quot;<br>      },<br>      &quot;Action&quot;: [<br>        &quot;sts:AssumeRole&quot;,<br>        &quot;sts:TagSession&quot;<br>      ]<br>    }<br>  ]<br>}</pre><p>3. Create IAM Role for Pod Identity</p><pre>aws iam create-role \<br>  --role-name &quot;${ROLE_NAME}&quot; \<br>  --assume-role-policy-document file:///tmp/pod-identity-trust-policy.json \<br>  --description &quot;Role for POC Pod Identity - S3 read and write access&quot;</pre><p>4. Create and Attach Policy to IAM Role</p><pre>{<br>  &quot;Version&quot;: &quot;2012-10-17&quot;,<br>  &quot;Statement&quot;: [<br>    {<br>      &quot;Sid&quot;: &quot;S3BucketAccess&quot;,<br>      &quot;Effect&quot;: &quot;Allow&quot;,<br>      &quot;Action&quot;: [<br>        &quot;s3:ListBucket&quot;,<br>        &quot;s3:GetBucketLocation&quot;<br>      ],<br>      &quot;Resource&quot;: &quot;arn:aws:s3:::${BUCKET_NAME}&quot;<br>    },<br>    {<br>      &quot;Sid&quot;: &quot;S3ObjectAccess&quot;,<br>      &quot;Effect&quot;: &quot;Allow&quot;,<br>      &quot;Action&quot;: [<br>        &quot;s3:GetObject&quot;,<br>        &quot;s3:PutObject&quot;,<br>        &quot;s3:DeleteObject&quot;<br>      ],<br>      &quot;Resource&quot;: &quot;arn:aws:s3:::${BUCKET_NAME}/*&quot;<br>    }<br>  ]<br>}<br><br>POLICY_ARN=$(aws iam create-policy \<br>  --policy-name &quot;${POLICY_NAME}&quot; \<br>  --policy-document file:///tmp/pod-identity-s3-policy.json \<br>  --query &#39;Policy.Arn&#39; \<br>  --output text)<br><br>aws iam attach-role-policy \<br>  --role-name &quot;${ROLE_NAME}&quot; \<br>  --policy-arn &quot;${POLICY_ARN}&quot;</pre><p>5. Setup Pod Identity Association</p><pre>aws eks create-pod-identity-association \<br>  --cluster-name &quot;${CLUSTER_NAME}&quot; \<br>  --namespace &quot;${NAMESPACE}&quot; \<br>  --service-account &quot;${SERVICE_ACCOUNT}&quot; \<br>  --role-arn &quot;${ROLE_ARN}&quot; \<br>  --region &quot;${REGION}&quot;<br><br>aws eks list-pod-identity-associations \<br>  --cluster-name &quot;${CLUSTER_NAME}&quot; \<br>  --region &quot;${REGION}&quot; \<br>  --output table</pre><p>6. Create Kubernetes Service Account</p><pre>apiVersion: v1<br>kind: ServiceAccount<br>metadata:<br>  name: s3-access-sa<br>  namespace: poc-pod-identity</pre><p>7. Update Kubernetes Manifest</p><pre>apiVersion: apps/v1<br>kind: Deployment<br>metadata:<br>  name: s3-client<br>  namespace: poc-pod-identity<br>  labels:<br>    app: s3-client<br>spec:<br>  replicas: 1<br>  selector:<br>    matchLabels:<br>      app: s3-client<br>  template:<br>    metadata:<br>      labels:<br>        app: s3-client<br>    spec:<br>      serviceAccountName: s3-access-sa<br>      containers:<br>        - name: aws-cli<br>          image: amazon/aws-cli:latest<br>          command: [&quot;/bin/sh&quot;, &quot;-c&quot;]<br>          args:<br>            - |<br>              while true; do<br>                echo &quot;=== Pod Identity Status Check ===&quot;<br><br>                echo &quot;Current AWS identity:&quot;<br>                aws sts get-caller-identity<br><br>                echo &quot;List S3 Bucket:&quot;<br>                aws s3 ls<br><br>                echo &quot;Sleeping for 300 seconds...&quot;<br>                sleep 300<br>              done<br>          env:<br>            - name: AWS_DEFAULT_REGION<br>              value: &quot;ap-southeast-3&quot;</pre><p>8. Check the Result</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8pM3_pWhYQJZ8zJVX-t5dw.jpeg" /><figcaption>Pod Identity validation showing successful IAM role assumption and S3 bucket listing from inside the EKS pod.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1JGr4Wm2woqWHZnnvvgoFw.jpeg" /><figcaption>Successful S3 read and write test from an EKS pod using EKS Pod Identity.</figcaption></figure><p>The pod logs from s3-client-1 and s3-client-2 successfully demonstrate that a pod running in EKS can list, write, and read objects from an S3 bucket with zero AWS access keys configured anywhere in the workload. No credentials in environment variables, no Kubernetes Secrets, no hardcoded keys in the container image. This confirms that Pod Identity is a viable and secure mechanism for granting AWS resource access to Kubernetes workloads.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=04421d62a9ff" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[IRSA (IAM Role for Service Account) for Pods Level Security EKS Cluster]]></title>
            <link>https://medium.com/@nasrullahpandu/irsa-iam-role-for-service-account-for-pods-level-security-eks-cluster-675534c35258?source=rss-13924de28996------2</link>
            <guid isPermaLink="false">https://medium.com/p/675534c35258</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[cloud-security]]></category>
            <dc:creator><![CDATA[Nasrullah Pandu Dewantara]]></dc:creator>
            <pubDate>Fri, 03 Jul 2026 07:30:51 GMT</pubDate>
            <atom:updated>2026-07-03T09:31:21.263Z</atom:updated>
            <content:encoded><![CDATA[<p>Still using static AWS access keys inside Kubernetes workloads? That might work, but it is not the safest approach.</p><h3>Overview</h3><p>IRSA enables fine-grained IAM permission management for Kubernetes workloads by allowing individual pods to assume specific IAM roles without sharing credentials at the node level or attaching access keys. This docs demonstrates the authentication flow, security benefits, and operational simplicity of implementing IRSA compared to traditional EC2 instance profile-based permission models.</p><p>Currently, we use the traditional EC2 instance profile model where IAM roles are attached at the node level. This approach has significant limitations:</p><ul><li>Shared credentials, all pods running on the same node inherit the same IAM permissions from the EC2 instance profile</li><li>No least privilege, impossible to implement granular, pod-specific permissions</li><li>Security risk, pods that don’t require certain AWS permissions still have access to them</li><li>Over-privileged workloads, to accommodate different application needs, node roles often contain excessive permissions</li><li>Limited auditability, difficult to trace which specific pod made which AWS API call</li></ul><p>So, we would like to implement IRSA to addresses these security and operational challenges by:</p><ul><li>Enabling pod-level IAM role assignment through Kubernetes Service Accounts</li><li>Implementing least privilege access by granting each workload only the permissions it needs</li><li>Providing credential isolation so compromised pods cannot access other workloads’ credentials</li><li>Creating clear audit trails that link AWS API calls to specific pods and Service Accounts</li><li>Eliminating the need to store long-term AWS credentials in application configurations</li></ul><h3>Goals</h3><ul><li>Eliminate shared credentials across pods running on the same node.</li><li>Implement least privilege access for containerized applications.</li><li>Enable granular audit trails for AWS API calls per workload</li><li>Establish best practices for IRSA deployment in production environments</li></ul><h3>Benefits</h3><ul><li>Least Privilege access, each pod receives only the permissions it requires, reducing blast radius in case of compromise.</li><li>With credential isolation, pods cannot access credentials intended for other workloads.</li><li>No Long-term Credentials, eliminates the need to store AWS access keys in Kubernetes secrets or configuration files.</li><li>Automatic credential rotation, temporary credentials are automatically refreshed by the AWS SDK before expiration.</li><li>Enhanced audit trail, cloudTrail logs clearly identify which pod (via Service Account) made specific AWS API calls.</li><li>No deployment restarts required, permission changes take effect automatically without disrupting running workloads.</li></ul><h3>Concept</h3><p><strong>Traditional Approach 1: Access Keys + Secret Keys</strong></p><p>Application Code / Kubernetes Secret<br>├── AWS_ACCESS_KEY_ID: AKIAIOSFODNN7EXAMPLE<br>├── AWS_SECRET_ACCESS_KEY: wJalrXUtnFEMI/K7MDENG/bPxR<br>└── Hardcoded or stored in ConfigMap/Secret/environtment variables</p><p>All pods using these credentials share the same identity <br>Limitations:</p><ul><li>High Security Risk: Credentials can be accidentally committed to Git repositories.</li><li>Manual Rotation: Access keys must be manually rotated every 90 days</li><li>Exposure Risk: Keys visible in ‘kubectl get secret’ output (base64 encoded, not encrypted)</li><li>Difficult Revocation: Revoking keys requires updating all applications using them</li><li>No Automatic Expiration: Keys remain valid until manually deleted</li></ul><p><strong>Traditional Approach 2:</strong> <strong>EC2 Instance Profile (IAM Role)</strong></p><p>EC2 Node<br>└── Instance Profile (IAM Role)<br>├── Pod A → Uses node’s IAM role<br>├── Pod B → Uses node’s IAM role<br>└── Pod C → Uses node’s IAM role</p><p>Problem: All pods share the same permissions. <br>Limitations:</p><ul><li>All pods on a node share the same IAM role</li><li>Cannot implement least privilege at the pod level</li><li>Difficult to audit which pod made which AWS API call</li><li>Security risk: compromised pod has access to all node permissions</li><li>Over-privileged nodes: Must grant union of all pod permissions to node role</li></ul><p><strong>IRSA Approach</strong></p><p>EC2 Node (minimal IAM role for node operations)<br>├── Pod A → ServiceAccount A → IAM Role A (S3 read-only)<br>├── Pod B → ServiceAccount B → IAM Role B (DynamoDB write)<br>└── Pod C → ServiceAccount C → IAM Role C (SQS consume)</p><p>Solution: Each pod has unique, scoped permissions <br>Advantages:</p><ul><li>Granular permission assignment per workload</li><li>Namespace isolation for multi-tenant clusters</li><li>Clear audit trail linking API calls to specific pods</li><li>Automatic credential management by AWS SDK</li></ul><p><strong>IRSA Authentication Flow</strong></p><ol><li>Once pod startup, kubernetes inject JWT token to pod volume (path: /var/run/secrets/<a href="http://eks.amazonaws.com/serviceaccount/">eks.amazonaws.com/serviceaccount/</a>)</li><li>Application call AWS API, and AWS SDK detects IRSA environment variables:<br>- AWS_ROLE_ARN<br>- AWS_WEB_IDENTITY_TOKEN_FILE</li><li>SDK Calls STS AssumeRoleWithWebIdentity, will send JWT token and IAM Role ARN</li><li>AWS STS Validates Token<br>- Verify signature using OIDC provider<br>- Check token expiration<br>- Validate issuer matches OIDC provider<br>- Match claims against IAM role trust policy</li><li>STS Returns Temporary Credentials<br>- AccessKeyId<br>- SecretAccessKey<br>- Session token<br>- Expiration</li><li>Application Uses Credentials, AWS SDK refresh temporary credentials before expiration</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1023/1*g-V-ecueV_NeH1VArTtljw.png" /><figcaption>IRSA workflow in Amazon EKS</figcaption></figure><h3>Scenario</h3><h4>Implementation Details</h4><p>EKS Cluster: eks-cluster-sandbox <br>Region: us-east-1 <br>Service account: ops-sa <br>IAM Role: ops-role</p><pre>| Scenario   | Description                   | Service Account | Expected Result     |<br>|------------|-------------------------------|-----------------|---------------------|<br>| Scenario 1 | AWS CLI container with IRSA   | ops-sa          | ReadOnly S3 Access  |<br>| Scenario 2 | Python Flask app with IRSA    | ops-sa          | ReadOnly S3 Access  |<br>| Scenario 3 | Pod without Service Account   | No SA           | No S3 access        |</pre><h4><strong>Scenario Walkthrough</strong></h4><p>1. Enable OIDC Provider</p><pre>aws eks describe-cluster \<br>  --name eks-cluster-sandbox \<br>  --query &quot;cluster.identity.oidc.issuer&quot; \<br>  --output text<br><br>eksctl utils associate-iam-oidc-provider \<br>  --cluster eks-cluster-sandbox \<br>  --approve</pre><p>2. Setup IAM Role for IRSA</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;Principal&quot;: {<br>        &quot;Federated&quot;: &quot;arn:aws:iam::&lt;account-id&gt;:oidc-provider/oidc.eks.us-east-1.amazonaws.com/id/2A7A6979E293D5817CE18FF596AA24747&quot;<br>      },<br>      &quot;Action&quot;: &quot;sts:AssumeRoleWithWebIdentity&quot;,<br>      &quot;Condition&quot;: {<br>        &quot;StringEquals&quot;: {<br>          &quot;oidc.eks.us-east-1.amazonaws.com/id/2A7A6979E293D5817CE18FF596AA24747:aud&quot;: &quot;sts.amazonaws.com&quot;,<br>          &quot;oidc.eks.us-east-1.amazonaws.com/id/2A7A6979E293D5817CE18FF596AA24747:sub&quot;: &quot;system:serviceaccount:default:ops-sa&quot;<br>        }<br>      }<br>    }<br>  ]<br>} <br></pre><p>3. Create and attach policy to role</p><pre>aws iam create-role \<br>  --role-name ops-role \<br>  --assume-role-policy-document file://trust-policy.json<br><br># Example: attach Amazon S3 read-only permission<br>aws iam attach-role-policy \<br>  --role-name ops-role \<br>  --policy-arn arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess</pre><p>4. Create service account (ops-sa)</p><pre>apiVersion: v1<br>kind: ServiceAccount<br>metadata:<br>  name: ops-sa<br>  namespace: default<br>  annotations:<br>    eks.amazonaws.com/role-arn: arn:aws:iam::&lt;account-id&gt;:role/ops-role</pre><p>5. Update Kubernetes Manifest</p><pre>apiVersion: apps/v1<br>kind: Deployment<br>metadata:<br>  name: ops-apps<br>  namespace: default<br>  labels:<br>    app: ops-apps<br>spec:<br>  replicas: 1<br>  selector:<br>    matchLabels:<br>      app: ops-apps<br>  template:<br>    metadata:<br>      labels:<br>        app: ops-apps<br>    spec:<br>      serviceAccountName: ops-sa<br>      containers:<br>        - name: aws-cli<br>          image: amazon/aws-cli:latest<br>          command: [&quot;/bin/sh&quot;, &quot;-c&quot;]<br>          args:<br>            - |<br>              while true; do<br>                echo &quot;=== IRSA Status Check ===&quot;<br>                echo &quot;Role ARN: $AWS_ROLE_ARN&quot;<br>                aws sts get-caller-identity<br><br>                echo &quot;List S3 Bucket&quot;<br>                aws s3 ls<br><br>                echo &quot;Sleeping for 300 seconds...&quot;<br>                sleep 300<br>              done<br>          env:<br>            - name: AWS_DEFAULT_REGION<br>              value: &quot;us-east-1&quot;</pre><p>6. Check the result</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZdxUd0ULBFTAUsGM76DauA.jpeg" /><figcaption>The AWS CLI pod successfully assumes the ops-role IAM role using IRSA</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C1Ccsg9CMgoWoGLGVRcwNA.jpeg" /><figcaption>The pod successfully receives IRSA-related environment variables</figcaption></figure><p>The pod logs from ops-sa and s3-app (python) deployment successfully demonstrate:</p><ul><li>Environment variable AWS_ROLE_ARN correctly populated</li><li>aws sts get-caller-identity returned valid assumed-role identity</li><li>ARN shows assumed-role type (not IAM user), confirming temporary credential usage</li><li>Unique session name botocore-session-xxxx for audit traceability</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A1XcemOdWXcGdENPb1VECg.png" /><figcaption>Validation result for a pod without IRSA configuration</figcaption></figure><p>Meanwhile when we create a deployment without setting a ServiceAccount, the pods will not have permissions to access S3.</p><h4><strong>Trace Event via Cloudtrail</strong></h4><pre>{<br>  &quot;eventVersion&quot;: &quot;1.11&quot;,<br>  &quot;userIdentity&quot;: {<br>    &quot;type&quot;: &quot;AssumedRole&quot;,<br>    &quot;principalId&quot;: &quot;AROA3M7AC7LFYPGCQYORT:botocore-session-1765247605&quot;,<br>    &quot;arn&quot;: &quot;arn:aws:sts::&lt;account-id&gt;:assumed-role/ops-role/botocore-session-1765247605&quot;,<br>    &quot;accountId&quot;: &quot;&lt;account-id&gt;&quot;,<br>    &quot;accessKeyId&quot;: &quot;&lt;temporary-access-key-id&gt;&quot;,<br>    &quot;sessionContext&quot;: {<br>      &quot;sessionIssuer&quot;: {<br>        &quot;type&quot;: &quot;Role&quot;,<br>        &quot;principalId&quot;: &quot;AROA3M7AC7LFYPGCQYORT&quot;,<br>        &quot;arn&quot;: &quot;arn:aws:iam::&lt;account-id&gt;:role/ops-role&quot;,<br>        &quot;accountId&quot;: &quot;&lt;account-id&gt;&quot;,<br>        &quot;userName&quot;: &quot;ops-role&quot;<br>      },<br>      &quot;webIdFederationData&quot;: {<br>        &quot;federatedProvider&quot;: &quot;arn:aws:iam::&lt;account-id&gt;:oidc-provider/oidc.eks.us-east-1.amazonaws.com/id/2A7A6979E293D5817CE18FF596AA24747&quot;,<br>        &quot;attributes&quot;: {}<br>      },<br>      &quot;attributes&quot;: {<br>        &quot;creationDate&quot;: &quot;2025-12-09T02:33:25Z&quot;,<br>        &quot;mfaAuthenticated&quot;: &quot;false&quot;<br>      }<br>    }<br>  },<br>  &quot;eventTime&quot;: &quot;2025-12-09T02:58:33Z&quot;,<br>  &quot;eventSource&quot;: &quot;s3.amazonaws.com&quot;,<br>  &quot;eventName&quot;: &quot;ListBuckets&quot;,<br>  &quot;awsRegion&quot;: &quot;us-east-1&quot;,<br>  &quot;sourceIPAddress&quot;: &quot;&lt;source-ip-address&gt;&quot;,<br>  &quot;userAgent&quot;: &quot;[aws-cli/2.32.11 md/awscrt#0.29.1 ua/2.1 os/linux#6.12.55 md/arch#x86_64 lang/python#3.13.9 md/pyimpl#CPython m/k,Z,C,E,b,h cfg/retry-mode#standard md/installer#docker md/distrib#amzn.2023 sid/39633e1898b0 md/prompt#off md/command#s3.ls]&quot;,<br>  &quot;requestParameters&quot;: {<br>    &quot;Host&quot;: &quot;s3.us-east-1.amazonaws.com&quot;<br>  },<br>  &quot;responseElements&quot;: null,<br>  &quot;additionalEventData&quot;: {<br>    &quot;SignatureVersion&quot;: &quot;SigV4&quot;,<br>    &quot;CipherSuite&quot;: &quot;TLS_AES_128_GCM_SHA256&quot;,<br>    &quot;bytesTransferredIn&quot;: 0,<br>    &quot;AuthenticationMethod&quot;: &quot;AuthHeader&quot;,<br>    &quot;x-amz-id-2&quot;: &quot;8WRlvY16MfhU0k5vhgjvEQkr6wKG0mI/XXdzxIAPw0JdkCk9cN8VsfIFisAABgbhxib/9gFFHzDFLwm8z58yFs9xo6vddoI5kJI8OLemvdM=&quot;,<br>    &quot;bytesTransferredOut&quot;: 605<br>  },<br>  &quot;requestID&quot;: &quot;YEEAY0VGQW42S2PM&quot;,<br>  &quot;eventID&quot;: &quot;0de3d36a-1e93-4832-b265-3013d5e8f2e3&quot;,<br>  &quot;readOnly&quot;: true,<br>  &quot;eventType&quot;: &quot;AwsApiCall&quot;,<br>  &quot;managementEvent&quot;: true,<br>  &quot;recipientAccountId&quot;: &quot;&lt;account-id&gt;&quot;,<br>  &quot;eventCategory&quot;: &quot;Management&quot;,<br>  &quot;tlsDetails&quot;: {<br>    &quot;tlsVersion&quot;: &quot;TLSv1.3&quot;,<br>    &quot;cipherSuite&quot;: &quot;TLS_AES_128_GCM_SHA256&quot;,<br>    &quot;clientProvidedHostHeader&quot;: &quot;s3.us-east-1.amazonaws.com&quot;<br>  }<br>}</pre><p>The CloudTrail event confirms that the ListBuckets API call was performed by an assumed IAM role named ops-role. The presence of webIdFederationData indicates that the role was assumed through OIDC federation, which validates the IRSA authentication flow from the EKS pod.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=675534c35258" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Prometheus Part 2 | Complete Guide to Best Practice Monitoring Your Infrastructure]]></title>
            <link>https://medium.com/@nasrullahpandu/prometheus-part-2-complete-guide-to-best-practice-monitoring-your-infrastructure-dd2e2e12d53e?source=rss-13924de28996------2</link>
            <guid isPermaLink="false">https://medium.com/p/dd2e2e12d53e</guid>
            <category><![CDATA[monitoring]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[prometheus]]></category>
            <category><![CDATA[grafana]]></category>
            <dc:creator><![CDATA[Nasrullah Pandu Dewantara]]></dc:creator>
            <pubDate>Mon, 10 Jun 2024 08:56:24 GMT</pubDate>
            <atom:updated>2024-06-10T08:56:24.811Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi, selamat datang kembali bersama pandudw di pembahasan Prometheus Part 2.</p><p>Nah sebelum mulai pembahasan, ada pantun dulu nih buat temen-temen.</p><blockquote>Ikan hiu makan tomat</blockquote><blockquote>Selamat datang dan semangat manteman!</blockquote><p>hehe ga nyambung ya, iya sih kaya kisah cintanya sama doi juga ga nyambung :(</p><p>Pada artikel ini kita akan coba mendeploy platform monitoring Prometheus dan Grafana di Kubernetes cluster. Ada 3 metode berbeda untuk mendeploy Prometheus dan Grafana.</p><ol><li><strong>Menggunakan Kubernetes YAML manifest</strong>. Pada opsi ini kita harus membuat konfigurasi semua komponen seperti Prometheus, Grafana, Alertmanager, Exporter beserta konfigurasi configmap, secrets, statefulset, dan lain-lain. Setelah itu deploy ke Kubernetes cluster. Kebayang ga tuh seberapa ribetnya kalau harus bikin manifest Kubernetes setiap komponen. Oke kalau gitu kita move ke opsi kedua.</li><li><strong>Menggunakan Prometheus Operator . </strong>Konsep dari Operator ini adalah manage semua komponen Prometheus dalam satu unit saja, sehingga tidak perlu menulis konfigurasinya secara manual satu per satu. Kita hanya perlu membuat CRDs, dan Prometheus Operator akan membuat dan update sesuai dengan CRDs yang kita buat. Cara ini menjadi solusi efisien untuk mendeploy dan manage Prometheus yang kompleks. Hmm lebih mudah dari opsi pertama ya, tapi tetap aja kita perlu membuat banyak CRDs. Let’s see opsi ketiga!</li><li><strong>Menggunakan Helm Chart. </strong>Opsi ini adalah cara paling efisien untuk mendeploy Prometheus Operator. Dalam proses ini, Helm akan menginisiasi setup dan mengelola konfigurasi Prometheus Operator secara otomatis. Kita hanya memastikan bahwa helm chart sudah terinstall di laptop / pc kalian masing-masing. Kemudian kita perlu chart dari Prometheus Operator untuk nanti kita deploy. Simpel kan? mari kita coba! oiya teman-teman bisa install helm chart di sini ya</li></ol><p><strong>Requirement</strong></p><ul><li>Install helm di <a href="https://helm.sh/docs/intro/install/">dokumentasi</a> resminya</li><li>Helm chart<a href="https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack#kube-prometheus-stack"> Prometheus Operator</a></li></ul><h4>Setup Prometheus Operator dengan Helm Chart</h4><p>Caranya gampang banget, untuk setup Prometheus Operator dengan helm temen temen bisa tambahkan dulu Helm repository nya dan mulai install Helm Chartnya</p><pre>helm repo add prometheus-community https://prometheus-community.github.io/helm-charts<br>helm repo update<br>helm install prometheus prometheus-community/kube-prometheus-stack</pre><p>Oke kalau sudah muncul seperti ini berarti selamat temen temen sudah berhasil mendeploy Prometheus Operator dengan helm!</p><p>Untuk melihat apa saja yang dideploy temen-temen bisa gunakan perintah ini.</p><pre>kubectl get all</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*skJ0rYQ4bTVV_3Ooz-sLYQ.png" /></figure><p>lalu apa saja sih komponen Kubernetes yang dideploy?</p><ul><li>Pod</li><li>Service</li><li>Daemonset</li><li>Deployment</li><li>Replicaset</li><li>Statefulset</li></ul><p>Kemudian untuk mengakses Prometheus dan Grafana kita bisa menggunakan port forwarding.</p><pre>kubectl port-forward prometheus-prometheus-kube-prometheus-prometheus-0 9090</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P6WpAyijF_qpG1x6kwMAcg.png" /></figure><pre>kubectl port-forward prometheus-grafana-6b6b5b4d5b-fz4z4 3000</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gd2NMpXmYPHgv9OO9ADkPQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dd2e2e12d53e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Performance and Availability for Infrastructure System]]></title>
            <link>https://medium.com/@nasrullahpandu/performance-and-availability-for-infrastructure-system-c44ec92d9cf0?source=rss-13924de28996------2</link>
            <guid isPermaLink="false">https://medium.com/p/c44ec92d9cf0</guid>
            <category><![CDATA[observability]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[monitoring]]></category>
            <dc:creator><![CDATA[Nasrullah Pandu Dewantara]]></dc:creator>
            <pubDate>Thu, 30 May 2024 15:38:13 GMT</pubDate>
            <atom:updated>2024-05-30T17:06:22.502Z</atom:updated>
            <content:encoded><![CDATA[<p>Sebuah kejadian error pengguna aplikasi booking tiket kereta online bernama letsgo.com di sebuah negara Konoha.</p><p><em>A: “Gimana nih aplikasinya gw buka ga bisa nih! acara gw 3 jam lagi nih.”</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5bQQLbOZCVViy6Q9R_2Hjg.jpeg" /><figcaption>grafana dashboard</figcaption></figure><p>Kalau ada komplain dari user ke kita sebagai engineer apa yang kita lakukan? Sebagai seorang engineer yang membuat aplikasi, salah satu goals kita adalah make sure performa sistem optimal untuk memastikan ketersediaan dengan sumber daya secukupnya. Let’s say kalau aplikasi diakses kurang lebih 1000 user, kita provide sistem yang bisa menampung 1200 user untuk jaga-jaga kalau ada lonjakan. “Kenapa ga 3000 aja, udah jelas ga akan down tuh” Yee masalahnya maka akan makin besar pula resources yang kita perlukan, cost nya akan lebih mahal juga. Jadinya overutilized, mubazir!</p><p>Balik lagi ya kalau aplikasi down, udah mesti kita panik. Ada seorang pakar system administrator dan linux bernama Brendangregg yang share gimana cara kita dalam memeriksa masalah dalam sistem, namanya <strong>USE Method</strong>.</p><blockquote><strong><em>The Utilization Saturation and Errors (USE) Method is a methodology for analyzing the performance of any system. It directs the construction of a checklist, which for server analysis can be used for quickly identifying resource bottlenecks or errors. It begins by posing questions, and then seeks answers, instead of beginning with given metrics (partial answers) and trying to work backwards.</em></strong></blockquote><p>Checklist yang membantu untuk memeriksa dan mengidentifikasi masalah sistem kita. Sederhananya USE Methods itu:</p><blockquote><strong><em>For every resource, check utilization, saturation, and errors.</em></strong></blockquote><p>Resources adalah komponen fungsional pada server fisik, seperti CPU, RAM, disk, disk I/O, limit OS, dan jaringan.</p><h4><strong>Utilization</strong></h4><p>Pemanfaatan resources, berapa lama dalam satu waktu resources tersebut sibuk melayani request. Pada bagian ini kita bisa memeriksa:</p><ul><li>Penggunaan resources pada server, apakah ada resources yang mencapai batas maksimal? atau apakah ada proses aplikasi yang pakai resources berlebihan?</li><li>Kita harus memastikan bahwa utilisasi resource kita optimal aman sentosa.</li></ul><h4><strong>Saturation</strong></h4><p>Keadaan penuh atau jenuhnya resources. Pada bagian ini kita bisa memeriksa berapa banyak request yang tidak terlayani karena resourcesnya terlalu sibuk. Kemudian request yang tidak terlayani gimana nasibnya? apakah masuk ke antrian?</p><h4><strong>Error</strong></h4><p>Jumlah error yang terjadi. Pada bagian ini kita bisa memeriksa apakah ada log yang sering terjadi? Memeriksa log pada web server atau database untuk mencari penyebab error, buka semua lognya.</p><p>Jadi ini adalah framework paling dasar untuk memeriksa dan menentukan bagaimana performa dan ketersediaan sistem kita. Dalam keadaan darurat misalnya website down kena DDOS atau gabisa dibuka, maka framework ini bisa dipakai sebagai checklist yang harus kita cek pertama kali dalam memeriksa masalah keadaan sistem.</p><p>Pertanyaan selanjutnya, gimana <strong>cara monitorin semua komponen</strong> di atas? Sehingga goalsnya adalah <strong>kita bisa lebih dulu</strong> tau bug atau problem di sistem kita dibanding user yang ngerasain problemnya trus komplain ke kita.</p><p>Tentu kita perlu kumpulin data dari sistem untuk melakukan monitoring dan memeriksa performa &amp; ketersediaan sistem. Datanya apa aja?</p><ul><li><strong>Metrics</strong>: Nilai numerik yang mewakili aspek tertentu dari sistem. Ada tiga jenis metrics yang perlu kita cek: system metrics, application metrics (APM &amp; profiler), dan business metrics.</li><li><strong>Logs</strong>: Jurnal yang berisi event atau kejadian yang terjadi di suatu sistem. Dari sini kita tidak hanya melihat logs kejadian error aja, tapi bisa dapat logs warning, info, dan success.</li><li><strong>Traces</strong>: Journey sebuah request ketika menggunakan aplikasi, sangat penting apalagi kalau sistemnya semakin kompeks.</li></ul><p>Bisa menggunakan platform monitoring seperti Prometheus &amp; Grafana, ELK, Datadog, atau Dynatrace untuk monitoring. Selain kita melakukan monitoring, agar lebih efisien setup juga alerting!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c44ec92d9cf0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kitab Menjadi Top 10% Mahasiswa IT]]></title>
            <link>https://medium.com/@nasrullahpandu/kitab-menjadi-top-10-mahasiswa-it-261a48b41aa9?source=rss-13924de28996------2</link>
            <guid isPermaLink="false">https://medium.com/p/261a48b41aa9</guid>
            <category><![CDATA[college]]></category>
            <category><![CDATA[motivation]]></category>
            <dc:creator><![CDATA[Nasrullah Pandu Dewantara]]></dc:creator>
            <pubDate>Wed, 29 May 2024 16:45:16 GMT</pubDate>
            <atom:updated>2024-12-29T02:08:46.522Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Kuliah S1 4 tahun tapi lulus bingung mo ngapain, ga bahaya ta?</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GRhjKbgx83KRFnmw" /><figcaption>Photo by <a href="https://unsplash.com/@charlesdeloye?utm_source=medium&amp;utm_medium=referral">Charles DeLoye</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><blockquote>“Mas gw kuliah di IT 4 tahun, tapi pas lulus bingung mau ngapain”</blockquote><blockquote>“Mas gw daftar ke banyak perusahaan kok gada panggilan ya”</blockquote><blockquote>“Mas kenapa banyak perusahaan buka lowongan pemula tapi harus ada pengalaman ini itu, padahal gw daftar kan biar ada pengalaman?”</blockquote><p>Oke guys selamat datang kembali bersama nasrullah pandu! Di artikel ini kita akan bahas seperti apa realita mahasiswa khususnya IT di Indonesia apa aja yang harus dipersiapkan bagi mahasiswa yang mengambil di jurusan IT, agar ketika lulus skills dan knowledgenya sesuai dengan kebutuan di perusahaan.</p><p>Ibaratnya value rata-rata mahasiswa adalah level 7, tapi karena kamu sudah persiapkan dari awal, value kamu bisa di lvl 10 atau 11. Saya akan bantu kalian jadi top 10% mahasiswa IT di Indonesia!</p><p>Fenomena yang sering saya lihat adalah:</p><ol><li>Banyak mahasiswa IT ketika lulus skiilnya belum memenuhi standard kebutuhan perusahaan. Ini bisa dilihat dari dua sisi, dari sisi perusahaan perubahan teknologi yang begitu cepat, sedangkan dari kampus pembelajarannya tidak bisa mengikuti perkembangan teknologi dengan cepat karena kurikulum memang gabisa tiap bulan atau tahun diganti.</li><li>Atau yang lebih <strong>PARAH</strong> lagi udah atau mau lulus tapi bingung mau ngapain!!</li></ol><p>Akhirnya cari kerjaan yang gada hubungannya dengan coding, padahal dengan lu punya koding lu punya kuasa. Minimal scripting deh, sayang banget! Dengan coding sebenernya akan memudahkan pekerjaanmu, bukan menyulitkan pekerjaanmu. Ini mindset yang harus diubah untuk kaum IT ye.</p><p>Coba temen-temen bisa tebak berapa banyak lulusan IT Indonesia tiap tahunnya? Kata Mas Narenda Wicaksono, CEO Dicoding beliau bilang bahwa lulusan IT di Indonesia ga kurang dari 400.00 orang! Tapi sayang banget lulusan IT kita mayoritas belum memenuhi standard yang dibutuhkan di perusahaan. Kenapa bisa bilang gitu? Karena banyak banget freshgraduate IT yang panik kelabaan abis lulus kuliah bingung mau ngapain. Baca 2 point di atas.</p><p>Apakah udah terlambat? sebenernya gada kata terlambat untuk belajar ya, karena lebih baik terlambat daripada ga sadar dan ga peduli sama sekali, tapi temen-temen setuju ga kalo alangkah baiknya hal itu kita persiapin dari awal kuliah sehingga di akhir kuliah ga bingung mau fokus bagian mana dan mau ngapain.</p><p>Untuk mahasiswa semester 1–6 plis banget jangan terlalu santai, jangan mikir “ah masih awal nikmatin ajah kuliahnya, main dulu bro YOLO!” karena di situ lah masa dimana kita bisa curi start.</p><p>Step ke-0 nya adalah awal kuliah bisa cari passion ada dimana, karena di dunia IT ini sangat luas. Cari topik keahlian dimana nih.</p><p>Ngomong-ngomong soal passion, apa sih itu? sederhananya passion adalah</p><blockquote><em>“Passion adalah sesuatu dimana kalian rela untuk susah, bekerja keras, sampai investasi waktu atau uang lebih dan disitu kalian tetep ngerasa happy.”</em></blockquote><p>Oke terus gimana cara kita nemuin passionnya, bingung mau fokus di backend, frontend, QA, IT security, IoT, devops, mobile, atau data? Salah satu penyakit (atau apalah istilahnya) anak IT adalah pengen bisa di semua bidang dengan waktu yang cepat (jack all of trades) 🤯</p><p>Ya semangatnya bagus sih tapi kalo baru seminggu belajar backend terus seminggu kemudian belajar mobile dan seminggu kemudian belajar devops, metode belajar acak kaya gini bakal bikin kebakaran rambut karena terlalu banyak yang ditelen dan in the end bakal berhenti belajar karena bosen. Lagi-lagi gada yang salah dengan hal ini, memang kaya gini fase trial and errornya.</p><p>Pertanyaannya gimana cara belajar yang efektif agar bisa ketemu passion?</p><h3>Explore Everything!</h3><p>Yes, betul untuk ketemu sama passion kalian harus mencoba semua bidang di IT untuk ngeliat kecocokannya. Maksud explore di sini harus dengan “strategi” ya, bukan yang seminggu sekali ganti topik. Jadi, buat eksplorasimu menjadi <strong>terarah dan sistematis.</strong></p><p><strong>Pertama</strong>, cari tau roadmapnya biar belajarnya ga buta map. Pengen belajar backend, devops, data tapi ga ngerti apa yang mau dipelajarin gimana ceritanya. Roadmap kaya gini banyak banget di internet, temen-temen bisa buka <a href="https://roadmap.sh/">roadmap.sh</a> sebagai referensi. Paling ngga jadi ada gambaran, “oh kalo mau belajar DevOps ini toh yang harus dipelajarin”</p><p><strong>Kedua</strong>, mulai eksekusi jangan teori doang! bikin timeline belajar bisa per enam bulan atau per quarter (tiga bulan), per quarter lebih enak ya ngitungnya dan cukup untuk kenalan sama target bidang IT nya. Anggaplah pengen belajar devops, security, backend berarti atur tiga bulan pertama kenalan sama devops, tiga bulan berikutnya kenalan sama security terus sama backend.</p><p><strong>Ketiga</strong>, di fase belajar tiga bulan itu list dan breakdown topiknya. Misalnya kalo belajar devops berarti harus mau kenalan sama linux, jaringan, pemrograman, cloud, docker, kubernetes, etc. Atur satu bulan pertama untuk belajar linux dan jaringan, bulan dua belajar python atau go, bulan ketiga belajar docker. Yahh walaupun tiga bulan itu waktu yang sangat terlalu amat singkat untuk bisa menguasai satu bidang wkwk tapi paling ngga bisa kenalan dulu lah.</p><p>“Gampang kan? Iya gampang banget bang. ehh nanti dulu jangan asal main gampang aja. gua gampar lu!”</p><p>Biasanya nih ya, kalo temen-temen lagi belajar, lagi liatin tutorial di youtube atau online course ada saatnya merasa gada kemajuan dan bosen.</p><p><em>“Udah belajar if-else di python tapi ga ngerti kegunaannya gimana”</em></p><p><em>“Udah liat video tutorial yang ke-20 tapi lupa lagi sama video yang ke-11”</em></p><p><em>“ahh dah kelar nih belajar linux, tapi mau ssh ke server masih plonga plongo”</em></p><p><em>“ngerasa course python, linux, docker, api, kubernetes kelar dan bisa! tapi pas masuk ke new project kok bingung mulai dari mana mendadak kaya amnesia”</em></p><p>Nahh muter gitu terus, ngulang terus masalahnya. Kalo kalian merasakan hal itu, selamat temen-temen masuk ke dalam “tutorial hell”. Hal ini normal ya, nah untuk keluar dari zona ini saya sangat menyarankan untuk ….</p><h3>Build a Small Project!</h3><p>Saat belajar hal baru terutama di bidang software engineering, gabisa kalo cuma teori liat tutorial aja, mau diliatin 100x juga gabikin jago. Model belajar bikin small project yang aplikatif bikin belajarnya makin happy karena bisa langsung dipamerin atau paling ngga keliatan ada hasilnya. Ini bakal memunculkan semangat terus belajar hal baru lagi.</p><p>Anggap temen-temen lagi belajar mobile pake flutter atau kotlin, coba deh bikin aplikasi bebas apa aja. misal aplikasi cek cuaca. temen-temen mulai cari tau steps apa aja yang diperluin untuk bikin aplikasi itu. ohh ternyata mulai lagi buat fitur login, register, trus bisa cek cuaca hari, predeksi cuaca besok. Nah dari fitur login dicari lagi gimana sih caranya buat UI/UX fitur loginnya, di register dicari lagi gimana sih cara save data register ke database.</p><p>Atau kalo lagi belajar devops, cobain untuk deploy sebuah aplikasi ke server side. temen-temen mulai cari tau stepsnya cara deploy aplikasi mulai dari setup cloud server, ssh dulu ke servernya gimana, mau deploy manual atau pake docker atau pake kubernetes, trus monitoring aplikasi pakai apa.</p><p>Nahh temen-temen bisa liat dari small project ini aja bisa dapat banyak banget pengalaman loh! Kalo pas bikin small project stuck gimana? Ya buka dokumentasi resminya atau cari tutorialnya. Gitu terus aja polanya sampai terbiasa. Trust me, it works!</p><p>Beberapa point yang aku sampaikan ini adalah dari pengalamanku dalam belajar di dunia IT hingga akhirnya bisa berjodoh dengan devops dan IT security. 3 tahun lalu di 2020 saya juga suka loncat belajarnya, mulai dari belajar frontend bikin tampilan website tapi apalah daya jiwa seninya tumpul jadi ga cocok sama pekerjaan yang bersentuhan dengan desain 🙃 belajar mobile app asyik sih tapi dulu spek laptop ga begitu kuat wkwk sekarang spek udah kuat malah belum sempat nyentuh lagi. belajar IoT juga seru, tapi gamau repot sama printilan alat-alatnya. Akhirnya berjodohlah dengan devops dan security. “devops nih asyk lo bisa mengautomasi proses software development life cycle yang awalnya manual dan itu bisa deliver impact ke semua tim. security juga asyik nih ngejagain gimana biar sistem kita aman dan cobain bobol sistem sendiri.”</p><p>Setelah kita udah punya knowledge dan experience build small project, cobain juga ikut lomba lomba IT karena di situ akan hands on real case yg bisa improve skills.</p><p>Coba deh cari klik nya sama bidang IT yang lagi kalian cobain. misal belajar mobile app, kalian seneng aplikasinya dipublish di playstore/app store, atau aplikasinya digunain oleh banyak orang. Belajar frontend tampilan yang kalian buat diimplement di sebuah website dan lain lain. Temuin hal hal yang ngebikin kalian suka!</p><p>Di luar dari tips di atas, yang ga kalah penting adalah cari lingkungan yang supportif untuk berkembang. Temen yang bisa diajak diskusi, bikin project bareng, temen yang lebih pinter. Kita gabisa berkembang sendiri.</p><h3>Summary</h3><p>Oke sampai sini bisa kita simpulkan bahwa:</p><ol><li>Untuk bisa dapat passion di bidang IT, coba untuk explore semuanya dulu. Rasain ada rasa happy ga, mau susah kerja keras di bidang itu ga.</li><li>Tiap individu punya preferensi masing-masing. Ada yang suka banget sama tampilan desain, tapi ogah banget ngeliat command line di terminal makanya cocok di UI/UX atau frontend. Ada orangnya suka banget command line di terminal linux tapi jiwa seni tumpul makanya cocok di devops, backend, atau security.</li><li>Cari lingkungan yang support untuk diajak diskusi, belajar bareng, bikin project bareng.</li><li>Perlu temen-temen inget, setiap bidang yang kita coba pasti ada rintangan. Ada sisi dimana temen-temen stuck. tapi coba cek waktu stuck, happy ga solve issuesnya? antusias ga solve issuesnya? kalo iya, selamat temen-temen telah berjodoh!</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=261a48b41aa9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Prometheus Part 1 | Complete Guide to Best Practice Monitoring Your Infrastructure]]></title>
            <link>https://medium.com/@nasrullahpandu/prometheus-part-1-complete-guide-to-best-practice-monitoring-your-infrastructure-e98dda043739?source=rss-13924de28996------2</link>
            <guid isPermaLink="false">https://medium.com/p/e98dda043739</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[prometheus]]></category>
            <category><![CDATA[monitoring]]></category>
            <category><![CDATA[observability]]></category>
            <dc:creator><![CDATA[Nasrullah Pandu Dewantara]]></dc:creator>
            <pubDate>Wed, 29 May 2024 16:20:09 GMT</pubDate>
            <atom:updated>2024-05-29T16:20:09.012Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p0DRty-OmOYAAilPotP3-g.png" /><figcaption>Prometheus Logo</figcaption></figure><p>Hi, selamat datang kembali IT enthusiast! Semoga tetap semangat di kondisi tech winter yang mana banyak tech company menjadi kurang stabil dan banyak pekerja yang di <em>layoff.</em></p><p>Sebelum masuk materi ada tebak-tebakan buat temen-temen, jokes anak IT nya kena banget nih!</p><blockquote>Kenapa anak IT sering susah tidur?</blockquote><blockquote>Karena pikiran mereka terus berputar-putar di dalam <em>loop</em>.</blockquote><p>Hehe lupa dikasih break kali ya jadinya looping forever. Oke mari kita masuk ke materinya!</p><p>Disclaimer materi Prometheus ini dibagi menjadi 3 artikel supaya lebih mudah dipahami secara bertahap. Artikel pertama ini membahas tentang konsep dari Prometheus, artikel kedua membahas bagaimana cara mendeploy Prometheus menggunakan Helm Chart, dan artikel terakhir bagaimana cara kita memonitor aplikasi dengan Prometheus Exporter.</p><p>Agenda Prometheus part 1 akan lebih membahas teori konsep Prometheus.</p><ol><li>Apa itu Prometheus</li><li>Kapan dan Mengapa harus menggunakan Prometheus</li><li>Arsitektur Prometheus</li><li>Cara kerja Prometheus</li></ol><h4>Platform Monitoring Berbasis TSDB, Prometheus</h4><p>Prometheus adalah sistem monitoring dan pengumpulan metric dari server atau node yang berbasis Time Series Database (TSDB). Pertama kali dibuat oleh SoundCloud pada tahun 2012. Setelah itu Prometheus bergabung dengan Cloud Native Computing Foundation (CNCF) pada tahun 2016 sebagai project kedua yang dihosting, setelah Kubernetes. Sejak lulus dari Cloud Native Computing Foundation (CNCF) dan menjadi solusi pemantauan de facto untuk Kubernetes.</p><p>Prometheus umumnya digunakan untuk memonitor infrastruktur pada environment yang sifatnya dinamis seperti kubernetes atau docker swarm, dibilang sangat dinamis karena banyak komponen di dalamnya yang cepat dan sering berubah. Namun, kita juga bisa menggunakan prometheus ini untuk memonitor infrastuktur non container seperti bare metal.</p><p>Sebelum masuk bahasan lebih lanjut, mari kita bahas sebuah istilah yang akan sering dimention yaitu metric. Metric adalah data numerik yang merepresentasikan informasi terkait dengan kinerja, status, atau perilaku suatu entitas yang dipantau seperti penggunaan CPU, mem, berapa banyak request HTTP, atau kecepatan transfer data.</p><h4>Mengapa harus Prometheus</h4><p>Oke kita gali lebih detail lagi dengan 2 pertanyaan.</p><blockquote><strong>“mengapa infrastruktur yang kita miliki perlu dimonitor?”</strong></blockquote><blockquote><strong>“mengapa harus menggunakan prometheus untuk memonitor aplikasi microservices kita?”</strong></blockquote><p>Untuk menjawab 2 pertanyaan itu, anggaplah temen-temen mempunyai aplikasi microservices, yang mana kalau arsitekturnya adalah microservices maka setiap service akan berjalan secara independen dan dan terisolasi satu sama lain . Setiap service memiliki tanggung jawab bisnis yang terpisah dan dapat didevelop, diupdate, dan dideploy secara independen tanpa mempengaruhi service lainnya. Namun, meskipun setiap service berjalan secara independen, services tersebut masih perlu dapat berkomunikasi satu sama lain.</p><p>Salah satu problem yang sering terjadi, pasti temen-temen pernah merasakan menggunakan aplikasi yang lambat responsnya atau kegagalan koneksi yang mana hal tersebut mempengaruhi operasional bisnis perusahaan.</p><p>Kita sebagai software engineer mencari akar masalahnya dan ternyata karena arsitekturnya adalah microservices, ini menjadi tantangan besar untuk melihat akar masalahnya. Maka di sini lah awareness kita harus dibangun perlunya monitoring untuk setiap service yang memiliki metric server yang unik.</p><p>Dengan adanya monitoring ini, kita mulai dapat melihat pola dan tren yang mengarah ke akar masalah sehingga bisa mengantisipasi masalah-masalah pada aplikasi kita. Informasi berapakah CPU dan memory yang dikonsumsi pada service x, y, dan z? Bagaimana kondisi koneksi antar services x, y, dan z? Apakah CPU dan memory yang dialokasikan terlalu kecil, atau bahkan terlalu overkill untuk microservices kita?</p><p>Apalagi kalau aplikasi kita berjalan di Kubernetes yang didalamnya sering berubah-ubah seperti menambah atau mengurangi jumlah pod, node, dan menambah atau mengurangi resource secara otomatis. Tanpa monitoring , kita akan kesusahan mendapat informasi kesehatan dan masalah aplikasi microservice kita.</p><p>Oke kita akan coba elaborate lagi, temen2 pasti pernah mendengar istilah <em>out of memory</em> dimana suatu aplikasi kekurangan memori, atau <em>cpu bottleneck</em> terjadi ketika cpu sudah tidak cukup untuk menerima beban kerja yang diberikan. Maka di sinilah peran prometheus untuk mengantisipasi masalah itu. Prometheus memantau penggunaan memori dan mendeteksi apakah ada lonjakan tinggi pada memori. Prometheus juga bisa mengambil metric CPU, seperti CPU total, CPU per proses, CPU per container .</p><p>Menariknya dalam Prometheus terdapat fitur alerting, jadi ketika CPU atau memori yang digunakan sudah 80% maka akan mengirimkan alert ke telegram atau email sehingga sebagai software engineer bisa mengantisipasi masalah-masalah tersebut.</p><h4>Arsitektur Prometheus</h4><p>Untuk lebih memahami bagaimana arsitektur dan cara kerja Prometheus, let’s see gambar arsitektur Prometheus berikut ini, kita kan pelajari tiap komponennya.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1OgrQQ1puhyc5VIry_vVfQ.png" /></figure><p><strong>Komponen Prometheus:</strong></p><p><strong>1. Prometheus server:</strong> komponen utama pada Prometheus untuk mengumpulkan data server metric secara berkala dan menyimpannya. Terdapat 3 komponen lagi pada Prometheus server.</p><ul><li>Retrieval: untuk melakukan query dan mengambil data metric server monitor dari exporter.</li><li>TSDB: storage untuk menyimpan data monitor yang sudah didapat.</li><li>HTTP Server: menerima query, menyediakan web server api sehingga dapat ditampilkan di tools lain seperti grafana atau prometheus UI.</li></ul><p><strong>2. Exporter: </strong>sebuah service yang digunakan untuk mengekspos dari metric server, seperti penggunaan cpu atau memori yang nantinya akan dikumpulkan oleh Retrieval Prometheus server. Exporter ini ada banyak jenisnya seperti Node Exporter, Blackbox Exporter, ataupun membuat exporter sendiri sesuai dengan kebutuhan.</p><p><strong>3. Prometheus Targets: </strong>target ini bisa berupa aplikasi, layanan, server, atau komponen lain yang ingin Anda pantau. Target dalam Prometheus dapat dikonfigurasi secara manual melalui prometheus.yml atau secara otomatis melalui layanan service discovery. Ketika target dikonfigurasi secara manual, Anda harus menentukan endpoint (URL) dari target yang ingin dimonitor, beserta pengaturan seperti interval pengambilan data (scrape interval), dan konfigurasi label untuk lebih terorganisir target monitornya.</p><p><strong>4. Service Discovery: </strong>berbeda dengan konfigurasi prometheus.yml yang manual, mekanisme yang digunakan service discovery oleh prometheus memungkinkan untuk menemukan dan mengelola daftar target dinamis secara otomatis. Misalnya dalam konteks Kubernetes, Prometheus dapat menemukan dan memantau setiap layanan yang berjalan pada cluster tanpa perlu menambahkan secara manual ke konfigurasi Prometheus.</p><p><strong>5. Alert Manager: </strong>bertugas untuk menangani alert yang dikirimkan oleh Prometheus server dan mengirimkan alert tersebut melalui Email, Slack, atau Pagerduty.</p><p><strong>6. Data Visualization: </strong>prometheus memiliki web UI untuk melakukan query dan memonitor metric server dalam bentuk grafik. Namun, Prometheus ini juga bisa diintegerasikan dengan Grafana sebagai dashboard monitoring yang lebih menarik.</p><h4>Cara Kerja Prometheus</h4><p>Oke setelah kita sudah tahu komponen dan apa saja fungsi dari setiap komponen pada Prometheus, lalu coba kita munculkan pertanyaan ini untuk melanjutkan diskusi.</p><blockquote>Bagaimana cara kerja Prometheus? sehingga Prometheus ini bisa mengambil dan menyimpan data metric server?</blockquote><ol><li>Temen-temen inget bahwa Prometheus server di dalamnya terdapat data retrieval memiliki responsibility untuk melakukan pengambilan data atau scraping dari exporter yang telah dikonfigurasi dalam file prometheus.yml, setelah itu worker ini membaca konfigurasi Prometheus yang telah ditentukan atau dengan service discovery Prometheus akan mencari target yang secara automasi.</li><li>Setelah mengumpulkan data, Prometheus Server menyimpan data metrik ini dalam penyimpanan internalnya yang disebut Time Series Database (TSDB). Data tersebut disimpan dan diindeks dalam bentuk TSDB.</li><li>Data yang telah disimpan, diolah oleh HTTP server. Melalui HTTP server, kita dapat mengakses Web UI Prometheus atau mengirim permintaan query menggunakan PromQL melalui API HTTP. Ini memungkinkan untuk melihat visualisasi dan laporan tentang data metrik yang dikumpulkan. Selain itu, Grafana juga dapat terhubung ke Prometheus menggunakan Prometheus data source sehingga metric server dapat ditampilkan di Grafana Dashboard.</li><li>Pada Prometheus terdapat Alert Manager memiliki fitur alerting yang membuat kita daapat mengatur alerting rules berdasarkan kondisi tertentu pada data metric. Jika kondisi tersebut terpenuhi, Alert Manager akan memicu pengingat dan mengirimkan notifikasi ke sistem pengingat yang ditentukan, seperti email, pesan teks, atau integrasi dengan sistem lain seperti Slack atau PagerDuty.</li><li>Prometheus Server memiliki kebijakan data retention yang dapat dikonfigurasi. Data metrik yang lebih lama dari periode retensi yang ditentukan akan dihapus secara otomatis oleh Prometheus Server. Hal ini membantu kita sebagai Engineer dalam mengelola ukuran penyimpanan dan mencegah pertumbuhan data yang tidak terkendali.</li></ol><p>Kita lanjut ke pertanyaan berikutnya supaya lebih seru pembahasannya</p><blockquote>Bagaimana Prometheus bisa tahu server atau node mana dan kapan itu discrape metric servernya?</blockquote><p>Prometheus memiliki konfigurasi yang tersimpan pada prometheus.yml, dalam konfigurasi ini kita define apa saja target yang ingin dimonitor, seberapa sering prometheus scraping data bisa kita atur pada intervalnya ataupun memberikan label pada target monitornya. Kemudian dengan service discovery mencari target secara automasi.</p><p>Oiya ada satu hal yang tidak kalah penting lagi kalau kita membahas Prometheus yaitu<strong> Prometheus Query Language (PromQL)</strong>.</p><blockquote>PromQL adalah bahasa querying yang dirancang khusus untuk melakukan querying terhadap data metrics yang dikumpulkan oleh Time Series Database (TSDB)Prometheus.</blockquote><p>Yes, akhirnya kita sudah selesai dengan Prometheus Part 1, di artikel ini sudah dijelaskan teori terkait dengan Prometheus dan di Part 2 dan 3 kita akan lebih practical jadi stay tuned!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e98dda043739" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Open Source Tool | Azctl v1]]></title>
            <link>https://medium.com/@nasrullahpandu/open-source-tool-azctl-v1-90f0e7240d38?source=rss-13924de28996------2</link>
            <guid isPermaLink="false">https://medium.com/p/90f0e7240d38</guid>
            <category><![CDATA[azure-devops]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Nasrullah Pandu Dewantara]]></dc:creator>
            <pubDate>Tue, 28 May 2024 14:18:36 GMT</pubDate>
            <atom:updated>2024-05-28T14:18:36.216Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi guys, pada artikel ini saya akan sharing pengalaman membuat tool sederhana untuk melakukan list dan select Azure Subscription. Terinspirasi dari tools Kubectx dan Kubens, bagaimana kita bisa berpindah cluster atau namespace pada Kubernetes dengan cepat tanpa harus mengetikan full commandnya.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3U2qHTTylUwgVQqDg9KZpA.gif" /><figcaption>kubectx</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZUUWaAFlp6J5ZGNDO45wTg.gif" /><figcaption>kubens</figcaption></figure><p>Berawal dari banyak project menggunakan Azure, sehingga sering berpindah-pindah Azure subscription tapi kadang lupa gimana command untuk list subscription dan memilihnya, kadang mager juga untuk ngetik command panjang berkali kali. Kenapa ga kita buat tool untuk list semua subscription kemudian kita pilih tanpa harus repot mengetikkan command yang panjang? Maka hadirlah Azctl V1.</p><blockquote><strong>Azctl</strong> is a simple tool designed to streamline the management of Azure subscriptions, allowing users to switch between subscriptions easily and quickly.</blockquote><p>Azctl dibuat dengan Golang. Detail mengenai Azctl ada di repository ini: <a href="https://github.com/pandudw/azctl">https://github.com/pandudw/azctl</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1015/1*TRY8EsMT0tNszuL0E_GZ3A.png" /><figcaption>Azctl</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=90f0e7240d38" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>