<?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 Rudranil Sarkar on Medium]]></title>
        <description><![CDATA[Stories by Rudranil Sarkar on Medium]]></description>
        <link>https://medium.com/@rudranilsarkar?source=rss-ebad5943760e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*c14EsWgSF0pwm66u.</url>
            <title>Stories by Rudranil Sarkar on Medium</title>
            <link>https://medium.com/@rudranilsarkar?source=rss-ebad5943760e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 08:16:47 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rudranilsarkar/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[Designing a Secure Software Supply Chain for Modern Workloads: A Practical Guide to DevSecOps]]></title>
            <link>https://medium.com/@rudranilsarkar/designing-a-secure-software-supply-chain-for-modern-workloads-a-practical-guide-to-devsecops-140fb7c49327?source=rss-ebad5943760e------2</link>
            <guid isPermaLink="false">https://medium.com/p/140fb7c49327</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[devsecops]]></category>
            <category><![CDATA[software-supply-chain]]></category>
            <dc:creator><![CDATA[Rudranil Sarkar]]></dc:creator>
            <pubDate>Thu, 27 Aug 2026 05:09:34 GMT</pubDate>
            <atom:updated>2026-08-27T05:09:34.521Z</atom:updated>
            <content:encoded><![CDATA[<p>Modern software teams move fast. A developer pushes a change, the CI/CD pipeline picks it up, runs the tests, builds a container image, scans it, and deploys it to an environment. With a good pipeline, all of this can happen in just a few minutes. That speed is great for engineering teams, but it also creates a new security challenge. The same pipeline that helps us deliver software quickly can become a path into our production environment if it is not properly secured. Think about what a CI/CD pipeline can access. It may have access to source code, cloud accounts, container registries, deployment credentials, Kubernetes clusters, secrets, and production environments. If an attacker manages to compromise any part of that chain, the impact can go far beyond a single application.</p><p>The problem is not always a sophisticated attack. Sometimes it can be something as simple as a leaked AWS credential, a vulnerable open-source package, an insecure Docker image, a malicious dependency, or a pipeline with more permissions than it actually needs.</p><p>This is where <strong>software supply chain security</strong> becomes important.</p><p>Security should not start only when the application is ready to go to production. It needs to be considered from the moment code is written and committed, through the build process, dependency management, container creation, artifact storage, deployment, and finally the runtime environment.</p><p>This is the idea behind <strong>DevSecOps</strong> — bringing security into the normal software delivery process instead of treating it as a separate activity at the end.</p><p>In this article, we’ll walk through how to design a secure software supply chain for modern workloads, from <strong>source code all the way to production</strong>, and look at the security controls that can be applied at each stage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Hu3FOTvDhds_yi3E6nFJlA.png" /><figcaption>Secure Software Supply Chain for Modern Workloads</figcaption></figure><h4>What Does a Secure Software Supply Chain (CI / CD) Pipeline Look Like?</h4><p>When we talk about a secure CI/CD pipeline, it is easy to think that adding a security scanner to the pipeline is enough. In reality, security needs to be considered across the entire journey of an application — from the developer writing the code to the application running in production.</p><p>A typical pipeline might look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IgjvxGYOmnQFEH4CYxOQpA.png" /><figcaption>Secure CI CD</figcaption></figure><p>The important thing here is that <strong>security is not one single step</strong>.</p><p>For example, we might scan the source code and find nothing wrong. That doesn’t necessarily mean the application is safe. One of its dependencies could still have a known vulnerability. The code might be fine, but the Docker image could contain vulnerable operating-system packages. Even if the image is clean, the deployment could still be using excessive Kubernetes or cloud permissions.</p><p>This is why I prefer to think about CI/CD security as a series of checkpoints.</p><p>At the source-code level, we protect the repository with branch protection, code reviews, and secret scanning. During the build, we check the application code, dependencies, and infrastructure configuration. Once we create a container image, we scan it, generate an SBOM, and ideally sign the image so we can verify where it came from.</p><p>Before the application reaches production, we can add another layer of protection with deployment policies and approvals. Once it is running, security doesn’t stop there. Kubernetes RBAC, network policies, runtime security, logging, and monitoring continue to protect and detect issues in the production environment.</p><p>The main idea is simple:</p><blockquote><strong><em>Don’t rely on one security control. Build multiple layers of security throughout the software supply chain.</em></strong></blockquote><p>If one check misses something, another layer should have a chance to catch it before it becomes a production incident. This approach is commonly known as <strong>defence in depth</strong>, and it is one of the most important principles when designing a secure CI/CD pipeline. Now we will see few ways to secure our pipeline.</p><h4>I. Secure the Source Code Repository</h4><p>The source code repository is the starting point of the software supply chain. Everything that happens later in the CI/CD pipeline depends on what is stored there. If someone can make unauthorized changes to the code or the pipeline configuration, they may be able to influence what eventually gets deployed to production.<br>So, securing Git is not just about protecting the application code. We also need to protect things such as CI/CD workflows, Terraform files, Kubernetes manifests, Helm charts, and configuration files.<br>One of the first things to put in place is <strong>branch protection</strong>. Developers should normally work on their own branches and create a pull request when they are ready to merge their changes.</p><p><strong>For production-related repositories, I would normally enable controls such as:</strong></p><ul><li>Pull requests for changes</li><li>At least one or two reviewers</li><li>Required CI checks</li><li>Protection against force pushes</li><li>Restricted permissions for merging</li><li>CODEOWNERS for sensitive files</li><li>Secret scanning</li></ul><h4>II. Secure the CI Runner</h4><p>The CI runner is where the actual work of the pipeline happens. It checks out the code, runs tests, builds container images, performs security scans, and sometimes even deploys applications.<br>Because the runner executes commands from the pipeline, it is an important security boundary.<br>If an attacker manages to take control of a CI runner, they may be able to access source code, environment variables, build artifacts, credentials, or even cloud and Kubernetes resources. So, securing the runner is just as important as securing the application itself. Don’t treat the runner as a trusted machine</p><p>A common mistake is to use the same long-running server for every CI job. Over time, that runner can accumulate files, cached credentials, tools, Docker images, and other information from previous jobs. If one job is compromised, there is a possibility that an attacker could use something left behind by another job.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i8hO1Xzzt6uNOUwvMZI5vQ.png" /><figcaption>Runner</figcaption></figure><p>A better approach is to use <strong>ephemeral runners</strong> whenever possible. The runner is created for the job and removed afterwards. This gives us a clean environment for the next build.</p><h4>III. Implement Static Application Security Testing (SAST)</h4><p>Once we have secured the source repository and CI runner, the next step is to look at the application code itself.</p><p>This is where <strong>SAST (Static Application Security Testing)</strong> comes in.</p><p>SAST looks at the source code without actually running the application and tries to identify security problems before the code reaches production.</p><p>For example, a developer might write code that accidentally creates a SQL injection vulnerability, uses an unsafe function, exposes a hard-coded credential, or handles user input incorrectly. These problems may not be caught by normal unit tests because the application can still work as expected.</p><p>A SAST tool can help identify these issues during the CI process.</p><p>A simple pipeline could look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mLtlvgWkSfw0MA5bo0Q7qA.png" /><figcaption>SAST</figcaption></figure><p>Most developers are focused on making the application work. Security problems can sometimes be easy to miss during normal code reviews.</p><p>For example:</p><pre>query = &quot;SELECT * FROM users WHERE id=&quot; + user_id</pre><p>The code may work perfectly, but directly putting user input into a SQL query can create a security vulnerability.</p><p>A SAST tool can flag patterns like this and bring the problem to the developer’s attention before the application is deployed.</p><p>The earlier we find these issues, the easier and cheaper they are to fix.</p><h4>IV. Scan Dependencies</h4><p>Modern applications rarely depend only on the code written by our own developers. Almost every application uses open-source libraries, frameworks, packages, and other third-party components.</p><p>For example, a Python application might depend on:</p><p>Application<br> |<br> + — Django / FastAPI<br> + — requests<br> + — cryptography<br> + — PyJWT<br> + — Other Python packages</p><p>The application may be working perfectly, but one of these dependencies could contain a known security vulnerability.<br>This is why <strong>dependency scanning</strong> is an important part of a secure software supply chain.<br>Imagine your application uses a library that has a serious vulnerability. Your team may not have written a single line of the vulnerable code, but your application is still affected because it uses that library.</p><p>For example:</p><pre>Your Application<br>       |<br>       v<br>Third-party Library<br>       |<br>       v<br>Known Vulnerability<br>       |<br>       v<br>Your Application is potentially exposed</pre><p>Without dependency scanning, this vulnerability might remain unnoticed until someone discovers it in production. Dependency scanning helps us identify these problems earlier.</p><h4>V. Scan Container Images</h4><p>Today, many applications are packaged and deployed as container images. We build the image in CI, push it to a container registry, and then deploy that same image to Kubernetes or another runtime environment.</p><p>Because the container image eventually runs in production, we should not assume that a successful Docker build means the image is secure.</p><p>A container image can contain vulnerable operating-system packages, outdated libraries, unnecessary tools, or insecure configurations. This is why <strong>container image scanning</strong> should be part of the CI/CD pipeline.</p><p>What can go wrong inside a container?</p><p>Consider a simple application:</p><pre>Container Image<br>      |<br>      +-- Application<br>      +-- Python / Node / Java<br>      +-- OpenSSL<br>      +-- Linux packages<br>      +-- Third-party libraries<br>      +-- Other system utilities</pre><p>Your application code might be perfectly secure, but the underlying image could still contain a known vulnerability.</p><p>For example:</p><pre>Dockerfile<br>    |<br>    v<br>Build Image<br>    |<br>    v<br>Container Image<br>    |<br>    v<br>Vulnerability Scan</pre><p>The scanner checks the contents of the image and compares the installed packages and libraries against known vulnerability databases.Run the scan before pushing to production</p><p>A good place to perform the scan is during the CI pipeline, before the image is promoted to a production registry or environment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uRYwhxgvIdxVQchxGCFWqg.png" /><figcaption>scan image</figcaption></figure><p>This gives us an opportunity to fix the problem before the vulnerable image reaches production.</p><p>Tools for container scanning<br>There are several tools that can be used for container security scanning, such as:</p><ul><li><strong>Trivy</strong></li><li><strong>Grype</strong></li><li><strong>Snyk</strong></li><li>Cloud-provider container registry scanners</li></ul><h4>VI. Generate an SBOM</h4><p>When we build an application, it is usually made up of much more than the code our developers have written. We use frameworks, open-source libraries, operating-system packages, base images, and other third-party components.</p><p>The problem is that once an application is running in production, it can be difficult to remember exactly what went into it.</p><p>This is where an <strong>SBOM (Software Bill of Materials)</strong> becomes useful.</p><p>You can think of an SBOM as an ingredient list for your application. It tells us what components are inside the software we are building and deploying.</p><p>Instead of simply saying:</p><blockquote><em>“We deployed version 1.5 of the application.”</em></blockquote><p>we can also know exactly what version of each dependency was included in that release.</p><p>Imagine that a serious vulnerability is discovered in a library called ‘fast-api’.</p><p>Without an SBOM, the first question might be:</p><blockquote><em>“Which applications are using this library?”</em></blockquote><p>The security or platform team may then have to search through repositories, container images, and deployment environments to find the answer.</p><p>With an SBOM, this becomes much easier.</p><pre>New Vulnerability<br>       |<br>       v<br>Affected Library<br>       |<br>       v<br>Search SBOM Inventory<br>       |<br>       +---- Application A<br>       +---- Application B<br>       +---- Application C</pre><p>Depending on the format and tool, an SBOM can contain information such as:</p><ul><li>Component name</li><li>Component version</li><li>Package type</li><li>Dependencies</li><li>Package identifiers</li><li>License information</li><li>Vulnerability-related metadata</li></ul><p>Common SBOM formats<br>Two commonly used formats are:</p><ul><li><strong>CycloneDX</strong></li><li><strong>SPDX</strong></li></ul><h4>VII. Add Manual Approval for Production</h4><p>When we talk about CI/CD, one of the main goals is to automate as much as possible. Developers should not have to manually build an application, copy files to a server, or run deployment commands every time.</p><p>But <strong>automation doesn’t necessarily mean that every production change should happen without any human involvement</strong>.</p><p>Production is different from development or testing environments. A small configuration change, database migration, IAM change, or infrastructure update can have a much larger impact when it reaches production.</p><p>This is where <strong>manual approval</strong> can be useful.</p><h4>VIII. Separate CI and CD Responsibilities</h4><p>As applications become more distributed, the CI/CD pipeline also becomes more important from a security perspective. Modern workloads may involve containers, Kubernetes, cloud infrastructure, multiple environments, and several different teams.</p><p>Because of this, it is a good practice to <strong>separate the responsibilities of Continuous Integration (CI) and Continuous Delivery/Deployment (CD)</strong>.</p><p>The idea is simple:</p><blockquote><strong><em>CI should focus on proving that the software is safe and ready to be released. CD should focus on safely delivering that approved software to the right environment.</em></strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9CK6vqevI0CLD-z9CjyBAg.png" /><figcaption>CD</figcaption></figure><p>Tools such as Argo CD can continuously compare the desired state stored in Git with what is actually running in Kubernetes.</p><p>In this model, CI doesn’t necessarily need direct access to the Kubernetes API.</p><p>Instead, CI can update the deployment configuration, and the GitOps controller handles the deployment.</p><p>This can significantly reduce the blast radius of a compromised CI runner.</p><p>Separating CI and CD is not just an organizational preference. It is also a security control.</p><p>It allows us to:</p><ul><li>Reduce the permissions of CI runners</li><li>Keep production credentials away from build jobs</li><li>Build and test an artifact once</li><li>Promote the same artifact across environments</li><li>Create a clear audit trail</li><li>Reduce the blast radius of a compromised pipeline</li><li>Make production deployments more controlled</li></ul><p>For modern workloads, especially containerized and Kubernetes-based environments, <strong>build once, verify once, and promote the same trusted artifact</strong> is a much stronger approach than allowing every stage of the pipeline to rebuild and directly access production.</p><h3>Conclusion</h3><p>A secure CI/CD pipeline is not about adding a security scan at the end of the deployment process. It is about building security into every step, starting from the source code and continuing all the way to production.</p><p>A good pipeline should give us confidence at each stage: the code has been reviewed, secrets have not been exposed, dependencies have been checked, the container image has been scanned, the artifact can be trusted, and the deployment has the right security controls around it.</p><p>The important thing is to <strong>build multiple layers of security instead of depending on a single tool or security check</strong>. If one layer misses something, another layer should have a chance to catch it.</p><p>In the end, a secure CI/CD pipeline should help the team move fast without losing control of what is being built, where it is going, and what is running in production.</p><blockquote><strong><em>The goal is not to slow down delivery with security. The goal is to make secure delivery the normal way of delivering software.</em></strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=140fb7c49327" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kubernetes Security Defence in Depth: Protecting Your Cluster Layer by Layer]]></title>
            <link>https://medium.com/@rudranilsarkar/kubernetes-security-defence-in-depth-protecting-your-cluster-layer-by-layer-07d28bdb6688?source=rss-ebad5943760e------2</link>
            <guid isPermaLink="false">https://medium.com/p/07d28bdb6688</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[audit]]></category>
            <category><![CDATA[kubernetes-security]]></category>
            <category><![CDATA[cloud-native-security]]></category>
            <dc:creator><![CDATA[Rudranil Sarkar]]></dc:creator>
            <pubDate>Sun, 23 Aug 2026 09:25:39 GMT</pubDate>
            <atom:updated>2026-08-23T09:25:39.247Z</atom:updated>
            <content:encoded><![CDATA[<p>When we talk about securing Kubernetes, the first things that usually come to mind are RBAC, NetworkPolicies, Pod Security, image scanning, and maybe a few security tools.</p><p>But there is a bigger question we often forget to ask:<br>What happens if one of these security controls fails?</p><p>Imagine an attacker manages to compromise one of the applications running inside your Kubernetes cluster. Does that automatically mean they can access other applications? Can they read Kubernetes Secrets? Can they talk to the Kubernetes API? Can they create a privileged pod? Can they move from one namespace to another?</p><p>Ideally, the answer should be <strong>no</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZsLI1MM8dwcHyelRBuYIyg.png" /><figcaption>Kubernetes — Defence in Depth</figcaption></figure><p>This is where the idea of <strong>Defence in Depth</strong> becomes important.</p><p>Instead of depending on a single security control, we build multiple layers of security inside the Kubernetes cluster. Each layer has a different responsibility. If one layer is bypassed, the next layer should make it harder for the attacker to move further.</p><p>For example, RBAC can restrict what a user or ServiceAccount can do through the Kubernetes API. NetworkPolicies can restrict which workloads can communicate with each other. Pod security can prevent workloads from running with unnecessary privileges. Runtime security can detect suspicious behaviour after a container is already running.</p><p>The goal is not to make Kubernetes impossible to attack — that is unrealistic.</p><p>The goal is to <strong>reduce the attack surface, limit the blast radius, detect suspicious activity, and make it difficult for an attacker to move deeper into the cluster.</strong></p><p>In this article, I’ll focus specifically on <strong>security controls inside the Kubernetes cluster</strong> and walk through the different layers we can use to build a defence-in-depth architecture.</p><h3>1. Container Security</h3><p><strong>I. Minimal Base Image</strong><br>The first thing we should think about is the base image. <br>A container image doesn’t need to contain an entire operating system with every possible utility installed. It should contain only what the application needs to run.<br>For Example:</p><pre>FROM python:3.12</pre><p>is larger than:</p><pre>FROM python:3.12-slim</pre><p>The slim image removes many packages that aren&#39;t normally required to run a Python application.</p><p><strong>II. Distoless image</strong></p><p>Distroless images are minimalist container base images that contain only your application and its direct runtime dependencies.<br>Key Characteristics</p><ul><li><strong>No Shell:</strong> You cannot run docker exec or kubectl exec to enter a shell inside the container.</li><li><strong>No Package Manager:</strong> Tools like apt or apk are absent, preventing runtime package installation.</li><li><strong>Small Size:</strong> Stripped-down footprints reduce storage needs and vulnerability scanner noise.</li></ul><p><strong>III. Run as a Non-Root User</strong></p><p>This is one of the most important Dockerfile security controls<br>By default, many containers can run as root.<br>For example:</p><pre>FROM python:3.12-slim<br><br>COPY app.py /app/<br><br>CMD [&quot;python&quot;, &quot;/app/app.py&quot;]</pre><p>If no USER is specified, the process may run as root.</p><p>You should instead create a dedicated user:</p><pre>RUN useradd \<br>    --uid 10001 \<br>    --create-home \<br>    appuser<br><br>USER 10001</pre><p>The application doesn’t need root privileges just to serve HTTP requests. Suppose your application has a vulnerability, If the application runs as root, the attacker starts with very high privileges inside the container. the attacker’s initial privileges are much more limited. This is an important <strong>blast-radius reduction</strong> technique.<br>Above are fews technique to secure your docker images or container.</p><h3>2. Pod Security</h3><p>A secure container image is only the first step. Once the container runs inside Kubernetes, we also need to control <strong>what it is allowed to do</strong>. Pod Security helps prevent workloads from running with unnecessary privileges, such as root access, privileged mode, excessive Linux capabilities, writable filesystems, or unrestricted access to the Kubernetes API. The goal is simple: <strong>give each Pod only the permissions it needs, so that even if an application is compromised, the attacker’s ability to move further is limited.</strong></p><pre>apiVersion: v1<br>kind: Pod<br>metadata:<br>  name: secure-app<br>  labels:<br>    app: secure-app<br><br>spec:<br>  # Don&#39;t automatically mount the ServiceAccount token<br>  automountServiceAccountToken: false<br><br>  # Pod-level security settings<br>  securityContext:<br>    runAsNonRoot: true<br>    runAsUser: 10001<br>    runAsGroup: 10001<br>    fsGroup: 10001<br>    seccompProfile:<br>      type: RuntimeDefault<br><br>  containers:<br>    - name: app<br>      image: myregistry.example.com/myapp:v1.0.0<br><br>      # Container-level security<br>      securityContext:<br>        allowPrivilegeEscalation: false<br>        privileged: false<br>        readOnlyRootFilesystem: true<br><br>        capabilities:<br>          drop:<br>            - ALL<br><br>      ports:<br>        - containerPort: 8080<br><br>      resources:<br>        requests:<br>          cpu: &quot;100m&quot;<br>          memory: &quot;128Mi&quot;<br>        limits:<br>          cpu: &quot;500m&quot;<br>          memory: &quot;512Mi&quot;</pre><p><strong>I. Security Context Pod level as well as container level<br></strong>In Kubernetes, securityContext can be configured at both the <strong>Pod level</strong> and the <strong>container level</strong>. Pod-level settings provide defaults for containers within the Pod, while container-level settings allow you to apply more specific security controls to an individual container. This gives us fine-grained control over how workloads run. Below Iam showing how you can apply at container level</p><pre># containers:<br>  - name: app<br>    image: myapp:v1<br><br>    securityContext:<br>      runAsUser: 10001<br>      runAsGroup: 10001<br>      runAsNonRoot: true<br>      allowPrivilegeEscalation: false<br>      privileged: false<br>      readOnlyRootFilesystem: true<br>      capabilities:<br>        drop:<br>          - ALL<br>      seccompProfile:<br>        type: RuntimeDefault</pre><p>The securityContext in this container is designed to follow the <strong>principle of least privilege</strong>. runAsUser: 10001 and runAsGroup: 10001 make the application run with a non-root UID and GID, while runAsNonRoot: true ensures the container cannot run as root. allowPrivilegeEscalation: false prevents the process from gaining additional privileges, and privileged: false prevents the container from running with extended access to the host. readOnlyRootFilesystem: true makes the container&#39;s root filesystem read-only, reducing the ability of an attacker to modify files after compromising the application. capabilities.drop: [ALL] removes unnecessary Linux capabilities, and seccompProfile: RuntimeDefault restricts potentially dangerous system calls. Together, these settings reduce the container&#39;s privileges and help limit the impact if the application is compromised running inside the Pod.</p><p><strong>II. Don’t Automatically Mount the ServiceAccount Token</strong></p><p>A Pod may receive a ServiceAccount token that allows it to authenticate with the Kubernetes API. However, not every application needs to communicate with Kubernetes. If an attacker compromises an application that has a ServiceAccount token, they may try to use that token to access the Kubernetes API and perform actions based on the ServiceAccount’s RBAC permissions. To reduce this attack surface, disable automatic token mounting when the application does not need Kubernetes API access:</p><pre>spec:<br>  automountServiceAccountToken: false</pre><p>This creates an additional security boundary: even if the application is compromised, there is no unnecessary Kubernetes API credential available inside the Pod. If the application genuinely needs to interact with the Kubernetes API, use a <strong>dedicated ServiceAccount with the minimum RBAC permissions required</strong> rather than giving the workload broad cluster permissions.</p><pre>Application Pod<br>      |<br>      | No Kubernetes API required<br>      v<br>automountServiceAccountToken: false<br>      |<br>      X<br>Kubernetes API access</pre><p>The principle is simple: <strong>don’t give a workload a Kubernetes credential unless it actually needs one.</strong></p><p><strong>III. Use Resource Requests and Limits</strong></p><p>This isn’t strictly a container-privilege control, but it’s important for workload isolation.</p><pre>resources:<br>  requests:<br>    cpu: &quot;100m&quot;<br>    memory: &quot;128Mi&quot;<br><br>  limits:<br>    cpu: &quot;500m&quot;<br>    memory: &quot;512Mi&quot;</pre><p>Why is this relevant to security?</p><p>Imagine one compromised or badly configured workload consumes:</p><pre>100% CPU<br>100 GB memory</pre><p>It could affect other workloads on the node. Resource controls help reduce the impact of noisy or runaway workloads.</p><p>For production environments, also consider:</p><ul><li>LimitRange</li><li>ResourceQuota</li><li>namespace-level resource controls</li></ul><h3>3. Network Security</h3><p>In a Kubernetes cluster, Pods are constantly communicating with other Pods, services, databases, and external systems. The problem is that not every workload should be able to communicate with everything else. If one Pod is compromised and the network is completely open, an attacker may use it to move laterally through the cluster. Kubernetes network security is therefore about <strong>controlling who can talk to whom, which ports are allowed, and where workloads can send traffic</strong>. By using controls such as NetworkPolicies, namespace isolation, ingress and egress restrictions, and CNI-level security, we can follow a simple principle: <strong>deny unnecessary communication and allow only the traffic that the application actually needs.</strong></p><p><strong>I. Pod to Pod Communication</strong></p><p>By default, <strong>Kubernetes Pod-to-Pod traffic is not necessarily encrypted</strong>. NetworkPolicy can control <strong>whether</strong> Pods are allowed to communicate, but it does not itself encrypt the traffic. If sensitive data such as credentials, tokens, or personal information is exchanged between services, we should consider encrypting the traffic <strong>in transit</strong>.</p><p>A common approach is to use <strong>mTLS (mutual TLS)</strong>, where both the client and server authenticate each other and the communication is encrypted:</p><p>For example, a service-mesh (consule, linkerd, Istio) or a CNI such as <strong>Cilium</strong> can provide encryption between workloads. With Cilium, <strong>IPsec or WireGuard</strong> can be used to encrypt traffic between nodes, while mTLS can provide application-level encryption and identity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P2etcvt0iOq40yhL4H5R5g.jpeg" /><figcaption>Secured Pod to Pod communication</figcaption></figure><p><strong>II. Network Policy</strong></p><p>Kubernetes NetworkPolicy controls which Pods are allowed to communicate with each other. <strong>Cilium</strong> acts as the networking and policy enforcement layer, using eBPF to enforce these rules at the node level. For example, if we allow only the frontend Pod to communicate with the backend, Cilium will inspect the traffic and allow matching connections while dropping unauthorized traffic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZzmoYPTRsuVO0zqlqPQ0kg.jpeg" /><figcaption>Network policy</figcaption></figure><p>If an unauthorized Pod tries to connect to backend, the traffic is <strong>dropped by Cilium&#39;s policy enforcement</strong>, so it doesn&#39;t reach the backend application.</p><p>The key idea is:</p><blockquote><strong><em>NetworkPolicy defines what communication is allowed; Cilium enforces that policy in the networking datapath.</em></strong></blockquote><p>With Cilium, you can go beyond basic Kubernetes NetworkPolicy and implement more advanced controls such as <strong>identity-based policies, DNS-aware policies, and Layer 7 policies</strong>.</p><h3>4. Role-Based Access Control (RBAC)</h3><p>Kubernetes <strong>RBAC</strong> (Role-Based Access Control) is simply a digital security badge system for your cluster.</p><p>Instead of giving everyone full master access, RBAC lets you decide <strong>who</strong> (User/Service) can do <strong>what</strong> (Verbs: get, create, delete) to <strong>which items</strong> (Resources: pods, services, secrets).</p><h4>The 4 Core Building Blocks</h4><p>Think of RBAC as an equation: <strong>Who</strong> gets <strong>Which Permissions</strong>?</p><ol><li><strong>Role</strong>: The permission list for a <em>specific room</em> (a single namespace).</li><li><strong>ClusterRole</strong>: The permission list for the <em>entire building</em> (all namespaces across the cluster).</li><li><strong>RoleBinding</strong>: Attaching a Role to a specific person or application inside a namespace.</li><li><strong>ClusterRoleBinding</strong>: Attaching a ClusterRole to a person or application across the whole cluster.</li></ol><h4>Real-World Example: “The Intern”</h4><p>Imagine you hired a developer named <strong>Alex</strong>. You want Alex to be able to <strong>view and restart pods</strong> in the development namespace, but <strong>NOT delete databases</strong> or touch the production namespace.</p><p><strong>Step I: Define the Permissions (The Role)</strong></p><p>Create a Role that defines what actions are allowed.</p><pre>apiVersion: rbac.authorization.k8s.io/v1<br>kind: Role<br>metadata:<br>  namespace: development<br>  name: pod-reader<br>rules:<br>- apiGroups: [&quot;&quot;] # &quot;&quot; indicates the core API group<br>  resources: [&quot;pods&quot;, &quot;pods/log&quot;]<br>  verbs: [&quot;get&quot;, &quot;watch&quot;, &quot;list&quot;] # Can view, but CANNOT create or delete</pre><h4>Step II: Assign the Role to Alex (The RoleBinding)</h4><p>Connect Alex’s account to the pod-reader Role you just created.</p><pre>apiVersion: rbac.authorization.k8s.io/v1<br>kind: RoleBinding<br>metadata:<br>  name: read-pods-alex<br>  namespace: development<br>subjects:<br>- kind: User<br>  name: alex@company.com<br>  apiGroup: rbac.authorization.k8s.io<br>roleRef:<br>  kind: Role<br>  name: pod-reader<br>  apiGroup: rbac.authorization.k8s.io</pre><h4>How Kubernetes Checks Access</h4><p>When Alex runs a command, Kubernetes checks three things:</p><ul><li>Who are you? (Authentication: “I am Alex”)</li><li>What are you trying to do? (Action: kubectl delete pod web-app)</li><li>Does a RoleBinding allow it? (Authorization: “No, pod-reader only allows get, watch, and list.&quot;)</li></ul><p>Result: Error from server (Forbidden): pods &quot;web-app&quot; is forbidden</p><h3>5. Admission Control &amp; Policy Enforcement</h3><p>Even if we secure our container image, Pod configuration, RBAC, and network policies, a developer could still accidentally deploy an insecure workload. <strong>Admission control</strong> provides a security gate between a Kubernetes API request and the actual creation of the resource. Before a Pod is accepted, we can enforce policies such as <strong>running as non-root, preventing privileged containers, requiring resource limits, using approved image registries, and requiring security settings</strong>. If the request violates the policy, Kubernetes rejects it before the workload is created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-6E0_VWzY1cZM1iIQh3Vbg.png" /><figcaption>Admission control</figcaption></figure><p>This makes admission control an important <strong>preventive layer</strong> in Kubernetes Defence in Depth: instead of discovering an insecure Pod after deployment, we <strong>stop it from entering the cluster in the first place</strong>. Common solutions include <strong>Pod Security Admission, Kyverno, and Open Policy Agent/Gatekeeper</strong>.</p><h3>6. Secrets Security</h3><p>Kubernetes Secrets are used to store sensitive information such as <strong>database passwords, API keys, TLS certificates, OAuth tokens, and credentials</strong>. However, creating a Kubernetes Secret does not automatically make the information completely secure. A Secret can still be exposed through Git repositories, overly permissive RBAC, compromised Pods, etcd access, logs, or poor application practices. Therefore, Secret security should be treated as a <strong>defence-in-depth problem</strong>, where multiple security controls protect the Secret at different stages.</p><p><strong>I. Protect Secrets Using RBAC</strong></p><p>Protecting Kubernetes Secrets with RBAC comes down to applying the <strong>Principle of Least Privilege</strong>: strictly limiting who can view, create, or modify confidential data.</p><p>Because Kubernetes Secrets are only Base64-encoded (not natively encrypted at rest by default), anyone with get or list permissions can easily decode them into plain text.</p><p><strong>Key RBAC Rules for Secrets</strong></p><ul><li><strong>Block </strong><strong>list and </strong><strong>watch permissions for developers:</strong> A user with list access can read <em>every</em> Secret in the namespace at once. Limit developers to get on specific named Secrets if necessary, or restrict Secret access entirely.</li><li><strong>Restrict </strong><strong>wildcard (*) permissions:</strong> Avoid granting verbs: [&quot;*&quot;] or resources: [&quot;*&quot;] in any environment, as this automatically grants access to read and delete Secrets.</li><li><strong>Separate ConfigMaps from Secrets:</strong> Place non-sensitive configuration in ConfigMaps so users don’t need access to Secrets just to inspect app settings.</li><li><strong>Control Escalation:</strong> Restrict the bind and escalate verbs on Roles to prevent unauthorized users from granting themselves elevated Secret access.</li></ul><p><strong>II. External Secrets Operator</strong></p><p>To eliminate direct human access to Kubernetes Secrets altogether:</p><ol><li>Store sensitive credentials in an external vault (e.g., AWS Secrets Manager, HashiCorp Vault, Azure Key Vault).</li><li>Install the <strong>External Secrets Operator (ESO)</strong> in your cluster.</li><li>Grant only the ESO controller permission to create/update Kubernetes Secrets automatically via RBAC.</li><li>Block human users completely from reading Secrets inside the cluster.</li></ol><p><strong>III. Use Dedicated ServiceAccounts</strong></p><p>Dedicated ServiceAccounts follow the principle of least privilege by ensuring every application inside a Kubernetes cluster operates using its own isolated identity and minimal permissions rather than defaulting to the overly permissive default ServiceAccount.</p><ul><li><strong>Create 1 ServiceAccount per Workload:</strong> Assign individual accounts to microservices (e.g., payment-service-sa, order-service-sa).</li><li><strong>Disable Token Automounting:</strong> Turn off automatic API token mounting unless the app explicitly needs to interact with the Kubernetes API server.</li><li><strong>Bind Tight Roles:</strong> Attach granular Roles or ClusterRoles using RoleBindings restricted only to the specific resources and verbs the workload requires.</li></ul><h3>7. NodeGroup Security</h3><p>Securing your Kubernetes <strong>Nodes</strong> (the actual worker VMs or bare-metal servers running your workloads) is like securing the physical foundation of a building — if the node gets compromised, every pod living on top of it is at risk.</p><p>To lock down your nodes effectively, focus on these four main areas:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L37r7UPTWpgQDgg-n0cJNA.png" /><figcaption>Node Security</figcaption></figure><p><strong>I. The Operating System (Host Hardening)</strong></p><ul><li><strong>Use Minimal OS:</strong> Ditch heavy distributions like standard Ubuntu or RHEL. Use immutable, container-optimized operating systems like <strong>Flatcar Container Linux</strong>, <strong>Bottlerocket</strong>, or <strong>Talos Linux</strong>. They have fewer packages, less attack surface, and a read-only root filesystem.</li><li><strong>Apply CIS Benchmarks:</strong> Run security auditing tools like kube-bench to automatically check your host OS against the official CIS (Center for Internet Security) Kubernetes benchmarks.</li><li><strong>Kernel Protections:</strong> Enable standard Linux kernel security modules like <strong>AppArmor</strong> or <strong>SELinux</strong> to restrict process actions on the host.</li></ul><p><strong>II. Kubelet Configuration</strong></p><p>The kubelet is the node&#39;s agent that talks directly to the Kubernetes control plane. A misconfigured kubelet is a huge security hole.</p><ul><li><strong>Disable Anonymous Auth:</strong> Set --anonymous-auth=false so unauthorized requests are rejected immediately.</li><li><strong>Enforce Webhook Authorization:</strong> Set --authorization-mode=Webhook so the API server controls what the Kubelet is allowed to do.</li><li><strong>Disable the Read-Only Port:</strong> Turn off port 10255 (--read-only-port=0), which traditionally exposed unauthenticated cluster info.</li></ul><p><strong>III. Network &amp; Access Limits</strong></p><ul><li><strong>SSH Access:</strong> Turn off SSH entirely if possible. If you must have it, restrict access via bastions/VPNs, use short-lived SSH keys (or tools like Teleport), and disable root login.</li><li><strong>Node Firewalling:</strong> Restrict node ports so only authorized internal traffic can reach Kubelet (port 10250) and NodePort services.</li><li><strong>Restrict Cloud Metadata Access:</strong> Block pods from reaching the cloud provider metadata endpoint (e.g., 169.254.169.254 on AWS/GCP) to prevent pods from stealing host IAM credentials.</li></ul><p><strong>IV. Container Runtime Security</strong></p><ul><li><strong>Isolate High-Risk Workloads:</strong> For untrusted code, don’t rely on standard container isolation alone. Use sandboxed container runtimes like <strong>gVisor</strong> or <strong>Kata Containers</strong> to create a stronger boundary between the pod and the host kernel.</li><li><strong>Runtime Monitoring:</strong> Deploy tools like <strong>Falco</strong> directly on the node to monitor Linux system calls in real-time. It detects suspicious host activity like unauthorized shell spawns, modified system files, or unexpected network connections.</li></ul><h3>8. Monitoring and Incident Response</h3><p>Monitoring and Incident Response in Kubernetes require shifting from standard server monitoring to container-native observability and rapid, automated threat containment. Because Kubernetes environments are highly ephemeral, logs and metrics must be captured instantly before pods terminate and evidence is lost. Below things we can track</p><ul><li><strong>Control Plane &amp; Audit Logs:</strong> Track API server calls to detect unauthorized privilege escalation, unexpected RBAC changes, or suspicious exec commands into pods.</li><li><strong>Worker Node Systems:</strong> Monitor host-level system calls, CPU/memory spikes, and unauthorized file accesses using node agents like Falco or Node Exporter.</li><li><strong>Pod &amp; Workload Health:</strong> Keep track of OOMKilled events, CrashLoopBackOff states, and unexpected outbound network traffic (egress) using Prometheus and cAdvisor.</li><li><strong>Network &amp; Service Mesh Traffic:</strong> Observe real-time HTTP/gRPC flows, latency, and packet drops using eBPF tools like Cilium Hubble.</li></ul><h3><strong>Conclusion</strong></h3><p><strong>Kubernetes Security is Not a Tool, It is an Architecture.</strong></p><p>True Kubernetes security isn’t about choosing one “perfect” product. It is an intricate, layered defense-in-depth architecture. You are not just deploying a collection of security controls; you are orchestrating them to work in concert.</p><p>A mature security posture requires a shift in mindset. Instead of asking which security tool to install, the fundamental question for your production platform design must be:</p><blockquote><strong><em>“If this control fails, what is my </em>next<em> line of defense?”</em></strong></blockquote><p>This proactive approach forms the foundation of a robust Kubernetes security architecture. It ensures multiple, independent layers provide comprehensive protection — encompassing prevention, least privilege, segmentation, detection, and rapid automated response.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=07d28bdb6688" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Day in the Life of an SRE: What We Really Do]]></title>
            <link>https://medium.com/@rudranilsarkar/a-day-in-the-life-of-an-sre-what-we-really-do-365ab15a704e?source=rss-ebad5943760e------2</link>
            <guid isPermaLink="false">https://medium.com/p/365ab15a704e</guid>
            <category><![CDATA[sre]]></category>
            <category><![CDATA[site-reliability-engineer]]></category>
            <category><![CDATA[monitoring]]></category>
            <dc:creator><![CDATA[Rudranil Sarkar]]></dc:creator>
            <pubDate>Sat, 22 Aug 2026 06:11:48 GMT</pubDate>
            <atom:updated>2026-08-22T06:11:48.804Z</atom:updated>
            <content:encoded><![CDATA[<h3>What is site reliability engineering?</h3><p>Site Reliability Engineering (SRE) is an approach to running software systems reliably by combining software engineering with IT operations. Instead of relying heavily on manual operational work, SRE teams use automation, monitoring, and engineering practices to keep applications stable, available, and scalable. This becomes especially important as systems grow and development teams release changes frequently. Rather than manually managing large numbers of servers and services, SREs build tools and processes that make operating complex production environments more efficient and reliable.</p><h3>What Does an SRE Actually Do?</h3><p>An SRE is a software engineer who treats infrastructure problems like software engineering problems. Instead of manually maintaining servers or putting out operational fires by hand, they write code to manage, monitor, and scale systems automatically.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/0*pqccwmGSXBE-wcvw" /><figcaption>Core principles behind SRE daily work. Source: PFLB</figcaption></figure><p>An SRE’s day splits into four major responsibilities:</p><ol><li><strong>Automating Repetitive Work and Reducing Toil</strong></li></ol><p>One of the things SREs try to avoid is spending time repeatedly doing the same operational task. For example, if an engineer regularly has to restart a service, provision infrastructure, clean up resources, or manually scale an application during traffic spikes, it is worth asking whether that process can be automated. The solution could be a simple script, a CI/CD pipeline, Terraform, Kubernetes automation, or a custom tool. The idea is straightforward: <strong>if a repetitive operational task can be handled reliably by software, we should consider letting software handle it.</strong>This doesn’t mean every manual task needs to be automated. The goal is to reduce unnecessary operational work and give engineers more time to focus on problems that require engineering judgment.</p><p><strong>2</strong>. <strong>Incident Response and On-Call</strong></p><p>Production incidents are an unavoidable part of running large-scale systems.<br>When something goes wrong, the on-call SRE is usually one of the first people responsible for responding to the alert. The priority during an active incident is not necessarily to find the perfect root cause immediately. The first priority is to <strong>reduce the impact on users and restore the service</strong>. Depending on the situation, that could mean rolling back a recent deployment, restarting an unhealthy workload, shifting traffic, increasing capacity, or temporarily disabling a problematic feature.<br>Once the immediate problem is under control, the investigation can go deeper.<br>The team looks at what happened, how the system behaved, why existing safeguards didn’t catch the problem, and what can be changed to prevent or reduce the impact of a similar incident in the future.<br>This is where a <strong>blameless post-incident review</strong> becomes valuable. The objective isn’t to find someone to blame. It is to understand the failure and improve the system.</p><p><strong>3. Defining Reliability Expectations</strong></p><p>Reliability shouldn’t be based on a vague statement such as “the application should always be available.” SRE teams use measurable objectives to define what reliability actually means for a service.<br>Two important concepts are <strong>Service Level Objectives (SLOs)</strong> and <strong>Error Budgets</strong>.<br>An SLO could define a target such as maintaining 99.9% availability for an API over a particular measurement period.<br>The corresponding error budget represents the amount of unreliability the service can tolerate while still meeting that objective.<br>This creates a useful balance between development speed and reliability. Development teams can continue releasing features and making changes while the service remains within its reliability target. If the error budget is consistently being consumed, it becomes a signal that the team may need to focus more heavily on reliability before introducing additional risk.<br>The important point is that SLOs and error budgets turn reliability into something that can actually be <strong>measured and discussed</strong>, rather than simply being an expectation.</p><p><strong>SLI (Service Level Indicator) Formula:</strong><br>SLI = (Good events / Total Valid Events) * 100</p><p><strong>SLO Structure:</strong><br>SLI ≥ Target Perecentage<br>(e.g., ≥ 99.5% over a 30-day rolling window)</p><p><strong>Error budget as a percentage<br></strong>This is calculated simply as the inverse of the SLO target:<br>Error Budget % = (100% — SLO Target %)</p><p>Example: If your SLO is a success target (e.g., 99.9% availability), your error budget = 100% — 99.9% = 0.1%.</p><p><strong>4. Performance Engineering and Capacity Planning</strong></p><p>Keeping a system available isn’t enough if it becomes extremely slow whenever traffic increases.<br>SREs therefore pay attention to metrics such as latency, request volume, error rates, CPU and memory utilization, database performance, and network behavior.<br>Tools such as Prometheus, Grafana, Datadog, and other observability platforms can help engineers understand how a system behaves under normal and abnormal conditions.<br>Capacity planning is another important part of this work.<br>Before a major increase in traffic, engineers may perform load or stress testing to understand the limits of the current architecture. Based on those results, the team can decide whether it needs additional compute capacity, database scaling, caching, queue-based processing, or application-level changes.<br>In cloud environments, some of this capacity management can be automated through mechanisms such as Kubernetes Horizontal Pod Autoscaling, cluster autoscaling, or cloud-native scaling services.<br>The goal is not simply to add more servers whenever traffic increases. It is to understand <strong>where the system’s limits are and make sure it can scale in a predictable and controlled way.</strong></p><h3>How an SRE Operates a Production System</h3><p>When people talk about Site Reliability Engineering, the conversation often starts with production incidents, monitoring, or on-call.<br>In reality, an SRE’s involvement can start much earlier. I like to look at SRE as a continuous journey that begins when a team first starts planning a service and continues throughout the life of that service. The responsibilities change as the system moves from an idea to production and eventually grows at scale.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6Izw6klcxmiM_9kFhCS10w.png" /><figcaption>SRE Operation Day 0 to Day N</figcaption></figure><h3>Day 0 — Start With the Problem, Not the Infrastructure</h3><p>Day 0 is where I would start thinking about reliability. A development team might come to the SRE or platform team and say:</p><blockquote><em>“We have a new application and we need to run it in production.”</em></blockquote><p>The first response shouldn’t be to immediately create a Kubernetes namespace or provision a virtual machine.<br>There are several questions that need to be answered first.<br><strong>How critical is the application?<br>How many users are expected?<br>What kind of traffic will it receive?<br>Does it need high availability?<br>What happens if the database becomes unavailable?<br>What is the expected recovery time?<br>What level of downtime is acceptable?<br>What are the security and compliance requirements?<br>How will we monitor the application?<br>How will we deploy a new version?<br>What happens when something goes wrong?</strong></p><p>These questions help define the reliability requirements before infrastructure decisions are made.</p><h3>Design for Failure</h3><p>One of the biggest differences between simply deploying an application and operating it reliably is thinking about failure before failure happens.<br>For example, imagine an application running with a single server.<br>It may work perfectly during testing. But what happens if that server crashes? The application goes down.<br>Now consider running multiple instances across different availability zones, using a load balancer and a highly available database.<br>The architecture is more complicated, but it can tolerate certain failures.<br>This is the type of thinking SRE brings into architecture discussions.<br>We don’t assume that everything will work forever. We assume that <strong>components will eventually fail</strong>, and we design the system so that individual failures don’t necessarily become complete outages.</p><h3>Build Infrastructure</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*05Xk5Ps41ItS7hHuWdyphg.png" /><figcaption>Infrastructure provision</figcaption></figure><h3><strong>Software Supply Chain Security</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kZPzrbVs2l7tkVtVzLATGQ.png" /><figcaption>Software Supply Chain Security</figcaption></figure><h3>Day 1 — Make the System Observable</h3><p>Once an application is running, we need to know what is happening inside it. A production system that cannot be observed is difficult to operate.<br>This is where observability comes in.<br>An SRE typically looks at three major sources of information:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JyWDuVouWn4_RhtLDFJKkA.png" /><figcaption>Application Observability Lifecycle</figcaption></figure><ul><li>Metrics can tell us that CPU/Memory utilization has increased.</li><li>Logs can tell us what the application reported.</li><li>Traces can help us understand where a request spent its time across multiple services.</li></ul><p>Together, these signals give engineers a much better picture of what is happening.<br>Now a Days AI comes into the picture which can predict failure of system by analysing logs.</p><h3>Day 2 to Day N — Operate the Production System</h3><p>Once the application is live, the work doesn’t stop. In many ways, this is where the real SRE work begins. The system is now receiving real traffic.<br>Users are interacting with it, Deployments are happening, Infrastructure is changing, Dependencies are failing, Traffic patterns are changing.</p><p>The SRE team continuously watches the system and looks for ways to make it more reliable.</p><h3>Reliability</h3><p>The team defines and tracks SLIs and SLOs.</p><p>For example:</p><pre>Service:<br>Payment API</pre><pre>Availability SLO:<br>99.9%</pre><pre>Latency SLO:<br>99% of requests &lt; 500ms</pre><p>These numbers give the team something concrete to measure.<br>Reliability becomes an engineering objective rather than simply saying:<br><em>“The application should be reliable.”</em></p><blockquote><strong>One important SRE principle is that the monitoring dashboard should be designed around the reliability goals (SLI, SLO) of the service, not simply around whatever infrastructure metrics are available.</strong></blockquote><h3>Incident Response</h3><p>Eventually, something will break. <br>A deployment might introduce a bug.<br>A database might become unavailable.<br>A cloud service might experience an outage.<br>A certificate might expire.<br>A network policy might block legitimate traffic.<br>When that happens, the on-call SRE receives an alert and starts investigating.<br>The immediate priority is:<br><strong>Reduce customer impact and restore the service.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QxflNgG8lI3HS-JZO-rdkw.png" /><figcaption>Incident Response</figcaption></figure><h3>After the Incident — Learn From It</h3><p>Restoring the service is only half the job.</p><p>The team should also ask:</p><ul><li>What actually happened?</li><li>Why did the system fail?</li><li>Why didn’t our monitoring detect it earlier?</li><li>Did the deployment process contribute to the problem?</li><li>Could we have automatically recovered?</li><li>Was our capacity planning sufficient?</li><li>Do we need a new alert?</li><li>Do we need better testing?</li><li>Do we need to change the architecture?</li></ul><p>This is where a blameless post-incident review is useful.<br>The purpose is not to identify who made a mistake.<br>The purpose is to make the system better.</p><blockquote>A good incident should leave the organization with something valuable: <strong>a more resilient system than the one that existed before the incident.</strong></blockquote><h3>Day N — Automation and Continuous Improvement</h3><p>After operating a system for months or years, SREs accumulate a lot of operational knowledge.</p><p>They start noticing patterns.<br>Maybe engineers receive the same alert every week.<br>Maybe deployments frequently require manual intervention.<br>Maybe a particular service regularly reaches its memory limit.<br>Maybe a database needs manual scaling before every major traffic event.<br>These are opportunities for improvement.<br>The SRE asks:</p><blockquote><em>“Why are we still doing this manually?”</em></blockquote><p>That question often leads to automation.<br>A manual operational task can become:</p><pre>Manual Process<br>      │<br>      ▼<br>Identify Repetition<br>      │<br>      ▼<br>Automate<br>      │<br>      ▼<br>Monitor<br>      │<br>      ▼<br>Measure Result<br>      │<br>      ▼<br>Improve Again</pre><p>This is why SRE is not a one-time implementation.</p><p>It is a continuous engineering cycle.</p><h3>Conclusion</h3><p>For me, the biggest misunderstanding about SRE is that it is only about responding to production incidents.<br>Incident response is important, but it is only one part of the job.<br>An SRE thinks about reliability before the first deployment, builds systems that can tolerate failures, creates reliable deployment processes, establishes observability, defines measurable reliability targets, responds when things go wrong, and then uses what was learned to improve the system.</p><p>So the SRE journey isn’t really:<br><strong>Build → Deploy → Monitor → Fix<br></strong>It is closer to:<br><strong>Understand → Design → Build → Deploy → Observe → Operate → Respond → Learn → Automate → Improve → Repeat</strong></p><p>And that cycle continues for as long as the system exists.</p><p>Reference<br>* Chat GPT<br>* <a href="https://sre.google/">https://sre.google/</a><br>* <a href="https://medium.com/wearewaes/sre-for-beginners-6e0276f6bda9">https://medium.com/wearewaes/sre-for-beginners-6e0276f6bda9</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=365ab15a704e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Certified Kubernetes Administrator Tips and Suggestion]]></title>
            <link>https://medium.com/@rudranilsarkar/certified-kubernetes-administrator-tips-and-suggestion-c84144632e90?source=rss-ebad5943760e------2</link>
            <guid isPermaLink="false">https://medium.com/p/c84144632e90</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[cka]]></category>
            <category><![CDATA[certification]]></category>
            <dc:creator><![CDATA[Rudranil Sarkar]]></dc:creator>
            <pubDate>Sun, 10 May 2020 16:17:43 GMT</pubDate>
            <atom:updated>2022-08-29T10:16:38.636Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/552/1*MBCRHgzmW_OhEJP3pfnXvQ.png" /></figure><p>Kubernetes is one of the leading container orchestration tools. As DevOps Engineer whose job is to support Developer in improving their software development process. I recognize the massive benefits it can offer to modern businesses.</p><p>Recently I passed Certified Kubernetes Administrator, and I like to share some tips , suggestion and few dumps question so you can clear the exam.</p><p>The <strong>CKA</strong> program is a hands-on exam offered by the <a href="https://www.cncf.io/">Linux Foundation’s CNCF organization</a>. This stringent and comprehensive exam is conducted online under a proctor’s oversight, and its total duration is 3 hours. You need to perform 24 tasks in 3 hours and It is not the toughest exam but way CNCF taking the exam is different than other exams no MCQ based question, only you need to perform certain basic tasks within 3 hours also read once candidate handbook. Mostly questions ask on <strong>Deployment, DaemonSet, Pod, Secret, Service, Namespace, and persistent volumes.<br></strong>Prepare well Mumshaad`s lightning labs and mock exams for sure, also check his solution videos, the questions will be similar to them.</p><p>There will be 5 clusters you need to do context switching between the cluster and everything will mention on the question what to do, and in which context you need to perform the task.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/377/1*LMcx0ERHKm1xD3M_M1YkFQ.png" /><figcaption>source :- <a href="https://training.linuxfoundation.org/">https://training.linuxfoundation.org/</a></figcaption></figure><p>Few suggestions were provided by my friend <strong>Vishnu (</strong><a href="https://dvops.cloud/2020/04/28/cka-quick-tips/">https://dvops.cloud/2020/04/28/cka-quick-tips/</a>) which I followed during my exam.</p><ul><li>Double-check the name of the pod/deployment, name of the container, service name, context, labels, and namespace (silly mistake-prone area).</li><li>You will be given a bastion host at first which has 5 contexts (clusters) already set. Make sure you are in the right context before starting the exam, it&#39;s mentioned on top of each question.</li><li>ssh access is provided for all 5 clusters (masters and nodes), ssh commands are already provided wherever required.</li><li>K8s version in the exam is 1.18 so certain commands change like --dry-run becomes --dry-run=client</li><li>Bookmark cheatsheet page — <a href="https://kubernetes.io/docs/reference/kubectl/cheatsheet/">https://kubernetes.io/docs/reference/kubectl/cheatsheet/</a></li><li>Set autocomplete before starting — <a href="https://kubernetes.io/docs/reference/kubectl/cheatsheet/#kubectl-autocomplete">https://kubernetes.io/docs/reference/kubectl/cheatsheet/#kubectl-autocomplete</a></li><li>Use imperative commands as much as possible and edit as per the requirements of question :</li></ul><p>kubectl create deployment nginx --image nginx --dry-run=client -o yaml &gt; deploy.yaml edit deploy.yaml for any replica number changes and apply to create a deployment with 2 replicas.</p><ol><li>kubectl run nginx --image=nginx --dry-run=client -o yaml &gt; pod.yaml to create a pod as pod.yaml</li><li>kubectl expose pod/deployment --name nginx-service --type ClusterIP --port 80 --target-port 80 --dry-run=client -o yaml &gt; svc.yaml to expose a pod or deployment,(Note never try to use label and selector)</li><li>kubectl create secret generic db-secret --from-literal=password=confidential (no need to encode the secret, its encoded on its own this way)</li><li>journalctl -u kubelet to get kubelet service logs</li><li>systemctl status kubelet , systemctl restart kubelet and systemctl daemon-reload</li><li>Make use of -l abc=ayz and --show-lables like kubectl get pods -l abc=xyz and kubectl get nodes --show-labels.</li><li>Yes, you can copy the whole YAML from docs as well.</li><li>You will have an ample amount of time so make sure to read (twice) and understand the question well before attempting.</li></ol><p><strong>Types of Question</strong></p><ul><li>Extract logs lines corresponding to error “unable_to_load” and write to a file (the path will be mention on that question).</li><li>List all Persistence Volumes order by name and write to file. or List all PV order by capacity</li><li>Deploy Nginx daemonSet and ensure it is running on each node and don’t override any taits, (so basically asking don&#39;t use any tolerance in your manifest file)</li><li>Deploy an init container and create a file in init container and that file should be available in the main container also (basically you need to mount volumes in both the container)</li><li>Create a multi-container pod.</li><li>Schedule a pod in a specific node. (use node selector)</li><li>Create a deployment with Nginx image and perform rollout(Please make sure use “— — record” flag on every command.)</li><li>Create a clusterIP service for a pod.</li></ul><p>To know more about deployment strategy, follow the below article<br><a href="https://spacelift.io/blog/kubernetes-deployment-strategies"><strong>https://spacelift.io/blog/kubernetes-deployment-strategies</strong></a></p><p>Thanks, <a href="https://www.linkedin.com/in/mariusz-micha%C5%82owski/"><strong>Mariusz Michalowski</strong></a></p><p>Do practice well with Mumshaad’s video, Labs and above Questions.<br>Best of Luck for your Exam……</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c84144632e90" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to update Amazon EKS Cluster Kubernetes Version]]></title>
            <link>https://medium.com/@rudranilsarkar/how-to-update-amazon-eks-cluster-kubernetes-version-2eaf3f9969ac?source=rss-ebad5943760e------2</link>
            <guid isPermaLink="false">https://medium.com/p/2eaf3f9969ac</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud-native]]></category>
            <dc:creator><![CDATA[Rudranil Sarkar]]></dc:creator>
            <pubDate>Sat, 19 Oct 2019 18:41:27 GMT</pubDate>
            <atom:updated>2019-10-19T18:41:27.526Z</atom:updated>
            <content:encoded><![CDATA[<p>Kubernetes is a portable, extensible, open-source platform for managing containerized workloads and services, that facilitates both declarative configuration and automation. It has a large, rapidly growing ecosystem. Kubernetes services, support, and tools are widely available.</p><p>In this article, we will see how can we update our EKS cluster version.<br>At this point, you have an Amazon EKS cluster to update that we need to do this:</p><ul><li>Navigate to the Amazon EKS console and click on “Update cluster version” button</li><li>Enter your next higher version of your cluster and click on the update.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*7vh-RYT3bSgL_7jdBgARBw.png" /><figcaption>Amazon EKS Cluster Update</figcaption></figure><p><strong>Let&#39;s update the Kubernetes components.</strong></p><p>Amazon EKS does not modify any of your Kubernetes add-ons when you update a cluster. After updating your cluster, also you need to update your’s add-ons for the new Kubernetes version that you’re updating to.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/662/1*D1cWmqyw1b4pvts4dj6NWQ.png" /><figcaption>Kubernetes version and components</figcaption></figure><p><strong>Kube-proxy<br></strong>Patch the kube-proxy daemonset to use the image that corresponds to your current cluster Kubernetes version (in this example, <em>1.14.6</em>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/684/1*6o7AVXAGiBd6ed4Brf3JNQ.png" /><figcaption>Kube-proxy</figcaption></figure><p><strong>Coredns<br></strong>Check the current version of your cluster’s coredns deployment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/765/1*MDEszYV3rYAEoMKa6qJYjw.png" /><figcaption>coredns</figcaption></figure><p>The recommended coredns versions for their corresponding Kubernetes versions are as follows:</p><ul><li><strong>Kubernetes 1.14:</strong> 1.3.1</li><li><strong>Kubernetes 1.13:</strong> 1.2.6</li><li><strong>Kubernetes 1.12:</strong> 1.2.2</li><li><strong>Kubernetes 1.11:</strong> 1.1.3</li></ul><p>If you&#39;re current coredns version doesn&#39;t match the recommendation for your cluster version, update the coredns deployment to use the recommended image. (in this example we are using 1.3.1)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/755/1*lFUkFc0e9t82gV6EeWL6CQ.png" /></figure><p><strong>Amazon VPC CNI Plugin<br></strong>Check the version of your cluster’s Amazon VPC CNI Plugin for Kubernetes. Use the following command to print your cluster’s CNI version.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/765/1*oRMXmfEHLjbpXhkHPPCccQ.png" /></figure><p>Output:<br>amazon-k8s-cni:<em>1.5.3</em></p><p>If your CNI version is earlier than 1.5.4, use the following command to upgrade your CNI version to the latest version.</p><p><strong>kubectl apply -f </strong><a href="https://raw.githubusercontent.com/aws/amazon-vpc-cni-k8s/release-1.5/config/v1.5/aws-k8s-cni.yaml"><strong>https://raw.githubusercontent.com/aws/amazon-vpc-cni-k8s/release-1.5/config/v1.5/aws-k8s-cni.yaml</strong></a></p><p>After your cluster update is complete, update your worker nodes to the same Kubernetes version of your updated cluster.</p><p><strong>Worker Node Updates<br></strong>When a new Amazon EKS-optimized AMI is released, you should consider replacing the nodes in your worker node group with the new AMI. Likewise, if you have updated the Kubernetes version for your Amazon EKS cluster, you should also update the worker nodes to use worker nodes with the same Kubernetes version.</p><p><strong>To migrate your applications to a new worker node group with the AWS Management Console</strong></p><ul><li>Launch a new worker node group using cloudformation, check this link below,<br><a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-workers.html">https://docs.aws.amazon.com/eks/latest/userguide/launch-workers.html</a></li><li>When your stack has finished creating, select it in the console and choose <strong>Outputs</strong>.</li><li>Record the <strong>NodeInstanceRole</strong> for the node group that was created. You need this to add the new Amazon EKS worker nodes to your cluster.</li><li>Edit the aws-auth configmap to map the new worker node instance role in RBAC.<br><strong>kubectl edit configmap -n kube-system aws-auth</strong></li><li>Add a new mapRoles entry for the new worker node group.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/759/1*lWFXo8lIbfUmA9mRaweMew.png" /></figure><ul><li>Replace the <em>&lt;ARN of instance role (not instance profile)&gt;</em> snippet with the <strong>NodeInstanceRole</strong> value and then save and close the file to apply the updated configmap.</li><li>Watch the status of your nodes and wait for your new worker nodes to join your cluster and reach the Ready status.<br><strong>kubectl get nodes --watch</strong></li><li>Now add no schedule taint to your old nodes<br><strong>kubectl taint node &lt;node name&gt; &lt;key&gt; = &lt;value&gt;:NoSchedule<br></strong>Example:-<br><strong>kubectl taint node ip-10–110–121–225.eu-west-1.compute.internal kubernetes.io/hostname=10–110–121–225-node-k8s-eks-dev-v1:NoSchedule</strong></li><li>Now Remove the autoscale from the old nodes group.</li><li>Edit the aws-auth configmap to remove the old worker node instance role from RBAC.<br><strong>kubectl edit configmap -n kube-system aws-auth</strong></li><li>Delete the mapRoles entry for the old worker node group.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/765/1*IL3iTM8Wen-1IuBW9lUtsw.png" /></figure><p>Save and close the file to apply the updated configmap.</p><p>You’re done now check your node using “kubectl get nodes” updated node will be displayed.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2eaf3f9969ac" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Paragraph Module]]></title>
            <link>https://medium.com/@rudranilsarkar/paragraph-module-1d38b93c8aef?source=rss-ebad5943760e------2</link>
            <guid isPermaLink="false">https://medium.com/p/1d38b93c8aef</guid>
            <category><![CDATA[drupal]]></category>
            <dc:creator><![CDATA[Rudranil Sarkar]]></dc:creator>
            <pubDate>Sun, 10 Dec 2017 16:13:19 GMT</pubDate>
            <atom:updated>2017-12-10T16:13:19.017Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*9DcYX_Zar_fQVSsRIZCNPw.png" /></figure><p>The Paragraphs module is a new way of content creation. Instead of putting all contents through WYSIWYG body field, including videos and images, end-users can now choose on-the-fly between pre-defined Paragraph Types independent from on.</p><p>You can create new paragraph bundles via admin/structure/paragraphs. On each paragraph bundle you can add multiple fields and manage the display and It behave like a separate content type. While adding a new paragraph field in a content type you can choose the paragraph bundles able to use for the end users. So that end users can add extra paragraph fields corresponding to a node.</p><p>Let’s try the paragraph module</p><p>In this blog we will create a field for embed code field and link field which will redirect to the original content.</p><p>Step 1:- Go to structure and then go to paragraph module then create a paragraph with two field (i) type text :- formatted text , (ii) type link:- link.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1015/1*zONr9_-vRLVciR63yjBUJA.jpeg" /></figure><p>Step 2:- Now create a content type with paragraph as a field and select the paragraph as a reference (in our case social media).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u6-woUOi_FcH9xtMbQCoTA.jpeg" /></figure><p>Step 3:- Now go to content and add embed code in formatted text field and add link in link type field. After publishing your content you will get following result.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Pv0LUc5sZV0jV3ur0csCeQ.jpeg" /></figure><p>Thank You !!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1d38b93c8aef" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Configuration form drupal 8]]></title>
            <link>https://medium.com/@rudranilsarkar/configuration-form-drupal-8-122437d3dbe2?source=rss-ebad5943760e------2</link>
            <guid isPermaLink="false">https://medium.com/p/122437d3dbe2</guid>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Rudranil Sarkar]]></dc:creator>
            <pubDate>Sat, 09 Dec 2017 10:00:33 GMT</pubDate>
            <atom:updated>2017-12-09T10:00:33.381Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*jRNGD9uScJrl3yfo7w-vjw.png" /></figure><p>Drupal provides a robust API for creating and managing forms without any HTML. Drupal handles form building,validation, and submission. Drupal handles the request to either build the form or process the HTTP POST request. This allows developers to simply define the elements in a form, provide any additional validation if needed, and then handle a successful submission through specific methods.</p><p>In this blog we will create a configuration form and using that configuration data we will create a custom block with configuration form data.</p><p>The Configuration is stored in the database and synced with YML files on the disk for deployment purposes. The $config object handles CRUD (craete,read,update,delete) for YML files, so you simply use get(), set() methods and your data will be stored in the .settings.yml file.</p><p><strong>Let’s code</strong></p><p>Step 1:- create a yml file in &lt;&lt;docroot&gt;&gt;/module/custom/ <a href="https://github.com/rudranil29/d8cards/blob/master/modules/custom/config_form/config_form.info.yml">config_form</a>/</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4Xs23whmbZnUH28S0_H0Uw.png" /><figcaption><strong>filename :- config_form.info.yml</strong></figcaption></figure><p>Step 2:- create a routing file in&lt;&lt;docroot&gt;&gt;/module/custom/config_form/</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*unqF1tplgvbli-3E0QOWYA.png" /><figcaption><strong>filename :- config_form.routing.yml</strong></figcaption></figure><p>Step 3:- create a permission file in &lt;&lt;docroot&gt;&gt;/module/custom/config_form/</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MgXOCSiH4XA2b-WsnU2vuA.png" /><figcaption><strong>filename :- config_form.permission.yml</strong></figcaption></figure><p>Step 4 :- create a <a href="https://github.com/rudranil29/d8cards/blob/master/modules/custom/config_form/src/Form/Configurationform.php">Configurationform.php</a> file in &lt;&lt;docroot&gt;/ /<a href="https://github.com/rudranil29/d8cards/tree/master/modules">modules</a>/<a href="https://github.com/rudranil29/d8cards/tree/master/modules/custom">custom</a>/<a href="https://github.com/rudranil29/d8cards/tree/master/modules/custom/config_form">config_form</a>/<a href="https://github.com/rudranil29/d8cards/tree/master/modules/custom/config_form/src">src</a>/Form/</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4ff78337c1bc701edbb0578f91c3699f/href">https://medium.com/media/4ff78337c1bc701edbb0578f91c3699f/href</a></iframe><p>Step 5 :- Now create a custom block in &lt;&lt;docroot&gt;&gt;/<a href="https://github.com/rudranil29/d8cards/tree/master/modules">modules</a>/<a href="https://github.com/rudranil29/d8cards/tree/master/modules/custom">custom</a>/<a href="https://github.com/rudranil29/d8cards/tree/master/modules/custom/config_form">config_form</a>/<a href="https://github.com/rudranil29/d8cards/tree/master/modules/custom/config_form/src">src</a>/<a href="https://github.com/rudranil29/d8cards/tree/master/modules/custom/config_form/src/Plugin">Plugin</a>/Block/ and call the configuration (our case \Drupal::config(‘configuration_form.settings’).</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e320f7616e6a68db814046ef77f17015/href">https://medium.com/media/e320f7616e6a68db814046ef77f17015/href</a></iframe><p>Step 6 :- Now go to structure &gt; block and then placed your block in any region and then fill the configuration form and then click save and then form value will be display on the block.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W-_eiCoLtA5HD0Is16kv3w.jpeg" /></figure><p>Final Output ..</p><p>Thank you!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=122437d3dbe2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Configuration Management in Drupal 8]]></title>
            <link>https://medium.com/@rudranilsarkar/configuration-management-in-drupal-8-95e1042d47d5?source=rss-ebad5943760e------2</link>
            <guid isPermaLink="false">https://medium.com/p/95e1042d47d5</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[drupal-8]]></category>
            <dc:creator><![CDATA[Rudranil Sarkar]]></dc:creator>
            <pubDate>Thu, 07 Dec 2017 16:37:00 GMT</pubDate>
            <atom:updated>2017-12-10T16:14:09.146Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xHF2uy7_l2TzWCxFw-xSxw.jpeg" /></figure><p>Configuration management in drupal 8 provides a solution to a common problem when working with a website across multiple environments. Regardless of workflow at some point the configuration needs to move from one place to another, that is from local environment to production environment. When you pushing the development or local to production you need to have some common repository to export or import configuration entities via YAML format.</p><p>Some examples of configuration entity types:</p><p>View, Image Style, Role etc..</p><p>Some examples of content entity types:</p><p>Comment, User, Taxonomy Term etc..</p><h3>Importing and exporting configuration</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/833/1*v-y_PQ4Rpw3iMwitGmfEkw.jpeg" /></figure><p><strong>Exporting configuration</strong></p><ul><li>go to sites/default/settings.php and then enables this last two lines and create a folder in “sites/default/” and give name staged_configuration.</li></ul><p><em>After working in development site now it’s time to move the configuration to the production</em></p><ul><li>Step 1 :- From your development site, go to <strong>Configuration page</strong> and then open <strong>Configuration synchronization tab. </strong>This section allows you to import and export configuration.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*nooGBdA_2ZWNxkZrKUAfzA.jpeg" /></figure><ul><li>Step 2 :- Click on Export tab and then click export to export full site configuration you can export single item also as per your requirement.</li><li>Step 3 :- Export and download the full configuration of the site as a tar file</li></ul><p><strong>Single Item Export</strong></p><ul><li>Step 1 :- Go to <strong>Configuration page</strong> and click on tab single item</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/534/1*-v4uGE8emgr5ceTUKpjYgg.jpeg" /></figure><ul><li>Step 2 :- Copy the respective configuration and create a .yml with below mention filename (In our case contact.form.personal.yml) and put the into sync folder which is mention in settings.php</li></ul><p><strong>Importing configuration</strong></p><p>Now all the configuration are save in our mention path in settings.php, now it’s time to import that configuration</p><ul><li>Step 1 :- From your another site go to <strong>Configuration page</strong> and then open <strong>Configuration synchronization tab.</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/826/1*iEaNU197ulVdl7Vl0-aATg.jpeg" /></figure><ul><li>Step 2:- Upload a full site configuration archive to the mention directory in settings.php. Then it can be compared and imported on the Synchronize page.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JJpvgfGYwqJSuV9-fpzwfw.jpeg" /></figure><p>Step 3 :- Finally click import all to import all the configuration from the Folder and then clear the caches and your work is done!!!</p><p><strong>You can use drush also for import and export configuration</strong></p><ul><li>drush cex :- to export configuration.</li><li>drush cim :- to import configuration.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=95e1042d47d5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>