<?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 S Karthik on Medium]]></title>
        <description><![CDATA[Stories by S Karthik on Medium]]></description>
        <link>https://medium.com/@ikarthiks?source=rss-559076fcc869------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*AtqXWlRhpHRoAp8_WpsPaA.png</url>
            <title>Stories by S Karthik on Medium</title>
            <link>https://medium.com/@ikarthiks?source=rss-559076fcc869------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 01:55:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ikarthiks/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[How I Deployed Grafana on Amazon EKS with EFS Persistent Storage and PostgreSQL]]></title>
            <link>https://ikarthiks.medium.com/how-i-deployed-grafana-on-amazon-eks-with-efs-persistent-storage-and-postgresql-a0266f5430ce?source=rss-559076fcc869------2</link>
            <guid isPermaLink="false">https://medium.com/p/a0266f5430ce</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[grafana]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[S Karthik]]></dc:creator>
            <pubDate>Sat, 20 Jun 2026 09:28:42 GMT</pubDate>
            <atom:updated>2026-06-20T09:28:42.478Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vuZSV1ydzbfD8Dr49Bal3Q.png" /></figure><p>If you’ve been working with Kubernetes and AWS, you’ve probably heard of Grafana, the go-to open-source tool for visualizing metrics and building dashboards. In this post, I’ll walk you through exactly how I set up Grafana on an Amazon EKS (Elastic Kubernetes Service) cluster, using Amazon EFS for persistent storage and PostgreSQL as the backend database.</p><p>This guide is beginner-friendly, so I’ll explain what each piece does and why it matters, not just dump YAML at you.</p><h3>What We’re Building</h3><p>By the end of this guide, you’ll have:</p><ul><li>Grafana running as a Deployment inside EKS (with 2 replicas for availability)</li><li>EFS (Elastic File System) as persistent storage so your dashboards survive pod restarts</li><li>PostgreSQL as the Grafana backend database</li><li>A ConfigMap for all Grafana settings</li><li>A Secret for sensitive credentials (database URL, admin password)</li></ul><h3>Prerequisites</h3><p>Before we dive in, make sure you have the following ready:</p><ol><li><strong>A running EKS Cluster</strong> — your Kubernetes cluster on AWS</li><li><strong>An EFS volume</strong> with an access point configured with UID/GID 472 (that&#39;s the Grafana user inside the container)</li><li><strong>EFS CSI Driver installed</strong> in your cluster — this is what lets Kubernetes talk to EFS. If you haven’t done this yet, check out <a href="https://medium.com/@ikarthiks/how-to-mount-amazon-efs-in-amazon-eks-using-the-efs-csi-driver-14804015bd7d">my earlier post on mounting EFS in EKS</a></li><li><strong>A PostgreSQL database</strong> accessible from your cluster</li></ol><h3>Step 1: Set Up the PostgreSQL Database</h3><p>First, connect to your PostgreSQL server and run the following queries to create a dedicated user, database, and schema for Grafana:</p><pre>-- Create a dedicated Grafana user<br>CREATE ROLE grafana LOGIN PASSWORD &#39;your-strong-password-here&#39; NOINHERIT;<br><br>-- Create the Grafana database<br>CREATE DATABASE grafana_dev WITH OWNER = grafana ENCODING = &#39;UTF8&#39;;<br><br>-- Switch to the new database<br>\c grafana_dev<br><br>-- Create a schema for Grafana to use<br>CREATE SCHEMA development AUTHORIZATION grafana;<br><br>-- Grant full access on the database<br>GRANT ALL PRIVILEGES ON DATABASE grafana_dev TO grafana;<br><br>-- Grant full access on the schema<br>GRANT ALL PRIVILEGES ON SCHEMA development TO grafana;<br><br>-- Set the default search path so Grafana uses the right schema<br>ALTER ROLE grafana SET search_path TO development;</pre><blockquote><strong><em>Why a separate schema?</em></strong><em> This is a good practice — it keeps Grafana’s tables isolated from anything else in the database, making it easier to manage and clean up later.</em></blockquote><h3>Step 2: Connect to Your EKS Cluster</h3><p>Make sure your kubeconfig is pointing to the right cluster:</p><pre>aws eks update-kubeconfig --region &lt;your-region&gt; --name &lt;your-cluster-name&gt;</pre><h3>Step 3: Create a Namespace</h3><p>We’ll deploy everything in a namespace called dev:</p><pre>kubectl create namespace dev</pre><h3>Step 4: Create the Kubernetes Manifest Files</h3><p>Now the fun part. We need to create several Kubernetes resources. I’ll go through each one and explain what it does.</p><h4>4a. PersistentVolume (PV)</h4><p>This tells Kubernetes about the EFS storage we want to use:</p><pre>apiVersion: v1<br>kind: PersistentVolume<br>metadata:<br>  name: grafana<br>spec:<br>  capacity:<br>    storage: 5Gi<br>  volumeMode: Filesystem<br>  accessModes:<br>    - ReadWriteMany<br>  storageClassName: efs-sc<br>  persistentVolumeReclaimPolicy: Retain<br>  csi:<br>    driver: efs.csi.aws.com<br>    volumeHandle: &lt;EFS_VOLUME_ID&gt;::&lt;EFS_ACCESSPOINT_ID_FOR_GRAFANA&gt;</pre><blockquote><em>Replace </em><em>&lt;EFS_VOLUME_ID&gt; and </em><em>&lt;EFS_ACCESSPOINT_ID_FOR_GRAFANA&gt; with your actual EFS details. You can find these in the AWS Console under EFS.</em></blockquote><p>The ReadWriteMany access mode is key here — it lets multiple Grafana pods (our 2 replicas) mount the same EFS volume at the same time, which is exactly what we need.</p><h4>4b. PersistentVolumeClaim (PVC)</h4><p>This is how the Grafana pods actually <em>request</em> the storage we defined above:</p><pre>apiVersion: v1<br>kind: PersistentVolumeClaim<br>metadata:<br>  name: grafana<br>  namespace: dev<br>spec:<br>  accessModes:<br>    - ReadWriteMany<br>  storageClassName: efs-sc<br>  resources:<br>    requests:<br>      storage: 5Gi</pre><h4>4c. Secret</h4><p>Secrets store sensitive data in base64-encoded format. We need four values here:</p><pre>apiVersion: v1<br>kind: Secret<br>metadata:<br>  name: grafana<br>  namespace: dev<br>data:<br>  GF_DATABASE_URL: &lt;base64-encoded-value&gt;<br>  GF_SECURITY_ADMIN_USER: &lt;base64-encoded-value&gt;<br>  GF_SECURITY_ADMIN_PASSWORD: &lt;base64-encoded-value&gt;<br>  GF_SECURITY_SECRET_KEY: &lt;base64-encoded-value&gt;</pre><p><strong>How to base64-encode your values:</strong></p><pre>echo -n &#39;your-value-here&#39; | base64</pre><p>The GF_DATABASE_URL should follow this format before encoding:</p><pre>postgres://grafana:your-password@your-db-host:5432/grafana_dev?sslmode=disable&amp;search_path=development</pre><blockquote><strong><em>Security tip:</em></strong><em> Never commit Secrets to your Git repository. Consider using AWS Secrets Manager or Sealed Secrets for production environments.</em></blockquote><h4>4d. ConfigMap</h4><p>The ConfigMap holds all the non-sensitive Grafana configuration. There are a lot of options here, and I’ve tuned them for a secure, production-ready setup:</p><pre>apiVersion: v1<br>kind: ConfigMap<br>metadata:<br>  name: grafana<br>  namespace: dev<br>data:<br>  GF_DEFAULT_APP_MODE: &quot;development&quot;<br>  GF_DEFAULT_INSTANCE_NAME: &quot;dev-instance&quot;<br>  GF_PATHS_TEMP_DATA_LIFETIME: &quot;24h&quot;<br>  GF_SERVER_PROTOCOL: &quot;http&quot;<br>  GF_SERVER_HTTP_ADDR: &quot;0.0.0.0&quot;<br>  GF_SERVER_HTTP_PORT: &quot;3000&quot;<br>  GF_SERVER_DOMAIN: &quot;dev-monitoring.yourdomain.com&quot;<br>  GF_SERVER_ENFORCE_DOMAIN: &quot;true&quot;<br>  GF_SERVER_ROOT_URL: &quot;https://dev-monitoring.yourdomain.com/&quot;<br>  GF_SERVER_SERVER_FROM_SUB_PATH: &quot;false&quot;<br>  GF_SERVER_ROUTER_LOGGING: &quot;true&quot;<br>  GF_SERVER_STATIC_ROOT_PATH: &quot;public&quot;<br>  GF_SERVER_ENABLE_GZIP: &quot;true&quot;<br>  GF_DATABASE_MIGRATION_LOCKING: &quot;true&quot;<br>  GF_DATABASE_LOCKING_ATTEMPT_TIMEOUT_SEC: &quot;5&quot;<br>  GF_DATABASE_LOG_QUERIES: &quot;true&quot;<br>  GF_DATABASE_SSL_MODE: &quot;disable&quot;<br>  GF_DATABASE_INSTRUMENT_QUERIES: &quot;true&quot;<br>  GF_DATABASE_SKIP_DASHBOARD_UID_MIGRATION_ON_STARTUP: &quot;false&quot;<br>  GF_REMOTE_CACHE_TYPE: &quot;database&quot;<br>  GF_ANALYTICS_ENABLED: &quot;false&quot;<br>  GF_ANALYTICS_REPORTING_ENABLED: &quot;false&quot;<br>  GF_ANALYTICS_CHECK_FOR_UPDATES: &quot;false&quot;<br>  GF_ANALYTICS_CHECK_FOR_PLUGIN_UPDATES: &quot;false&quot;<br>  GF_ANALYTICS_FEEDBACK_LINKS_ENABLED: &quot;false&quot;<br>  GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION: &quot;false&quot;<br>  GF_SECURITY_ADMIN_EMAIL: &quot;grafana@yourdomain.com&quot;<br>  GF_SECURITY_DISABLE_GRAVATAR: &quot;true&quot;<br>  GF_SECURITY_DISABLE_BRUTE_FORCE_LOGIN_PROTECTION: &quot;false&quot;<br>  GF_SECURITY_BRUTE_FORCE_LOGIN_PROTECTION_MAX_ATTEMPTS: &quot;5&quot;<br>  GF_SECURITY_DISABLE_USERNAME_LOGIN_PROTECTION: &quot;false&quot;<br>  GF_SECURITY_DISABLE_IP_ADDRESS_LOGIN_PROTECTION: &quot;false&quot;<br>  GF_SECURITY_COOKIE_SECURE: &quot;true&quot;<br>  GF_SECURITY_COOKIE_SAMESITE: &quot;lax&quot;<br>  GF_SECURITY_ALLOW_EMBEDDING: &quot;false&quot;<br>  GF_SECURITY_STRICT_TRANSPORT_SECURITY: &quot;true&quot;<br>  GF_SECURITY_STRICT_TRANSPORT_SECURITY_MAX_AGE_SECONDS: &quot;86400&quot;<br>  GF_SECURITY_STRICT_TRANSPORT_SECURITY_PRELOAD: &quot;true&quot;<br>  GF_SECURITY_STRICT_TRANSPORT_SECURITY_SUBDOMAINS: &quot;true&quot;<br>  GF_SECURITY_X_CONTENT_TYPE_OPTIONS: &quot;true&quot;<br>  GF_SECURITY_X_XSS_PROTECTION: &quot;true&quot;<br>  GF_SECURITY_CONTENT_SECURITY_POLICY: &quot;true&quot;<br>  GF_SNAPSHOTS_ENABLED: &quot;false&quot;<br>  GF_SNAPSHOTS_EXTERNAL_ENABLED: &quot;false&quot;<br>  GF_SNAPSHOTS_PUBLIC_MODE: &quot;false&quot;<br>  GF_DASHBOARDS_VERSIONS_TO_KEEP: &quot;5&quot;<br>  GF_DASHBOARDS_MIN_REFRESH_INTERVAL: &quot;30s&quot;<br>  GF_USERS_ALLOW_SIGN_UP: &quot;false&quot;<br>  GF_USERS_ALLOW_ORG_CREATE: &quot;false&quot;<br>  GF_USERS_AUTO_ASSIGN_ORG: &quot;true&quot;<br>  GF_USERS_AUTO_ASSIGN_ORG_ID: &quot;1&quot;<br>  GF_USERS_AUTO_ASSIGN_ORG_ROLE: &quot;Viewer&quot;<br>  GF_USERS_VERIFY_EMAIL_ENABLED: &quot;false&quot;<br>  GF_USERS_LOGIN_DEFAULT_ORG_ID: &quot;-1&quot;<br>  GF_USERS_LOGIN_HINT: &quot;Enter your username or email&quot;<br>  GF_USERS_PASSWORD_HINT: &quot;Enter your password&quot;<br>  GF_USERS_DEFAULT_THEME: &quot;system&quot;<br>  GF_USERS_DEFAULT_LANGUAGE: &quot;detect&quot;<br>  GF_USERS_VIEWERS_CAN_EDIT: &quot;false&quot;<br>  GF_USERS_USER_INVITE_MAX_LIFETIME_DURATION: &quot;6h&quot;<br>  GF_USERS_VERIFICATION_EMAIL_MAX_LIFETIME_DURATION: &quot;6h&quot;<br>  GF_USERS_LAST_SEEN_UPDATE_INTERVAL: &quot;1h&quot;<br>  GF_AUTH_LOGIN_COOKIE_NAME: &quot;grafana_session&quot;<br>  GF_AUTH_LOGIN_MAXIMUM_INACTIVE_LIFETIME_DURATION: &quot;24h&quot;<br>  GF_AUTH_LOGIN_MAXIMUM_LIFETIME_DURATION: &quot;24h&quot;<br>  GF_AUTH_TOKEN_ROTATION_INTERVAL_MINUTES: &quot;24h&quot;<br>  GF_AUTH_DISABLE_LOGIN_FORM: &quot;false&quot;<br>  GF_AUTH_DISABLE_SIGNOUT_MENU: &quot;false&quot;<br>  GF_SMTP_ENABLED: &quot;false&quot;<br>  GF_SMTP_HOST: &quot;localhost:25&quot;<br>  GF_SMTP_USER: &quot;empty&quot;<br>  GF_SMTP_PASSWORD: &quot;empty&quot;<br>  GF_SMTP_CERT_FILE: &quot;empty&quot;<br>  GF_SMTP_KEY_FILE: &quot;empty&quot;<br>  GF_SMTP_SKIP_VERIFY: &quot;false&quot;<br>  GF_SMTP_FROM_ADDRESS: &quot;admin@grafana.localhost&quot;<br>  GF_SMTP_FROM_NAME: &quot;Grafana&quot;<br>  GF_SMTP_ENABLE_TRACING: &quot;false&quot;<br>  GF_EMAILS_WELCOME_EMAIL_ON_SIGN_UP: &quot;false&quot;<br>  GF_EMAILS_TEMPLATES_PATTERN: &quot;emails/*.html, emails/*.txt&quot;<br>  GF_EMAILS_CONTENT_TYPES: &quot;text/html&quot;<br>  GF_LOG_MODE: &quot;console&quot;<br>  GF_LOG_LEVEL: &quot;debug&quot;<br>  GF_LOG_FILE_FORMAT: &quot;text&quot;<br>  GF_LOG_FILE_LOG_ROTATE: &quot;true&quot;<br>  GF_LOG_FILE_MAX_LINES: &quot;1000000&quot;<br>  GF_LOG_FILE_MAX_SIZE_SHIFT: &quot;28&quot;<br>  GF_LOG_FILE_DAILY_ROTATE: &quot;true&quot;<br>  GF_LOG_FILE_MAX_DAYS: &quot;7&quot;<br>  GF_EXPLORE_ENABLED: &quot;enabled&quot;<br>  GF_EXPLORE_DEFAULTTIMEOFFSET: &quot;1h&quot;<br>  GF_EXPLORE_HIDE_LOGS_DOWNLOAD: &quot;false&quot;<br>  GF_HELP_ENABLED: &quot;enabled&quot;<br>  GF_PROFILE_ENABLED: &quot;enabled&quot;<br>  GF_NEWS_NEWS_FEED_ENABLED: &quot;false&quot;<br>  GF_SHORT_LINKS_EXPIRE_TIME: &quot;7&quot;<br>  GF_METRICS_ENABLED: &quot;true&quot;<br>  GF_METRICS_INTERVAL_SECONDS: &quot;60&quot;<br>  GF_METRICS_DISABLE_TOTAL_STATS: &quot;false&quot;<br>  GF_METRICS_TOTAL_STATS_COLLECTOR_INTERVAL_SECONDS: &quot;1800&quot;<br>  GF_GRAFANA_COM_URL: &quot;https://www.jesuscalls.org&quot;<br>  GF_LIVE_MAX_CONNECTIONS: &quot;100&quot;<br>  GF_LIVE_ALLOWED_ORIGINS: &quot;https://*.yourdomain.com&quot;</pre><blockquote><em>Update </em><em>GF_SERVER_DOMAIN, </em><em>GF_SERVER_ROOT_URL, and </em><em>GF_SECURITY_ADMIN_EMAIL to match your actual domain.</em></blockquote><h4>4e. Deployment</h4><p>Finally, the Deployment that actually runs Grafana:</p><pre>apiVersion: apps/v1<br>kind: Deployment<br>metadata:<br>  name: grafana<br>  namespace: dev<br>  labels:<br>    app: grafana<br>spec:<br>  revisionHistoryLimit: 2<br>  replicas: 2<br>  selector:<br>    matchLabels:<br>      app: grafana<br>  template:<br>    metadata:<br>      labels:<br>        app: grafana<br>    spec:<br>      restartPolicy: Always<br>      topologySpreadConstraints:<br>        - maxSkew: 1<br>          topologyKey: topology.kubernetes.io/zone<br>          whenUnsatisfiable: ScheduleAnyway<br>          labelSelector:<br>            matchLabels:<br>              app: grafana<br>        - maxSkew: 1<br>          topologyKey: kubernetes.io/hostname<br>          whenUnsatisfiable: ScheduleAnyway<br>          labelSelector:<br>            matchLabels:<br>              app: grafana<br>      affinity:<br>        nodeAffinity:<br>          requiredDuringSchedulingIgnoredDuringExecution:<br>            nodeSelectorTerms:<br>              - matchExpressions:<br>                  - key: kubernetes.io/arch<br>                    operator: In<br>                    values:<br>                      - amd64<br>                      - arm64<br>      securityContext:<br>        fsGroup: 472<br>        runAsUser: 472<br>        runAsGroup: 472<br>      containers:<br>        - name: grafana<br>          image: grafana/grafana:13.0.2-slim<br>          imagePullPolicy: Always<br>          ports:<br>            - name: http<br>              containerPort: 3000<br>          envFrom:<br>            - configMapRef:<br>                name: grafana<br>            - secretRef:<br>                name: grafana<br>          resources:<br>            requests:<br>              cpu: &quot;100m&quot;<br>              memory: &quot;256Mi&quot;<br>            limits:<br>              cpu: &quot;250m&quot;<br>              memory: &quot;512Mi&quot;<br>          volumeMounts:<br>            - name: grafana<br>              mountPath: /var/lib/grafana<br>              subPath: data<br>      volumes:<br>        - name: grafana<br>          persistentVolumeClaim:<br>            claimName: grafana<br>      nodeSelector:<br>        kubernetes.io/os: linux</pre><p><strong>A few things worth noting in the Deployment:</strong></p><ul><li><strong>securityContext</strong> — We set fsGroup, runAsUser, and runAsGroup to 472. This is the Grafana user&#39;s UID/GID inside the container, and it must match the EFS access point permissions. Without this, Grafana won&#39;t be able to write to the EFS volume.</li><li><strong>topologySpreadConstraints</strong> — This ensures the 2 Grafana pods are spread across different availability zones and nodes, improving resilience.</li><li><strong>subPath: data</strong> — We mount the EFS volume at a subfolder (data) rather than the root. This is a good practice when multiple applications share the same EFS volume.</li><li><strong>resources</strong> — Always set resource requests and limits. Without them, a misbehaving pod can consume all the node&#39;s memory and take other pods down with it.</li></ul><h3>Step 5: Apply All the Manifests</h3><p>If you’ve saved all the YAML files in the same directory, apply them all at once:</p><pre>kubectl apply -f .</pre><h3>Step 6: Verify the Deployment</h3><p>Check that the Grafana pods are running:</p><pre>kubectl get pods -n dev</pre><p>You should see output like this:</p><pre>NAME                       READY   STATUS    RESTARTS   AGE<br>grafana-7d9f8b6c4d-abc12   1/1     Running   0          2m<br>grafana-7d9f8b6c4d-xyz34   1/1     Running   0          2m</pre><p>If a pod is not in Running state, check the logs:</p><pre>kubectl logs -n dev deployment/grafana</pre><h3>Wrapping Up</h3><p>That’s it! You now have Grafana running on EKS with:</p><ul><li><strong>EFS</strong> for shared, persistent storage across replicas</li><li><strong>PostgreSQL</strong> as the backend database instead of the default SQLite (much better for multi-replica setups)</li><li><strong>Proper security settings</strong> — no anonymous sign-up, brute force protection, HSTS headers, and more</li></ul><p>The next step would be to expose Grafana via an AWS ALB Ingress with a proper SSL certificate so you can access it from a browser. I’ll cover that in an upcoming post.</p><p>If you found this helpful, give it a clap and follow me for more DevOps content on AWS and Kubernetes. Feel free to drop any questions in the comments, happy to help!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a0266f5430ce" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Deployed Redmine Using Docker on a Linux Server (Step-by-Step Guide)]]></title>
            <link>https://ikarthiks.medium.com/how-i-deployed-redmine-using-docker-on-a-linux-server-step-by-step-guide-6e8e6eb6f49f?source=rss-559076fcc869------2</link>
            <guid isPermaLink="false">https://medium.com/p/6e8e6eb6f49f</guid>
            <category><![CDATA[product-management]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[project-management]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[S Karthik]]></dc:creator>
            <pubDate>Fri, 19 Jun 2026 09:56:01 GMT</pubDate>
            <atom:updated>2026-06-19T09:56:01.506Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YuY4nwq48NTqn1UBh86_tA.png" /></figure><p>If you’ve been looking for a free, open-source project management tool that you can host yourself, <strong>Redmine</strong> is one of the best options out there. It lets you manage tasks, track bugs, and collaborate with your team — all on your own server, without paying for a SaaS subscription.</p><p>In this guide, I’ll walk you through exactly how I set up Redmine using Docker on a Linux server, with PostgreSQL as the database and Nginx as a reverse proxy with SSL. I’ve kept things beginner-friendly, so even if you’re new to Docker or self-hosting, you should be able to follow along.</p><h3>Reference</h3><p><a href="https://www.redmine.org/projects/redmine/wiki/redmineinstall">https://www.redmine.org/projects/redmine/wiki/redmineinstall</a></p><h3>What You’ll Need Before We Start</h3><h4>Hardware</h4><p>Your server requirements depend on how many people will use Redmine:</p><ul><li><strong>Small teams (up to 25 users):</strong> 2 vCPU, 4 GB RAM, 20 GB+ SSD</li><li><strong>Medium to large teams (50–300+ users):</strong> 4 vCPU, 8–16 GB RAM, 50 GB+ SSD</li></ul><h4>Software</h4><p>Make sure the following are installed on your server before starting:</p><ul><li><strong>Ubuntu or Debian</strong> (any modern version works)</li><li><strong>Docker: </strong>To run Redmine and PostgreSQL as containers</li><li><strong>Nginx: </strong>To act as a reverse proxy in front of Redmine</li><li><strong>Certbot: </strong>To automatically get a free SSL certificate from Let’s Encrypt</li></ul><blockquote><strong><em>Not sure if these are installed?</em></strong><em> Run </em><em>docker --version, </em><em>nginx -v, and </em><em>certbot --version in your terminal. If any of those give a &quot;command not found&quot; error, install it first before proceeding.</em></blockquote><h3>Step 1: Create the Project Directory Structure</h3><p>Log into your server via SSH and run the following commands to create a dedicated folder for Redmine and all the subdirectories it needs:</p><pre>mkdir redmine &amp;&amp; cd redmine<br>mkdir -p config files plugins themes postgresql/data</pre><p>Here’s what each folder is for:</p><ul><li>config/ — stores the database connection file</li><li>files/ — stores uploaded attachments in Redmine</li><li>plugins/ — where you&#39;ll place any Redmine plugins</li><li>themes/ — for custom themes</li><li>postgresql/data/ — PostgreSQL data directory (your database files live here)</li></ul><h3>Step 2: Create the Docker Compose File</h3><p>Inside the redmine directory, create a file called compose.yaml and paste the following content:</p><pre>name: redmine<br><br>services:<br>  redmine:<br>    image: redmine:6.1.2-alpine<br>    container_name: redmine-6.1.2<br>    restart: unless-stopped<br>    user: &#39;&lt;REPLACE_WITH_YOUR_LINUX_USER_ID&gt;&#39;<br>    environment:<br>      SECRET_KEY_BASE: &lt;REPLACE_WITH_YOUR_SECRET_KEY_BASE&gt;<br>    depends_on:<br>      - db<br>    ports:<br>      - &quot;3000:3000&quot;<br>    volumes:<br>      - ./files:/usr/src/redmine/files<br>      - ./themes:/usr/src/redmine/themes<br>      - ./plugins:/usr/src/redmine/plugins<br>      - ./config/database.yml:/usr/src/redmine/config/database.yml<br>    networks:<br>      - redmine-net<br>    deploy:<br>      resources:<br>        limits:<br>          cpus: &#39;2.0&#39;<br>          memory: 2G<br>        reservations:<br>          cpus: &#39;1.0&#39;<br>          memory: 1G<br><br>  db:<br>    image: postgres:16.14-alpine<br>    container_name: postgresql-server-16.14<br>    restart: unless-stopped<br>    user: &#39;&lt;REPLACE_WITH_YOUR_LINUX_USER_ID&gt;&#39;<br>    environment:<br>      POSTGRES_USER: admin<br>      POSTGRES_PASSWORD: DF50s4911MsB<br>      POSTGRES_DB: postgres<br>    volumes:<br>      - ./postgresql/data:/var/lib/postgresql/data<br>    networks:<br>      - redmine-net<br>    deploy:<br>      resources:<br>        limits:<br>          cpus: &#39;1.0&#39;<br>          memory: 1G<br>        reservations:<br>          cpus: &#39;0.5&#39;<br>          memory: 512M<br><br>networks:<br>  redmine-net:<br>    driver: bridge</pre><p><strong>Before saving, replace these two placeholders:</strong></p><ul><li>&lt;REPLACE_WITH_YOUR_LINUX_USER_ID&gt; Run id -u in your terminal to get your user ID (e.g., 1000)</li><li>&lt;REPLACE_WITH_YOUR_SECRET_KEY_BASE&gt; Generate a random secret with openssl rand -hex 64</li></ul><blockquote><strong><em>Why do we set a user ID?</em></strong><em> This makes sure the container runs as your Linux user, so the files it writes to your mounted folders have the correct ownership. Without this, you might run into permission errors.</em></blockquote><h3>Step 3: Start the Database Container</h3><p>We’ll start the database first so it’s ready before Redmine tries to connect:</p><pre>docker compose up -d db</pre><p>Wait a few seconds for PostgreSQL to initialize, then verify it’s running:</p><pre>docker ps</pre><p>You should see postgresql-server-16.14 listed as running.</p><h3>Step 4: Set Up the Redmine Database</h3><p>Now let’s connect to the PostgreSQL container and create the database and user for Redmine:</p><pre>docker exec -it postgresql-server-16.14 psql -U admin -d postgres</pre><p>Once inside the PostgreSQL prompt, run these SQL commands one by one:</p><pre>-- Connect to PostgreSQL<br>docker exec -it ct-redmine-db-01 psql -U admin -d postgres<br><br>-- Create Redmine user<br>CREATE ROLE redadmin LOGIN PASSWORD &#39;ORr53PyULzBR2Hr9&#39; NOINHERIT;<br><br>-- Create Redmine database<br>CREATE DATABASE redmine_dev WITH OWNER = redadmin ENCODING = &#39;UTF8&#39;;<br><br>-- Connect to the database<br>\c redmine_dev<br><br>-- Create application schema<br>CREATE SCHEMA development AUTHORIZATION redadmin;<br><br>-- Grant database privileges<br>GRANT ALL PRIVILEGES ON DATABASE redmine_dev TO redadmin;<br><br>-- Grant schema privileges<br>GRANT ALL PRIVILEGES ON SCHEMA development TO redadmin;<br><br>-- Allow Redmine to create tables, sequences, etc.<br>ALTER ROLE redadmin SET search_path TO development;</pre><p>When done, exit the container by pressing Ctrl + D.</p><blockquote><strong><em>Tip:</em></strong><em> Change the password </em><em>ORr53PyULzBR2Hr9 to something strong and unique before using this in production.</em></blockquote><h3>Step 5: Create the Database Configuration File</h3><p>Create the file config/database.yml inside your redmine directory. This tells Redmine how to connect to PostgreSQL:</p><pre>production:<br>  adapter: postgresql<br>  database: redmine_dev<br>  host: db<br>  port: 5432<br>  username: redadmin<br>  password: &quot;ORr53PyULzBR2Hr9&quot;<br>  encoding: utf8<br>  schema_search_path: development</pre><blockquote><strong><em>Note:</em></strong><em> The </em><em>host here is </em><em>db, which is the service name we defined in </em><em>compose.yaml. Docker&#39;s internal networking resolves this automatically — no IP address needed.</em></blockquote><h3>Step 6: Start the Redmine Container</h3><p>Now start Redmine:</p><pre>docker compose up -d redmine</pre><p>Give it a minute or two to finish its initial database migrations. You can check the logs to follow progress:</p><pre>docker logs -f redmine-6.1.2</pre><p>Once you see something like WEBrick::HTTPServer#start, Redmine is up.</p><h3>Step 7: Disable Auto-Migrations (Important!)</h3><p>After the first successful startup, add these two environment variables to the redmine service in your compose.yaml:</p><pre>environment:<br>  SECRET_KEY_BASE: &lt;your_secret&gt;<br>  REDMINE_NO_DB_MIGRATE: &quot;true&quot;<br>  REDMINE_PLUGINS_MIGRATE: &quot;true&quot;</pre><p><strong>What do these do?</strong></p><ul><li>REDMINE_NO_DB_MIGRATE: &quot;true&quot;Stops Redmine from running database migrations on every restart. After the initial setup, you don&#39;t want this running each time — it slows startup and can cause issues.</li><li>REDMINE_PLUGINS_MIGRATE: &quot;true&quot;Runs plugin migrations on every startup. If you install plugins, this ensures their database changes are applied automatically.</li></ul><p>After updating the file, restart Redmine to apply:</p><pre>docker compose up -d redmine</pre><h3>Step 8: Configure Nginx as a Reverse Proxy</h3><p>Right now Redmine is accessible only on port 3000. We want it to be accessible at a proper domain (like redmine.example.com) on standard ports 80 and 443.</p><p>Create a new Nginx config file:</p><pre>sudo nano /etc/nginx/sites-available/redmine.example.com</pre><p>Paste this configuration (replace redmine.example.com with your actual domain):</p><pre>upstream redmine {<br>    server 127.0.0.1:3000;<br>}<br><br>server {<br>    listen 80;<br>    server_name redmine.example.com;<br><br>    server_tokens off;<br><br>    access_log /var/log/nginx/redmine-access.log;<br>    error_log  /var/log/nginx/redmine-error.log;<br><br>    client_max_body_size 100M;<br><br>    location / {<br>        proxy_pass http://redmine;<br><br>        proxy_http_version 1.1;<br><br>        proxy_set_header Host $host;<br>        proxy_set_header X-Real-IP $remote_addr;<br>        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br>        proxy_set_header X-Forwarded-Proto $scheme;<br>        proxy_set_header X-Forwarded-Host $host;<br>        proxy_set_header X-Forwarded-Port $server_port;<br><br>        proxy_set_header Upgrade $http_upgrade;<br>        proxy_set_header Connection &quot;upgrade&quot;;<br><br>        proxy_connect_timeout 60s;<br>        proxy_send_timeout 300s;<br>        proxy_read_timeout 300s;<br><br>        proxy_redirect off;<br><br>        # Security headers<br>        add_header Permissions-Policy &quot;geolocation=(), microphone=(), camera=()&quot; always;<br>    }<br>}</pre><p>Now enable the site and reload Nginx:</p><pre>sudo ln -s /etc/nginx/sites-available/redmine.example.com /etc/nginx/sites-enabled/<br>sudo nginx -t<br>sudo systemctl reload nginx</pre><blockquote><strong><em>Before this step</em></strong><em>, make sure your domain’s DNS A record is pointing to your server’s public IP address. Certbot won’t be able to verify your domain otherwise.</em></blockquote><h3>Step 9: Enable HTTPS with Let’s Encrypt</h3><p>Run Certbot to automatically get and configure an SSL certificate:</p><pre>sudo certbot --nginx</pre><p>Follow the prompts — select your domain when asked, and Certbot will handle the rest. It will modify your Nginx config to redirect HTTP to HTTPS automatically.</p><blockquote><strong><em>Firewall check:</em></strong><em> Make sure ports </em><strong><em>80</em></strong><em> and </em><strong><em>443</em></strong><em> are open in your server’s firewall (or security group if you’re on a cloud provider like AWS or GCP).</em></blockquote><h3>You’re Done!</h3><p>Your Redmine instance should now be live at https://redmine.example.com. The default login credentials are:</p><ul><li><strong>Username:</strong> admin</li><li><strong>Password:</strong> admin</li></ul><p><strong>Change your password immediately after logging in.</strong></p><h3>A Note on Database for Production</h3><p>In this guide, we’re running PostgreSQL <strong>on the same machine as Redmine</strong> using Docker. This is perfectly fine for local setups, internal tools, or small teams just getting started.</p><p>However, if you’re planning to use Redmine in a <strong>production environment</strong> with real teams and important data, I’d strongly recommend moving your database to a <strong>managed database service</strong> instead — such as:</p><ul><li><strong>AWS RDS</strong> (Amazon Relational Database Service)</li><li><strong>Google Cloud SQL</strong></li><li><strong>Azure Database for PostgreSQL</strong></li><li><strong>DigitalOcean Managed Databases</strong></li></ul><p><strong>Why does this matter?</strong></p><p>Running your database on the same machine as your application means if that server goes down, you lose both your app and your data at the same time. Managed services give you:</p><ul><li><strong>Automated backups</strong> point-in-time recovery without any manual effort</li><li><strong>High availability </strong>automatic failover if the primary instance fails</li><li><strong>Separate scaling</strong> scale your database independently from your app server</li><li><strong>Security patches</strong> the cloud provider handles database engine updates for you</li></ul><p>To switch, simply update your config/database.yml to point to your managed database&#39;s endpoint instead of db, and remove the db service from your compose.yaml entirely. Everything else stays the same.</p><h3>Final Tips</h3><ul><li><strong>Backups:</strong> Regularly back up the files/ directory. That&#39;s where uploaded attachments live. If you&#39;re using a managed database, backups are handled for you. Otherwise, also back up postgresql/data/.</li><li><strong>Updates:</strong> To upgrade Redmine, update the image tag in compose.yaml, then run docker compose pull and docker compose up -d.</li><li><strong>Plugins:</strong> Drop plugin folders into the plugins/ directory and restart the container — REDMINE_PLUGINS_MIGRATE: &quot;true&quot; will handle the rest.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6e8e6eb6f49f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Configure Cluster Autoscaler in AWS EKS]]></title>
            <link>https://ikarthiks.medium.com/configure-cluster-autoscaler-in-aws-eks-d5a83a5914b2?source=rss-559076fcc869------2</link>
            <guid isPermaLink="false">https://medium.com/p/d5a83a5914b2</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[S Karthik]]></dc:creator>
            <pubDate>Sat, 25 Apr 2026 13:42:42 GMT</pubDate>
            <atom:updated>2026-04-25T13:46:33.107Z</atom:updated>
            <content:encoded><![CDATA[<p>If you’re running workloads on Amazon EKS, managing node scaling manually can quickly become painful. That’s where Cluster Autoscaler helps , it automatically adjusts the number of nodes in your cluster based on workload demand.</p><p>In this guide, I’ll walk you through setting up Cluster Autoscaler in EKS step by step, along with the concepts you need to understand before using it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mY_eBCM_SoWTeILu-utWew.png" /></figure><h3>Prerequisites</h3><p>Before we start, make sure you have the following ready:</p><ul><li>Create an IAM OIDC identity provider for your cluster with the AWS Management Console using the documentation. This is required because we will use <strong>IAM Roles for Service Accounts (IRSA)</strong> to securely allow Kubernetes pods to access AWS services.</li><li>An Active EKS cluster (1.14 preferred since it is the latest) against which the user is able to run kubectl commands. Ensure your kubectl is configured and working.</li><li>Cluster must consist of at least one worker node ASG. Cluster Autoscaler works with <strong>Auto Scaling Groups (ASG)</strong>, so this is mandatory.</li><li>Ensure your EKS cluster Node Auto Scaling group has these tags</li></ul><pre>k8s.io/cluster-autoscaler/enabled=true<br>k8s.io/cluster-autoscaler/&#39;awsExampleClusterName&#39;=owned</pre><p>These tags allow the autoscaler to <strong>auto-discover node groups</strong>. Replace &#39;awsExampleClusterName&#39; with your actual cluster name.</p><h3>Create an IAM Policy for Cluster Autoscaler</h3><p>We need to give permissions for the autoscaler to:</p><ul><li>View Auto Scaling Groups</li><li>Increase/decrease node count</li></ul><p><strong>Policy Name: </strong>eksClusterAutoscaler</p><pre>{<br>    &quot;Version&quot;: &quot;2012-10-17&quot;,<br>    &quot;Statement&quot;: [<br>        {<br>            &quot;Effect&quot;: &quot;Allow&quot;,<br>            &quot;Action&quot;: [<br>                &quot;autoscaling:DescribeAutoScalingGroups&quot;,<br>                &quot;autoscaling:DescribeAutoScalingInstances&quot;,<br>                &quot;autoscaling:DescribeLaunchConfigurations&quot;,<br>                &quot;autoscaling:DescribeScalingActivities&quot;,<br>                &quot;ec2:DescribeInstanceTypes&quot;,<br>                &quot;ec2:DescribeLaunchTemplateVersions&quot;<br>            ],<br>            &quot;Resource&quot;: [&quot;*&quot;]<br>        },<br>        {<br>            &quot;Effect&quot;: &quot;Allow&quot;,<br>            &quot;Action&quot;: [<br>                &quot;autoscaling:SetDesiredCapacity&quot;,<br>                &quot;autoscaling:TerminateInstanceInAutoScalingGroup&quot;<br>            ],<br>            &quot;Resource&quot;: [&quot;*&quot;]<br>        }<br>    ]<br>}</pre><p>This policy allows the autoscaler to both <strong>monitor and modify</strong> node groups.</p><h3>Create an IAM Role for Cluster Autoscaler</h3><p>Now we create a role that Kubernetes will assume using OIDC.</p><p><strong>Name:</strong> eksClusterAutoscaler</p><h4>Custom Trust Policy</h4><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.&lt;REGION&gt;.amazonaws.com/id/&lt;OIDC_ID&gt;&quot;<br>      },<br>      &quot;Action&quot;: &quot;sts:AssumeRoleWithWebIdentity&quot;,<br>      &quot;Condition&quot;: {<br>        &quot;StringEquals&quot;: {<br>          &quot;oidc.eks.&lt;REGION&gt;.amazonaws.com/id/&lt;OIDC_ID&gt;:aud&quot;: &quot;sts.amazonaws.com&quot;,<br>          &quot;oidc.eks.&lt;REGION&gt;.amazonaws.com/id/&lt;OIDC_ID&gt;:sub&quot;: &quot;system:serviceaccount:kube-system:cluster-autoscaler&quot;<br>        }<br>      }<br>    }<br>  ]<br>}</pre><p>Replace, &lt;ACCOUNT_ID&gt;, &lt;REGION&gt; and &lt;OIDC_ID&gt;</p><p>This trust policy ensures that only the <strong>cluster-autoscaler service account</strong> can assume this role.</p><p>Finally, Attach the created policy eksClusterAutoscaler to this role.</p><h3>Install Cluster Autoscaler</h3><p>Now we deploy the autoscaler into the cluster.</p><h4>Download the official YAML</h4><pre>wget https://raw.githubusercontent.com/kubernetes/autoscaler/master/cluster-autoscaler/cloudprovider/aws/examples/cluster-autoscaler-autodiscover.yaml</pre><p>Open the file in an editor.</p><h4>Change 1: Update Cluster Details &amp; Image Version</h4><p>Update the following:</p><ul><li>&lt;YOUR CLUSTER NAME&gt;</li><li>&lt;YOUR CLUSTER REGION&gt;</li><li>Cluster Autoscaler image version</li></ul><p>Important: The autoscaler version must match your Kubernetes version. To find the latest version: <a href="https://github.com/kubernetes/autoscaler/releases">https://github.com/kubernetes/autoscaler/releases</a></p><p>Example:</p><pre>spec:<br>  serviceAccountName: cluster-autoscaler<br>  containers:<br>    - image: registry.k8s.io/autoscaling/cluster-autoscaler:v1.34.0<br>      name: cluster-autoscaler<br>      resources:<br>        limits:<br>          cpu: 100m<br>          memory: 600Mi<br>        requests:<br>          cpu: 100m<br>          memory: 600Mi<br>      command:<br>        - ./cluster-autoscaler<br>        - --v=4<br>        - --stderrthreshold=info<br>        - --cloud-provider=aws<br>        - --skip-nodes-with-local-storage=false<br>        - --expander=least-waste<br>        - --node-group-auto-discovery=asg:tag=k8s.io/cluster-autoscaler/enabled,k8s.io/cluster-autoscaler/&lt;YOUR CLUSTER NAME&gt;<br>      env:<br>        - name: AWS_REGION<br>          value: &lt;YOUR CLUSTER REGION&gt;</pre><h4>Change 2: Attach IAM Role using OIDC (IRSA)</h4><p>Modify the ServiceAccount section:</p><pre>apiVersion: v1<br>kind: ServiceAccount<br>metadata:<br>  labels:<br>    k8s-addon: cluster-autoscaler.addons.k8s.io<br>    k8s-app: cluster-autoscaler<br>  annotations:<br>    eks.amazonaws.com/role-arn: arn:aws:iam::xxxxx:role/Amazon_CA_role<br>  name: cluster-autoscaler<br>  namespace: kube-system</pre><p>Replace with your IAM Role ARN.</p><h4>Apply the Manifest</h4><pre>kubectl apply -f &lt;DOWNLOADED CLUSTER AUTOSCALER YAML &gt;</pre><h4>Verify Deployment</h4><pre>kubectl get pods -n kube-system</pre><p>You should see the cluster-autoscaler pod running.</p><h3>Key Concepts (Very Important)</h3><p>This is where most beginners get confused.</p><h4>Autoscaler DOES NOT scale based on CPU/Memory usage</h4><p>It scales based on <strong>Pending Pods (Unschedulable Pods)</strong></p><p>Meaning:</p><ul><li>If Kubernetes cannot place a pod due to lack of resources → Autoscaler adds nodes</li><li>If nodes are underutilized → Autoscaler removes nodes</li></ul><h4>Your Deployment Must Have Resource Requests</h4><p>Example:</p><pre>resources:<br>  requests:<br>    cpu: &quot;500m&quot;<br>    memory: &quot;512Mi&quot;</pre><p>Without this, Kubernetes doesn’t know how much resource a pod needs → Autoscaler won’t work properly.</p><h4>Configure HPA (Horizontal Pod Autoscaler)</h4><p>Example:</p><pre>minReplicas: 1<br>maxReplicas: 20</pre><p>HPA increases pods → Autoscaler increases nodes and they work together.</p><h4>Node Group Scaling Configuration</h4><p>Your node group must allow scaling:</p><pre>Min: 2<br>Desired: 2<br>Max: 10  ← important</pre><p>If max is too low, autoscaler cannot scale beyond it.</p><h4>Final Understanding (How Everything Works Together)</h4><ol><li>Load increases</li><li>HPA increases pods</li><li>Pods go into <strong>Pending state</strong> (not enough nodes)</li><li>Cluster Autoscaler detects this</li><li>It increases node count via ASG</li><li>Pods get scheduled successfully</li></ol><h3>Conclusion</h3><p>Cluster Autoscaler is a <strong>must-have component</strong> for any production EKS setup. It ensures:</p><ul><li>Efficient resource usage</li><li>Cost optimization</li><li>Automatic scaling without manual intervention</li></ul><p>Once configured correctly, it works silently in the background and keeps your cluster healthy.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d5a83a5914b2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploying Odoo with Docker and Nginx: A Production-Ready Guide]]></title>
            <link>https://ikarthiks.medium.com/deploying-odoo-with-docker-and-nginx-a-production-ready-guide-859d5ba81183?source=rss-559076fcc869------2</link>
            <guid isPermaLink="false">https://medium.com/p/859d5ba81183</guid>
            <category><![CDATA[odoo]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[S Karthik]]></dc:creator>
            <pubDate>Thu, 02 Apr 2026 06:53:33 GMT</pubDate>
            <atom:updated>2026-04-02T06:53:33.128Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*crVeWUCLyyebGGJ2PSdCTw.png" /></figure><p>Odoo is one of the most comprehensive open-source ERP platforms available today, covering everything from CRM and sales to accounting, inventory, manufacturing, and HR — all in a single application. With the release of Odoo 18, there’s never been a better time to self-host your own instance and retain full control over your business data.</p><p>In this guide, you’ll deploy a production-ready Odoo 18 instance using Docker Compose, backed by PostgreSQL, served through Nginx as a reverse proxy, and secured with a Let’s Encrypt SSL certificate. By the end, you’ll have a robust, maintainable setup that mirrors real-world production deployments.</p><h3>Prerequisites</h3><ul><li>A Linux server (Ubuntu 22.04+ recommended) with at least 4 GB RAM and 2 CPU cores</li><li>Docker and Docker Compose installed</li><li>A domain name with DNS configured to point to your server’s IP</li><li>Nginx installed on the host (for reverse proxying)</li><li>Certbot installed for SSL certificate management</li><li>Root or sudo access to the server</li></ul><h3>Set up the project directory structure</h3><p>SSH into your server and create the necessary directories. These directories will be mounted as Docker volumes, ensuring your data and configuration persist across container restarts.</p><pre>mkdir odoo config addons</pre><p>Here’s what each directory is for:</p><ul><li>odoo/ — stores Odoo&#39;s runtime data (sessions, filestore, etc.)</li><li>config/ — holds your odoo.conf configuration file</li><li>addons/ — place your custom or third-party Odoo modules here</li></ul><blockquote><em>Before starting the containers, set the correct ownership on the </em><em>odoo/ directory. The Odoo Docker image runs as UID 100 / GID 101 internally, so the host directory must match — otherwise Odoo will fail to write its filestore and session data.</em></blockquote><pre>sudo chown -R 100:101 ./odoo</pre><blockquote><em>This is one of the most common “silent” issues in Odoo Docker deployments — the container starts fine but throws permission errors when trying to write files. Setting ownership upfront prevents it entirely.</em></blockquote><h3>Create the Odoo configuration file</h3><p>Inside the config/ directory, create a file named odoo.conf. This file controls everything from database credentials to worker and memory limits.</p><pre>[options]<br>admin_passwd = Ye7KkxjHR20w7q3i3hXSX34Dsx<br>addons_path = /mnt/extra-addons<br><br>; Database connection<br>db_port = 5432<br>db_name = production<br>db_user = odoo<br>db_password = pwd<br>dbfilter = ^production$<br>list_db  = False<br>db_template = template0<br><br>limit_memory_hard = 805306368<br>limit_memory_soft = 671088640<br>limit_request = 8192<br>limit_time_cpu = 600<br>limit_time_real = 1200<br>max_cron_threads = 1<br>workers = 3<br><br>proxy_mode = True</pre><p>Change <strong>admin_passwd</strong> and <strong>db_password</strong> to strong, unique values before deploying. Never leave default credentials in production.</p><p>Note that proxy_mode = True is required when Odoo sits behind a reverse proxy like Nginx. It allows Odoo to correctly read the client&#39;s real IP address from forwarded headers.</p><h3>Create the Docker Compose file</h3><p>In your project root, create a compose.yaml file. This defines two services, the Odoo application and its PostgreSQL database connected over an isolated Docker network.</p><pre>name: odoo<br>services:<br>  odoo:<br>    image: odoo:18.0<br>    container_name: ct-odoo-01<br>    restart: unless-stopped<br>    command: odoo -c /etc/odoo/odoo.conf -i base<br>    depends_on:<br>      - db<br>    environment:<br>      HOST: db<br>    ports:<br>      - &quot;8069:8069&quot;<br>      - &quot;8072:8072&quot;<br>    volumes:<br>      - ./odoo:/var/lib/odoo<br>      - ./config:/etc/odoo<br>      - ./addons:/mnt/extra-addons<br>    networks:<br>      - odoo-net<br>    deploy:<br>      resources:<br>        limits:<br>          memory: 2G<br>        reservations:<br>          memory: 1G<br>  db:<br>    image: postgres:18-alpine<br>    container_name: ct-odoo-db-01<br>    restart: unless-stopped<br>    user: &#39;1000&#39;<br>    environment:<br>      POSTGRES_USER: admin<br>      POSTGRES_PASSWORD: DF50s4911MsB<br>      POSTGRES_DB: postgres<br>    volumes:<br>      - ./postgresql:/var/lib/postgresql<br>    networks:<br>      - odoo-net<br>    deploy:<br>      resources:<br>        limits:<br>          memory: 1G<br>        reservations:<br>          memory: 512M<br>networks:<br>  odoo-net:<br>    driver: bridge</pre><p>Port 8069 is the main Odoo HTTP interface. Port 8072 is used for WebSocket connections (live chat, real-time notifications). Both must be accessible to the Nginx proxy on the host.</p><h3>Start the PostgreSQL container</h3><p>Bring up only the database container first. This gives PostgreSQL time to initialize before Odoo tries to connect.</p><pre>docker compose up -d db</pre><p>Verify it’s running with docker ps and check logs with docker logs ct-odoo-db-01 if needed.</p><h3>Initialize the database and user</h3><p>Once the database container is healthy, exec into it and create the dedicated Odoo database user and database. This isolates Odoo’s data from the default postgres superuser account.</p><pre>docker exec -it ct-odoo-db-01 /bin/bash<br>psql -h localhost -U admin -d postgres</pre><p>Then run the following SQL commands:</p><pre>CREATE USER odoo WITH PASSWORD &#39;your_strong_db_password&#39; NOCREATEDB;<br><br>CREATE DATABASE mycompany_prod OWNER odoo ENCODING &#39;UTF8&#39; TEMPLATE template0;<br><br>GRANT ALL PRIVILEGES ON DATABASE mycompany_prod TO odoo;<br><br>\c mycompany_prod<br>GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO odoo;<br>GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO odoo;<br>GRANT ALL PRIVILEGES ON ALL FUNCTIONS IN SCHEMA public TO odoo;<br>ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL PRIVILEGES ON TABLES TO odoo;<br>ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL PRIVILEGES ON SEQUENCES TO odoo;</pre><p>Using TEMPLATE template0 ensures a clean database without any locale-specific defaults that could cause encoding conflicts with Odoo.</p><p>After this, update your odoo.conf to reflect the new database name, user, and password you just created.</p><h3>Tune workers and memory limits</h3><p>Odoo’s performance is heavily influenced by its worker and memory configuration. The right values depend on your server’s hardware. Here’s how to calculate them:</p><p>The official formula recommends:</p><ul><li>Workers = min(concurrent users / 6, (CPU cores × 2) + 1)</li><li>RAM ≈ workers × ((0.8 × 150MB) + (0.2 × 1024MB))</li></ul><p>For example, on a server with 4 CPUs and 60 concurrent users:</p><pre>[options]<br>limit_memory_hard = 1677721600<br>limit_memory_soft = 629145600<br>limit_request = 8192<br>limit_time_cpu = 600<br>limit_time_real = 1200<br>max_cron_threads = 1<br>workers = 8</pre><p>Adjust these values to match your actual hardware. Monitor CPU load after deployment and target a load average between 70–80% of your worker count for healthy throughput.</p><h3>Start the Odoo container</h3><p>With the database ready and configuration updated, bring up the Odoo container:</p><pre>docker compose up -d odoo</pre><p>Watch the startup logs to confirm Odoo connects to the database successfully:</p><pre>docker logs -f ct-odoo-01</pre><h3>Configure Nginx as a reverse proxy</h3><p>Nginx sits in front of Odoo, handles SSL termination, serves static assets efficiently, and forwards traffic to the correct backend port. Create a new Nginx site configuration file (e.g., /etc/nginx/sites-available/odoo):</p><pre># -----------------------------<br># Odoo upstream servers<br># -----------------------------<br>upstream odoo {<br>    server 127.0.0.1:8069;<br>}<br><br>upstream odoochat {<br>    server 127.0.0.1:8072;<br>}<br><br># WebSocket connection handling<br>map $http_upgrade $connection_upgrade {<br>    default upgrade;<br>    &#39;&#39;      close;<br>}<br><br># -----------------------------<br># HTTP server<br># -----------------------------<br>server {<br>    listen 80;<br>    server_name odoo.example.com;<br><br>    # Logs<br>    access_log /var/log/nginx/odoo.access.log;<br>    error_log  /var/log/nginx/odoo.error.log;<br><br>    # Timeouts (Odoo recommended)<br>    proxy_read_timeout 720s;<br>    proxy_connect_timeout 720s;<br>    proxy_send_timeout 720s;<br><br>    # -----------------------------<br>    # WebSocket / longpolling<br>    # -----------------------------<br>    location /websocket {<br>        proxy_pass http://odoochat;<br><br>        proxy_set_header Upgrade $http_upgrade;<br>        proxy_set_header Connection $connection_upgrade;<br><br>        proxy_set_header X-Forwarded-Host  $host;<br>        proxy_set_header X-Forwarded-For   $proxy_add_x_forwarded_for;<br>        proxy_set_header X-Forwarded-Proto $scheme;<br>        proxy_set_header X-Real-IP         $remote_addr;<br>    }<br><br>    # -----------------------------<br>    # Main Odoo backend<br>    # -----------------------------<br>    location / {<br>        proxy_pass http://odoo;<br>        proxy_redirect off;<br><br>        proxy_set_header X-Forwarded-Host  $host;<br>        proxy_set_header X-Forwarded-For   $proxy_add_x_forwarded_for;<br>        proxy_set_header X-Forwarded-Proto $scheme;<br>        proxy_set_header X-Real-IP         $remote_addr;<br>    }<br><br>    # -----------------------------<br>    # Static assets (optional but recommended)<br>    # -----------------------------<br>    location ~* /web/static/ {<br>        proxy_pass http://odoo;<br>        expires 10d;<br>        access_log off;<br>    }<br><br>    # -----------------------------<br>    # Gzip (safe + recommended)<br>    # -----------------------------<br>    gzip on;<br>    gzip_types<br>        text/css<br>        text/scss<br>        text/plain<br>        text/xml<br>        application/xml<br>        application/json<br>        application/javascript;<br>}</pre><p>Enable the site and reload Nginx:</p><pre>sudo ln -s /etc/nginx/sites-available/odoo /etc/nginx/sites-enabled/<br>sudo nginx -t &amp;&amp; sudo systemctl reload nginx</pre><h3>Enable HTTPS with Let’s Encrypt</h3><p>Secure your Odoo instance with a free SSL certificate using Certbot:</p><pre>sudo certbot --nginx -d odoo.example.com</pre><p>Certbot will automatically modify your Nginx config to handle HTTPS and set up auto-renewal via a systemd timer or cron job. Verify renewal works with:</p><pre>sudo certbot renew --dry-run</pre><p>After enabling SSL, make sure your odoo.conf has proxy_mode = True so Odoo correctly identifies requests as HTTPS when forwarded by Nginx.</p><h3>Conclusion</h3><p>You now have a fully functional, production-grade Odoo 18 instance running in Docker, fronted by Nginx, and secured with SSL. Here’s a quick recap of what you’ve built:</p><ul><li>A containerized Odoo 18 service with persistent volume mounts</li><li>A dedicated PostgreSQL database with a least-privilege user</li><li>Memory and worker tuning based on your server’s actual capacity</li><li>Nginx handling WebSocket connections, static asset caching, and gzip compression</li><li>HTTPS encryption via Let’s Encrypt with automatic renewal</li></ul><p>From here, you can log in at https://odoo.example.com using the default credentials (<strong>admin</strong> / <strong>admin</strong>) — and the first thing you should do is change that password immediately.</p><p>As your team grows, revisit the worker and memory tuning in Step 6. Consider adding a Redis cache for session management in high-concurrency setups, and set up regular PostgreSQL backups using pg_dump or a managed backup solution to protect your business data.</p><p>Self-hosting Odoo gives you full control over your ERP — your data stays on your infrastructure, customizations are unrestricted, and scaling is entirely on your terms. With this foundation in place, you’re ready to configure your first Odoo apps and onboard your team.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=859d5ba81183" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Step-by-Step Guide to Creating Public and Private Subnets in Microsoft Azure]]></title>
            <link>https://ikarthiks.medium.com/step-by-step-guide-to-creating-public-and-private-subnets-in-microsoft-azure-d4502fbd2c74?source=rss-559076fcc869------2</link>
            <guid isPermaLink="false">https://medium.com/p/d4502fbd2c74</guid>
            <category><![CDATA[microsoft]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[S Karthik]]></dc:creator>
            <pubDate>Sun, 15 Mar 2026 14:24:17 GMT</pubDate>
            <atom:updated>2026-03-15T14:24:17.286Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PEKlgPRDtfsDC6117onT9g.png" /></figure><p>Cloud networking is one of the most important concepts when designing secure and scalable infrastructure. When deploying resources in the cloud, it is always recommended to separate public-facing services from private resources. This improves security, control, and network architecture.</p><p>In this guide, I will walk through how to create a <strong>Virtual Network with public and private subnets in Azure</strong>, configure <strong>route tables</strong>, <strong>network security groups</strong>, and a <strong>NAT Gateway</strong> to allow secure outbound connectivity for private resources.</p><p>This setup is useful for architectures where <strong>public resources (like bastion or jump servers)</strong> can access <strong>private resources (like application servers or databases)</strong> without exposing them directly to the internet.</p><h3>Create Resource Group</h3><ul><li>Login into azure portal</li><li>Then create a resource group named as <strong>rg-example-dev-central-india-01</strong></li></ul><h3>Create Virtual Network</h3><p>After successfully created the resource group, create a VNet named as <strong>vnet-example-dev-central-india-01</strong> with this IPv4 Address space <strong>10.0.0.0/16</strong></p><p>This virtual network will act as the main network boundary where all your Azure resources will reside</p><h3>Create Subnets</h3><p>After successfully created the VNet, create two subnets named as below with this</p><ul><li><strong>snet-example-dev-central-india-01 (10.0.1.0/24) — For public</strong></li><li><strong>snet-example-dev-central-india-02 (10.0.2.0/24) — For Private</strong></li></ul><p>You must select <strong>Enable private subnet (no default outbound access)</strong> while creating the subnet.</p><p>This ensures that private resources do not automatically get outbound internet access unless explicitly configured.</p><h3>Create Route Tables</h3><p>After successfully created the subnets, create route tables named as below</p><h4>Public Route Table</h4><p><strong>rt-example-dev-central-india-01 for public subnet</strong></p><p>Add the route as below in public route table <strong>rt-example-dev-central-india-01</strong> and associated the public subnet <strong>snet-example-dev-central-india-01</strong> to this route</p><ul><li>Route name: <strong>route-example-dev-01</strong></li><li>Destination type: <strong>IP Addresses</strong></li><li>Destination IP addresses/CIDR ranges: <strong>0.0.0.0/0</strong></li><li>Next hop type: <strong>Internet</strong></li></ul><p>This allows public subnet resources to access the internet directly.</p><h4>Private Route Table</h4><p><strong>rt-example-dev-central-india-02 for private subnet</strong></p><p>Add the route as below in private route table <strong>rt-example-dev-central-india-02</strong> and associated the public subnet <strong>snet-example-dev-central-india-02</strong> to this route</p><ul><li>Route name: <strong>route-example-dev-01</strong></li><li>Destination type: <strong>IP Addresses</strong></li><li>Destination IP addresses/CIDR ranges: <strong>0.0.0.0/0</strong></li><li>Next hop type: <strong>Virtual Network</strong></li></ul><h3>Create Network Security Groups</h3><p>Then create two network security groups for the subnets and associated the security groups for each subnets</p><ul><li><strong>sg-example-dev-central-india-01</strong></li><li><strong>sg-example-dev-central-india-02</strong></li></ul><p>Network Security Groups (NSGs) help control inbound and outbound traffic at the subnet or resource level.</p><h3>Create NAT Gateway</h3><p>After successfully created the security groups, Create a Nat Gateway named as below and associate the private subnet <strong>snet-example-dev-central-india-02</strong></p><p><strong>nat-example-dev-central-india-01</strong></p><p>While creating a NAT Gateway you need to assign a public IP address so for that create a public IP named as <strong>pip-example-dev-central-india-01</strong></p><p>The NAT Gateway allows <strong>private subnet resources to access the internet for updates or package downloads</strong> without exposing them to inbound internet traffic.</p><h3>Create Virtual Machines</h3><p>That’s all. Now you can create resources with specific subnets as per your requirements.</p><p>For example, I have created two Virtual Machines as per below</p><h4>Machine 1 (Public Machine)</h4><p>I have created a VM named as <strong>vm-example-dev-central-india-01</strong>.<br>This machine I have placed in <strong>snet-example-dev-central-india-01</strong>.</p><p>Also while creating this machine I have assigned a public IP (<strong>pip-example-dev-central-india-02</strong>) with the Network Interface of the Virtual Machine.</p><p>This machine can be used as a <strong>jump server or bastion host</strong> to access private resources.</p><h4>Machine 2 (Private Machine)</h4><p>Then I have created a VM named as <strong>vm-example-dev-central-india-02</strong>.<br>This machine I have placed in <strong>snet-example-dev-central-india-02</strong>.</p><p>Also while creating this machine I have <strong>not assigned a public IP with the Network Interface of the Virtual Machine</strong>.</p><p>Because in azure when we assign a public ip to a services in azure like virtual machine, That resources have defaultly had internet facing. So please don’t assign any pubic ip for your private resources.</p><p>Now the machine 2 only accessbile from the Machine 1 via the private ip of Machine.</p><h3>Conclusion</h3><p>Designing a secure network architecture in Azure is critical for protecting your cloud infrastructure. By separating resources into <strong>public and private subnets</strong>, using <strong>route tables</strong>, <strong>network security groups</strong>, and <strong>NAT Gateway</strong>, you can control how traffic flows in and out of your environment.</p><p>In this setup, public resources act as controlled entry points, while private resources remain isolated from the internet. This architecture is commonly used in production environments to maintain strong security and proper network segmentation.</p><p>Following this approach will help you build <strong>secure, scalable, and well-structured Azure environments</strong> for your applications and services.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d4502fbd2c74" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Mount AWS EFS on an EC2 Instance (Step-by-Step Guide)]]></title>
            <link>https://ikarthiks.medium.com/how-to-mount-aws-efs-on-an-ec2-instance-step-by-step-guide-0787ea94ee92?source=rss-559076fcc869------2</link>
            <guid isPermaLink="false">https://medium.com/p/0787ea94ee92</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[S Karthik]]></dc:creator>
            <pubDate>Fri, 13 Mar 2026 12:24:18 GMT</pubDate>
            <atom:updated>2026-03-13T12:27:47.308Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pKJaYRqDd3I0lhHp0W2sUA.png" /></figure><p>Amazon Elastic File System (EFS) is a scalable and fully managed file storage service provided by AWS. It allows multiple EC2 instances to access the same shared file system simultaneously using the NFS protocol. This makes it ideal for workloads such as container storage, shared application data, content management systems, and analytics workloads.</p><p>In many production environments, security and network architecture are important considerations. For example, it is recommended to keep storage resources in private subnets and restrict access using security groups.</p><p>In this tutorial, I will demonstrate how to mount an AWS EFS file system to an EC2 instance within a VPC. The EC2 instance will run in a public subnet, while the EFS will be placed in private subnets with restricted network access.</p><h3>Network and Security Considerations</h3><p>Ensure your EFS security rule <strong>NFS(2049)</strong> has been added and only allowed from the EC2 resource security group.</p><p>Please place your EFS in private subnets only and ensure the security group of the EFS doesn’t have any outbound rule. Also configure the private subnets without internet to don’t attach any nat gateways in EFS subnets route tables.</p><p>In this tutorial i have created a debian linux in a public subnet and created the EFS in private subnets (without internet)</p><h3>Gather Information</h3><ul><li><strong>Login </strong>to your AWS account</li><li>Navigate to your <strong>EFS file system</strong></li><li>From your <strong>EFS file system dashboard</strong>, Select <strong>Network </strong>tab copy the <strong>IPv4 address</strong> of your EFS file system</li></ul><h3>Install the NFS Client on your EC2 Instance</h3><ul><li>Connect to your EC2 instance.</li><li>Execute the following commands on the EC2 instance to install the NFS client</li></ul><pre>sudo apt install nfs-common</pre><p>The <strong>nfs-common</strong> package provides the NFS client utilities required to mount network file systems like AWS EFS.</p><h3>Mount the File System on your EC2 Instance and Test</h3><ul><li>Make a directory (eg. efs-example-dev-ca-central-1–01). I have using the same name of the directory of the efs name in aws</li></ul><pre>mkdir efs-example-dev-ca-central-1-01</pre><ul><li>Mount the EFS file system</li></ul><pre>sudo mount -t nfs -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport mount-target-IP:/ efs-example-dev-ca-central-1-01</pre><p>replace mount-target-IP the with your EFS IPv4 address</p><ul><li>The root directory of a file system, upon creation, is owned by and is writable by the root user, so you need to change permissions to add files.</li></ul><pre>sudo chmod go+rw efs-example-dev-ca-central-1-01</pre><ul><li>Create a text file.</li></ul><pre>touch test-file.txt</pre><h3>Verifying the Mount</h3><p>To verify that the EFS file system is mounted successfully, you can run:</p><pre>df -h</pre><p>You should see the mounted EFS directory listed among the mounted file systems. You can also list files in the mounted directory:</p><pre>ls -l efs-example-dev-ca-central-1-01</pre><h3>Conclusion</h3><p>Mounting an AWS EFS file system on an EC2 instance is straightforward when the correct network configuration and NFS client setup are in place. By placing EFS in private subnets and restricting access using security groups, you can ensure a more secure and controlled environment.</p><p>In this tutorial, we configured a Debian EC2 instance to mount an EFS file system that resides in private subnets. After installing the NFS client, creating a mount directory, and mounting the file system, we verified the setup by creating a test file.</p><p>This approach can be extended to multiple EC2 instances or even container platforms such as Kubernetes and EKS, enabling scalable shared storage for modern cloud-native applications.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0787ea94ee92" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Mount Amazon EFS in Amazon EKS Using the EFS CSI Driver]]></title>
            <link>https://ikarthiks.medium.com/how-to-mount-amazon-efs-in-amazon-eks-using-the-efs-csi-driver-14804015bd7d?source=rss-559076fcc869------2</link>
            <guid isPermaLink="false">https://medium.com/p/14804015bd7d</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[S Karthik]]></dc:creator>
            <pubDate>Fri, 13 Mar 2026 07:24:38 GMT</pubDate>
            <atom:updated>2026-03-13T07:28:53.490Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0sAL5-rjYKxSpKQ_Y-G1zw.png" /></figure><p>Running stateful workloads in Kubernetes often requires persistent shared storage that can be accessed by multiple pods. In AWS, <strong>Amazon Elastic File System (EFS)</strong> provides a scalable and fully managed file system that works perfectly with <strong>Amazon EKS</strong>.</p><p>In this guide, I will walk through how to <strong>integrate Amazon EFS with Amazon EKS using the EFS CSI driver</strong> and mount it inside your Kubernetes pods. This approach allows your applications to store and share data across multiple pods using a highly available NFS-based storage backend.</p><h3>Prerequisites</h3><p>Before starting the setup, ensure the following prerequisites are met:</p><ul><li>An <strong>OpenID Connect (OIDC) provider</strong> configured for your cluster<br> See: <em>Create an IAM OIDC provider for your cluster</em></li><li><strong>AWS CLI</strong></li><li><strong>kubectl</strong></li></ul><p>Reference:<br><a href="https://docs.aws.amazon.com/eks/latest/userguide/efs-csi.html#console_efs_store_app_data">https://docs.aws.amazon.com/eks/latest/userguide/efs-csi.html#console_efs_store_app_data</a></p><h3>Create an EFS Role</h3><p>The <strong>EFS CSI driver</strong> requires an IAM role with the appropriate permissions to manage and mount the EFS file system.</p><p>Run the following to create an IAM role with AWS Management Console.</p><ol><li>Open the IAM console at <a href="https://console.aws.amazon.com/iam/">https://console.aws.amazon.com/iam/</a></li></ol><p>2. In the left navigation pane, choose <strong>Roles</strong>.</p><p>3. On the Roles page, choose <strong>Create role</strong>.</p><p>4. On the <strong>Select trusted entity</strong> page, do the following:</p><p>In the <strong>Trusted entity type</strong> section, choose <strong>Web identity</strong>.</p><p>For <strong>Identity provider</strong>, choose the <strong>OpenID Connect provider URL for your cluster</strong> (as shown under Overview in Amazon EKS).</p><p>For <strong>Audience</strong>, choose:</p><pre>sts.amazonaws.com</pre><p>Choose <strong>Next</strong>.</p><p>5. On the <strong>Add permissions</strong> page, do the following:</p><p>In the <strong>Filter policies</strong> box, enter:</p><pre>AmazonEFSCSIDriverPolicy</pre><p>Select the check box to the left of the <strong>AmazonEFSCSIDriverPolicy</strong> returned in the search.</p><p>Choose <strong>Next</strong>.</p><p>6. On the <strong>Name, review, and create</strong> page, do the following:</p><p>For <strong>Role name</strong>, enter a unique name for your role, such as:</p><pre>AmazonEKS_EFS_CSI_DriverRole</pre><p>Choose <strong>Create role</strong>.</p><p>7. After the role is created:</p><p>Choose the created role to open it for editing.</p><p>Choose the <strong>Trust relationships</strong> tab, and then choose <strong>Edit trust policy</strong>.</p><p>Find the line that looks similar to the following line:</p><pre>&quot;oidc.eks.region-code.amazonaws.com/id/&lt;EXAMPLED539D4633E53DE1B71EXAMPLE&gt;:aud&quot;: &quot;sts.amazonaws.com&quot;</pre><p>Add the following line above the previous line.</p><p>Replace &lt;region-code&gt; with the AWS Region that your cluster is in. Replace &lt;EXAMPLED539D4633E53DE1B71EXAMPLE&gt; with your cluster’s OIDC provider ID.</p><pre>&quot;oidc.eks.&lt;region-code&gt;.amazonaws.com/id/&lt;EXAMPLED539D4633E53DE1B71EXAMPLE&gt;:sub&quot;: &quot;system:serviceaccount:kube-system:efs-csi-*&quot;,</pre><p>Modify the Condition operator from:</p><pre>&quot;StringEquals&quot;</pre><p>to</p><pre>&quot;StringLike&quot;</pre><p>8. Choose <strong>Update policy</strong> to finish.</p><h3>Get the Amazon EFS CSI Driver</h3><p>AWS recommends installing the <strong>Amazon EFS CSI driver</strong> using the <strong>Amazon EKS Add-on</strong> method. This ensures the driver is managed directly by AWS and simplifies upgrades and maintenance.</p><p>To add the EFS CSI driver:</p><ol><li>Open the <strong>Amazon EKS Console</strong></li><li>Select your <strong>EKS Cluster</strong></li><li>Go to the <strong>Add-ons</strong> section</li><li>Choose <strong>Get more add-ons</strong></li><li>Select <strong>Amazon EFS CSI Driver</strong></li><li>Associate the IAM role created in the previous step</li></ol><p>Once installed, the driver will allow Kubernetes to communicate with Amazon EFS for storage provisioning and mounting.</p><h3>Create an EFS File System</h3><p>Create an <strong>Amazon EFS file system</strong> in your VPC.</p><p>Best practices:</p><ul><li>Create the EFS in <strong>private subnets</strong> (recommended without internet exposure)</li><li>Use the <strong>same VPC where your EKS cluster is running</strong></li><li>Create <strong>EFS mount targets in each Availability Zone</strong> used by your EKS worker nodes</li><li>Use <strong>one security group for all EFS mount targets</strong></li></ul><p>Security Group Configuration:</p><p>Allow <strong>NFS (Port 2049)</strong> from the <strong>EKS Node Security Group</strong> in the <strong>EFS Security Group</strong>.</p><p>This allows Kubernetes nodes to connect to the EFS file system.</p><h3>Configure Storage Class, Persistent Volume and PersistentVolumeClaim</h3><p>To use EFS storage inside Kubernetes pods, we need to define the following resources:</p><h4>Storage Class</h4><pre>apiVersion: storage.k8s.io/v1<br>kind: StorageClass<br>metadata:<br>  name: efs-sc<br>provisioner: efs.csi.aws.com</pre><h4>Persistent Volume</h4><pre>apiVersion: v1<br>kind: PersistentVolume<br>metadata:<br>  name: efs-pv<br>spec:<br>  capacity:<br>    storage: 5Gi<br>  volumeMode: Filesystem<br>  accessModes:<br>    - ReadWriteMany<br>  storageClassName: efs-sc<br>  persistentVolumeReclaimPolicy: Retain<br>  csi:<br>    driver: efs.csi.aws.com<br>    volumeHandle:[FILESYSTEM ID]<br>    volumeAttributes:<br>      mounttargetip: &quot;[MOUNT TARGET IP ADDRESS]&quot;</pre><h4>Persistent Volume Claim</h4><pre>apiVersion: v1<br>kind: PersistentVolumeClaim<br>metadata:<br>  name: efs-claim<br>spec:<br>  accessModes:<br>    - ReadWriteMany<br>  storageClassName: efs-sc<br>  resources:<br>    requests:<br>      storage: 5Gi</pre><h4>Deployment</h4><pre>apiVersion: apps/v1<br>kind: Deployment<br>metadata:<br>  name: sample<br>  namespace: development<br>  labels:<br>    app: sample<br>spec:<br>  revisionHistoryLimit: 2<br>  replicas: 2<br>  selector:<br>    matchLabels:<br>      app: sample<br>  template:<br>    metadata:<br>      labels:<br>        app: sample<br>    spec:<br>      restartPolicy: Always<br>      affinity:<br>        nodeAffinity:<br>          requiredDuringSchedulingIgnoredDuringExecution:<br>            nodeSelectorTerms:<br>            - matchExpressions:<br>              - key: kubernetes.io/arch<br>                operator: In<br>                values:<br>                - amd64<br>                - arm64<br>      containers:<br>      - name: sample<br>        image: your-image:tag<br>        envFrom:<br>        - configMapRef:<br>            name: sample<br>        - secretRef:<br>            name: sample<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;<br>        ports:<br>        - name: http<br>          containerPort: 8000<br>        volumeMounts:<br>            - name: efs-storage<br>              mountPath: /app/data<br>        imagePullPolicy: IfNotPresent<br>      volumes:<br>        - name: efs-storage<br>          persistentVolumeClaim:<br>            claimName: efs-claim<br>      nodeSelector:<br>        kubernetes.io/os: linux</pre><h3>Conclusion</h3><p>Integrating <strong>Amazon EFS with Amazon EKS</strong> provides a powerful solution for applications that require <strong>shared and persistent storage across multiple pods</strong>. By using the <strong>EFS CSI driver</strong>, Kubernetes can seamlessly mount EFS volumes, enabling workloads to store and retrieve data reliably.</p><p>This setup is particularly useful for workloads such as:</p><ul><li>Content management systems</li><li>Logging platforms</li><li>Shared file processing</li><li>Stateful microservices</li></ul><p>With proper IAM configuration, secure networking, and Kubernetes storage resources, EFS becomes a highly scalable and reliable storage option for your EKS workloads.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=14804015bd7d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Private Amazon EKS Cluster with Custom VPC Networking]]></title>
            <link>https://ikarthiks.medium.com/building-a-private-amazon-eks-cluster-with-custom-vpc-networking-8c90ac39e7e2?source=rss-559076fcc869------2</link>
            <guid isPermaLink="false">https://medium.com/p/8c90ac39e7e2</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[S Karthik]]></dc:creator>
            <pubDate>Thu, 12 Mar 2026 12:17:23 GMT</pubDate>
            <atom:updated>2026-03-12T12:17:23.839Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SiBmdAYWpL_0SgjGzCEnsg.png" /></figure><p>Running Kubernetes workloads in a secure and controlled network environment is an important requirement for many organizations. When deploying Kubernetes using <strong>Amazon Web Services</strong>, <strong>Amazon Elastic Kubernetes Service (EKS)</strong> provides a managed control plane while allowing us to design our own networking architecture.</p><p>In this blog, I will walk through how to build a <strong>private EKS cluster</strong> with a custom <strong>VPC networking setup</strong>, including NAT Gateway configuration, subnets across multiple availability zones, and worker node groups using <strong>Bottlerocket</strong>.</p><p>The goal of this setup is to ensure that the Kubernetes cluster runs inside a <strong>private network</strong>, while still allowing the worker nodes to reach the internet securely when required.</p><h3>Networking Setup</h3><p>Create a VPC named as <strong>vpc-example-dev-ap-south-1–01</strong> for your EKS cluster.</p><p>Ensure your VPC has enabled these options:</p><ul><li>DNS hostnames</li><li>DNS resolution</li></ul><p>These DNS options are important because Kubernetes services rely heavily on internal DNS resolution to communicate between pods and services.</p><p>Then create an Internet Gateway named as <strong>igw-example-dev-ap-south-1–01</strong> and attach it to the VPC.</p><p>The Internet Gateway enables communication between the VPC and the internet. Even though the EKS cluster itself will remain private, certain networking components require internet connectivity.</p><h3>Elastic IP Addresses</h3><p>After creating the Internet Gateway, create two Elastic IP addresses named as below:</p><ul><li><strong>eip-example-dev-ap-south-1–01</strong></li><li><strong>eip-example-dev-ap-south-1–02</strong></li></ul><p>These two Elastic IPs will be used for the <strong>NAT Gateway</strong>.</p><p>Elastic IPs provide static public IP addresses which allow the NAT Gateway to maintain consistent outbound connectivity.</p><h3>NAT Gateway</h3><p>Then we need to create a <strong>Regional NAT Gateway</strong> named as below:</p><ul><li><strong>nat-example-dev-ap-south-1–01</strong></li></ul><p>During the NAT Gateway creation, under <strong>Association of IP addresses</strong>, we need to maintain only a number of availability zones as per our requirement.</p><p>In this blog I’m creating a two-zone EKS cluster (<strong>Zone A &amp; Zone B</strong>).</p><p>I will associate the Elastic IP only for <strong>Zone A &amp; Zone B</strong>. Remaining zones are not required, so those zones can be removed.</p><p>The NAT Gateway allows private resources (such as worker nodes) to access the internet for tasks like pulling container images or installing updates, without exposing them directly to the public internet.</p><h3>Subnet Configuration</h3><p>After successfully creating a NAT Gateway, create four subnets named as below in two zones.</p><p>EKS cluster needs at least <strong>two different availability zones</strong> for high availability. For production environments, you should consider <strong>at least three zones</strong>.</p><p>Create the following subnets:</p><ul><li><strong>snet-example-dev-ap-south-1–01 (Zone A)</strong></li><li><strong>snet-example-dev-ap-south-1–02 (Zone B)</strong></li><li><strong>snet-example-dev-ap-south-1–03 (Zone A)</strong></li><li><strong>snet-example-dev-ap-south-1–04 (Zone B)</strong></li></ul><p>Typically, the first two subnets are used for the <strong>EKS control plane</strong>, while the remaining subnets are used for <strong>worker nodes</strong>.</p><h3>Route Table Configuration</h3><p>After successfully creating the subnets, create four route tables named as below and associate the respective subnets.</p><ul><li><strong>rt-example-dev-ap-south-1–01 → snet-example-dev-ap-south-1–01</strong></li><li><strong>rt-example-dev-ap-south-1–02 → snet-example-dev-ap-south-1–02</strong></li><li><strong>rt-example-dev-ap-south-1–03 → snet-example-dev-ap-south-1–03</strong></li><li><strong>rt-example-dev-ap-south-1–04 → snet-example-dev-ap-south-1–04</strong></li></ul><p>After successfully associating the route tables, add the following route in all route tables:</p><p>Destination: <strong>0.0.0.0/0</strong><br>Target: <strong>NAT Gateway that you have created (nat-example-dev-ap-south-1–01)</strong></p><p>This ensures that all outbound traffic from private subnets is routed through the NAT Gateway.</p><h3>EKS Cluster Setup</h3><p>During the EKS creation process, ensure the below options are correctly configured.</p><h4>Configure cluster</h4><p>Cluster authentication mode: <strong>EKS API</strong><br>Deletion protection: <strong>Turn on deletion protection</strong></p><p>Deletion protection helps prevent accidental removal of the cluster, which is particularly important in production environments.</p><h4>Specify networking</h4><p>VPC: <strong>vpc-example-dev-ap-south-1–01</strong></p><p>Subnets: Ensure these subnets only selected:</p><ul><li><strong>snet-example-dev-ap-south-1–01 (Zone A)</strong></li><li><strong>snet-example-dev-ap-south-1–02 (Zone B)</strong></li></ul><p>Cluster endpoint access: <strong>Private</strong></p><p>Using a <strong>private endpoint</strong> ensures that the Kubernetes API server is accessible only within the VPC network, which significantly improves security.</p><h3>Node Group Setup</h3><p>After successfully creating the EKS cluster, ensure the below options are correctly configured for the Node Group setup.</p><h4>Set compute and scaling configuration</h4><p>AMI type: <strong>AWS recommends to use Bottlerocket OS</strong></p><p><strong>Bottlerocket</strong> is recommended by <strong>Amazon Web Services</strong> for <strong>Amazon Elastic Kubernetes Service</strong> worker nodes because it is purpose-built specifically for running containers.</p><p>It removes many traditional operating system components and focuses on:</p><ul><li>Security</li><li>Reliability</li><li>Minimal attack surface</li><li>Easy updates</li><li>Optimized performance for Kubernetes workloads</li></ul><h4>Specify networking</h4><p>Subnets: Ensure these subnets only selected:</p><ul><li><strong>snet-example-dev-ap-south-1–03 (Zone A)</strong></li><li><strong>snet-example-dev-ap-south-1–04 (Zone B)</strong></li></ul><p>These subnets will host the worker nodes that run the application workloads.</p><h3>Accessing the Private EKS Cluster</h3><p>Now you have created a <strong>private EKS cluster for your application infrastructure</strong>.</p><p>Because the cluster endpoint is private, it cannot be accessed directly from the public internet.</p><p>To access the cluster, you need to create a <strong>publicly accessible EC2 instance</strong> inside the same VPC. From this EC2 instance (often called a <strong>bastion host</strong>), you can configure <strong>kubectl</strong> and interact with the EKS cluster.</p><p>This approach keeps your cluster secure while still allowing administrators to manage it when required.</p><h3>Conclusion</h3><p>Creating a <strong>private Amazon EKS cluster with a well-designed networking architecture</strong> significantly improves security and operational control. By using private subnets, NAT Gateway routing, and a private API endpoint, the Kubernetes control plane and worker nodes remain protected from direct internet exposure.</p><p>Additionally, using <strong>Bottlerocket OS</strong> for worker nodes ensures that the cluster runs on a secure and container-optimized operating system designed specifically for Kubernetes workloads.</p><p>This architecture is suitable for organizations that require <strong>secure, scalable, and production-ready Kubernetes environments on AWS</strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8c90ac39e7e2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Install AWS Load Balancer Controller on EKS]]></title>
            <link>https://ikarthiks.medium.com/install-aws-load-balancer-controller-on-eks-0e9a3b4f9a9b?source=rss-559076fcc869------2</link>
            <guid isPermaLink="false">https://medium.com/p/0e9a3b4f9a9b</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[S Karthik]]></dc:creator>
            <pubDate>Thu, 26 Feb 2026 08:18:32 GMT</pubDate>
            <atom:updated>2026-02-26T08:18:32.699Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DILVUSicXmt3tRy-n3jwRQ.png" /></figure><h3>Introduction</h3><p>Managing application traffic efficiently is a critical part of running workloads on Kubernetes. When working with <strong>Amazon EKS</strong>, the <strong>AWS Load Balancer Controller</strong> provides a native way to automatically provision and manage <strong>Application Load Balancers (ALB)</strong> for Kubernetes Ingress resources.</p><p>In this article, we walk through a <strong>step-by-step process</strong> to install and configure the AWS Load Balancer Controller on an EKS cluster. The guide covers everything from creating the OIDC provider and IAM policies to installing the controller using Helm and deploying an ALB-backed Ingress resource.</p><p>By the end of this guide, you will have a fully functional ALB integrated with your EKS cluster, enabling scalable and secure traffic routing for your applications.</p><h3>Reference</h3><p><a href="https://docs.aws.amazon.com/eks/latest/userguide/lbc-helm.html">Install AWS Load Balancer Controller with Helm</a></p><p>This guide explains how to install the <strong>AWS Load Balancer Controller</strong> on an <strong>Amazon EKS</strong> cluster using Helm.</p><h3>Prerequisites</h3><ul><li>A Private EKS Cluster</li><li>Install Helm on your local machine</li><li>Make sure that your Amazon VPC CNI plugin for Kubernetes, kube-proxy, and CoreDNS add-ons are added to EKS cluster</li></ul><h3>Create OIDC Provider</h3><ol><li>Open the <strong>Amazon EKS console.</strong></li><li>In the left pane, select <strong>Clusters</strong>, and then select the name of your cluster on the Clusters page.</li><li>In the <strong>Details </strong>section on the <strong>Overview </strong>tab, note the value of the <strong>OpenID Connect provider URL.</strong></li><li>Open the IAM console at <a href="https://console.aws.amazon.com/iam/">https://console.aws.amazon.com/iam/</a></li><li>In the left navigation pane, choose<strong> Identity Providers</strong> under <strong>Access management.</strong></li><li>If a Provider is listed that matches the URL for your cluster, then you already have a provider for your cluster.</li><li>If a provider isn’t listed that matches the URL for your cluster, then you must create one.</li></ol><h4>To create a provider</h4><ul><li>Choose <strong>Add provider</strong></li><li>For <strong>Provider type</strong>, select <strong>OpenID Connect</strong></li><li>For <strong>Provider URL</strong>, enter the OIDC provider URL for your cluster</li><li>For <strong>Audience</strong>, enter sts.amazonaws.com</li><li>(Optional) Add any tags, for example a tag to identify which cluster is for this provider</li><li>Choose <strong>Add provider</strong></li></ul><h3>Create an ALB Policy</h3><p>The following steps refer to the AWS Load Balancer Controller <strong>v2.14.1</strong> release version. For more information about all releases, see the <a href="https://github.com/kubernetes-sigs/aws-load-balancer-controller/releases/">AWS Load Balancer Controller Release Page</a> on GitHub.</p><ol><li>After successfully creating the OIDC provider for your cluster, navigate to <strong>IAM &gt; Policies</strong></li><li>Click <strong>Create policy</strong></li><li>Switch the policy editor to <strong>JSON</strong></li><li>Click the policy <a href="https://raw.githubusercontent.com/kubernetes-sigs/aws-load-balancer-controller/v2.14.1/docs/install/iam_policy.json">link</a> from the AWS documentation and copy all content</li><li>Paste the content into the JSON policy editor</li><li>Click <strong>Create policy</strong></li></ol><h3>Create an ALB Role</h3><ol><li>Navigate to <strong>IAM &gt; Roles</strong></li><li>Click <strong>Create role</strong></li><li>For <strong>Trusted entity type</strong>, select <strong>Custom trust policy</strong></li><li>Paste the following trust policy</li></ol><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::1234567890:oidc-provider/oidc.eks.ap-south-1.amazonaws.com/id/89E14DCA822D53787B67B67FE6FD0D5D&quot;<br>            },<br>            &quot;Action&quot;: &quot;sts:AssumeRoleWithWebIdentity&quot;,<br>            &quot;Condition&quot;: {<br>                &quot;StringEquals&quot;: {<br>                    &quot;oidc.eks.ap-south-1.amazonaws.com/id/89E14DCA822D53787B67B67FE6FD0D5D:sub&quot;: &quot;system:serviceaccount:kube-system:aws-load-balancer-controller&quot;,<br>                    &quot;oidc.eks.ap-south-1.amazonaws.com/id/89E14DCA822D53787B67B67FE6FD0D5D:aud&quot;: &quot;sts.amazonaws.com&quot;<br>                }<br>            }<br>        }<br>    ]<br>}</pre><p><strong>Important:</strong></p><ul><li>Replace 89E14DCA822D53787B67B67FE6FD0D5D with your cluster OIDC provider ID</li><li>Replace 1234567890 with your AWS account ID</li></ul><p>5. Click <strong>Next</strong></p><p>6. On <strong>Add permissions</strong>, select the policy created in <strong>Create an ALB policy</strong></p><p>7. Click <strong>Next</strong></p><p>8. Provide an appropriate <strong>Name</strong> and <strong>Description</strong></p><p>9. Click <strong>Create role</strong></p><h3>Create an ALB Service Account</h3><p>After creating the ALB role, create a service account using the following manifest:</p><pre>apiVersion: v1<br>kind: ServiceAccount<br>metadata:<br>  name: aws-load-balancer-controller<br>  namespace: kube-system<br>  annotations:<br>    eks.amazonaws.com/role-arn: arn:aws:iam::1234567890:role/role-sample-dev-ap-south-1-03</pre><p><strong>Note: </strong>Change 1234567890 and role-sample-dev-ap-south-1-03 with your values. Apply the manifest:</p><pre>kubectl apply -f alb-service-account.yaml</pre><h3>Install AWS Load Balancer Controller</h3><p>Add the EKS Helm chart repository:</p><pre>helm repo add eks https://aws.github.io/eks-charts</pre><p>Install the AWS Load Balancer Controller:</p><pre>helm install aws-load-balancer-controller eks/aws-load-balancer-controller \<br>  -n kube-system \<br>  --set clusterName=my-cluster \<br>  --set serviceAccount.create=false \<br>  --set region=region-code \<br>  --set vpcId=vpc-xxxxxxxx \<br>  --set serviceAccount.name=aws-load-balancer-controller \<br>  --version 1.14.0</pre><p><strong>Note: </strong>Change my-cluster, region-code, and vpc-xxxxxxxx with your cluster values.</p><h3>Verify Installation</h3><pre>kubectl get deployment -n kube-system aws-load-balancer-controller</pre><h3>Required Subnet Tag</h3><p>Ensure the following tag is added to your <strong>ALB public subnets (Min 2 Required)</strong>:</p><pre>kubernetes.io/role/elb=1</pre><h3>Create ALB Ingress Manifest</h3><p>Create an ingress manifest with the following content:</p><pre>apiVersion: networking.k8s.io/v1<br>kind: Ingress<br>metadata:<br>  namespace: development<br>  name: aws-load-balancer-ingress<br>  annotations:<br>    alb.ingress.kubernetes.io/load-balancer-name: elb-sample-dev-ap-south-1-01<br>    alb.ingress.kubernetes.io/scheme: internet-facing<br>    alb.ingress.kubernetes.io/target-type: ip<br>    alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:ap-south-1:1234567890:certificate/666ae5c5-4a0f-42ac-852f-bbf25e61e56b<br>    alb.ingress.kubernetes.io/listen-ports: &#39;[{&quot;HTTP&quot;:80},{&quot;HTTPS&quot;:443}]&#39;<br>    alb.ingress.kubernetes.io/ssl-redirect: &#39;443&#39;<br>spec:<br>  ingressClassName: alb<br>  rules:<br>    - host: dev.sample.com<br>      http:<br>        paths:<br>          - path: /<br>            pathType: Prefix<br>            backend:<br>              service:<br>                name: sample-frontend<br>                port:<br>                  number: 80</pre><p><strong>Note: </strong>In the above ingress file, I have attached the ACM certificate ARN. If you need to use an ACM certificate for SSL configuration, update the ACM certificate ARN; otherwise, remove that line. Also change 212910767361 with your AWS account ID. Apply the ingress:</p><pre>kubectl apply -f ingress.yaml</pre><p>Now you can see the ALB being created in the specified region. You can view it through the AWS Management Console.</p><h3>Conclusion</h3><p>You have now successfully installed and configured the <strong>AWS Load Balancer Controller</strong> on your EKS cluster. By creating the required OIDC provider, IAM policy, IAM role, and Kubernetes service account, you enabled secure IAM role-based access for the controller.</p><p>Once the controller is deployed and the ingress manifest is applied, AWS automatically provisions an <strong>Application Load Balancer</strong> and manages its lifecycle based on your Kubernetes Ingress configuration. This setup simplifies traffic management, improves scalability, and follows AWS best practices for security and automation.</p><p>With this configuration in place, you can confidently expose Kubernetes services using ALB, handle SSL termination, manage multiple host rules, and scale applications efficiently in a production-ready EKS environment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0e9a3b4f9a9b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploying a MongoDB Replica Set Using Docker]]></title>
            <link>https://ikarthiks.medium.com/deploying-a-mongodb-replica-set-using-docker-711d561bd2f6?source=rss-559076fcc869------2</link>
            <guid isPermaLink="false">https://medium.com/p/711d561bd2f6</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[mongodb]]></category>
            <dc:creator><![CDATA[S Karthik]]></dc:creator>
            <pubDate>Tue, 27 Jan 2026 11:06:35 GMT</pubDate>
            <atom:updated>2026-01-27T11:06:35.382Z</atom:updated>
            <content:encoded><![CDATA[<p>Running MongoDB in production is not just about installing the database and connecting your app. You need <strong>high availability</strong>, <strong>data safety</strong>, and the ability to <strong>handle failures gracefully</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-6_ynOW-adVZZt9PWy_j2g.png" /></figure><p>In this blog, I’ll walk you through setting up a <strong>MongoDB Replica Set (cluster)</strong> using <strong>Docker</strong> across multiple Linux machines, and I’ll explain everything in <strong>simple terms with real-world examples</strong>.</p><h3>Why MongoDB Replica Set?</h3><p>A MongoDB Replica Set is a group of MongoDB nodes that</p><ul><li>Keep <strong>multiple copies of your data</strong></li><li>Automatically <strong>elect a new primary</strong> if one node goes down</li><li>Allow your application to continue running <strong>without downtime</strong></li></ul><p>In short:<br> 👉 <em>No single point of failure.</em></p><h3>MongoDB Cluster Architecture</h3><p>A typical MongoDB replica set consists of</p><p><strong>Primary Node </strong>handles all <strong>write operations </strong>and<strong> Secondary Node </strong>replicates data from the primary</p><h4>How it works internally</h4><ul><li>The <strong>Primary</strong> node receives writes (insert/update/delete).</li><li>The <strong>Secondary</strong> nodes continuously copy (replicate) data from the Primary.</li></ul><p>If the Primary goes down</p><ul><li>The remaining nodes <strong>elect a new Primary automatically</strong></li><li>Your application reconnects and continues working</li></ul><p>You don’t need to manually intervene.</p><h3>Real-Time Example</h3><p>Imagine this real-world setup</p><ul><li>Node 1 → MongoDB Primary</li><li>Node 2 → MongoDB Secondary</li><li>Your application is writing user orders</li></ul><h4>Scenario: Node 1 goes down 🚨</h4><ol><li>Node 1 crashes or becomes unreachable.</li><li>Node 2 detects that the Primary is unavailable.</li><li>Node 2 gets promoted to <strong>Primary</strong> automatically.</li><li>Your application continues writing data to Node 2.</li><li>When Node 1 comes back</li></ol><ul><li>It rejoins as a Secondary</li><li>Syncs missing data automatically</li></ul><p>✅ <strong>No data loss</strong><br>✅ <strong>Minimal downtime</strong><br>✅ <strong>Zero manual action</strong></p><p>That’s the power of a MongoDB replica set.</p><h3>Prerequisites</h3><h4>Infrastructure</h4><ol><li><strong>Linux machines in different availability zones</strong></li></ol><p>For this blog, I’ll use <strong>two Linux machines</strong></p><ul><li>Linux Machine 1 (Node 1)</li><li>Linux Machine 2 (Node 2)</li></ul><p><strong>2. Docker Engine installed</strong></p><p>Refer: Docker supported platforms<br> <a href="https://docs.docker.com/engine/install/#installation-procedures-for-supported-platforms">https://docs.docker.com/engine/install/#installation-procedures-for-supported-platforms</a></p><p><strong>3. Recommended OS</strong></p><p>Lightweight OS such as:</p><ul><li>Debian</li><li>RHEL</li><li>Ubuntu Server</li></ul><p><strong>4. CPU &amp; Memory</strong></p><ul><li>Assign based on your application workload</li></ul><h3>MongoDB Cluster Design Used in This Blog</h3><ul><li>MongoDB Community Server</li><li>Docker Compose</li><li>Replica Set authentication using <strong>keyFile</strong></li><li>Persistent storage using Docker volumes</li></ul><h3>Primary Node Setup (Node 1)</h3><h4>Create MongoDB directories</h4><pre>mkdir mongodb &amp;&amp; cd mongodb<br>mkdir data</pre><p>This ensures MongoDB data is <strong>persistent</strong> even if the container restarts.</p><h4>Create authentication key (important)</h4><p>MongoDB replica sets require a shared secret for internal communication.</p><pre>mkdir keys<br>openssl rand -base64 756 &gt; keys/authKey</pre><p>⚠️ <strong>Important:</strong><br> Store this key securely. The same key must be used on all nodes.</p><h4>Get your user ID</h4><p>This avoids permission issues inside the container.</p><pre>id -u</pre><p>Note the output (example: 1000).</p><h4>Create .env file</h4><pre>MONGODB_INITDB_ROOT_USERNAME=root<br>MONGODB_INITDB_ROOT_PASSWORD=15f6yuEHok46<br>MONGODB_REPLICA_SET=myReplicaSet</pre><h4>Create compose.yaml</h4><pre>name: mongoCluster<br><br>services:<br>  mongodb:<br>    image: mongodb/mongodb-community-server:8.0-ubi9<br>    container_name: ct-mongodb-node-01<br>    restart: unless-stopped<br>    user: &#39;&lt;REPLACE_WITH_YOUR_USERID&gt;&#39;<br>    networks:<br>      - mongoCluster<br>    environment:<br>      MONGODB_INITDB_ROOT_USERNAME: ${MONGODB_INITDB_ROOT_USERNAME}<br>      MONGODB_INITDB_ROOT_PASSWORD: ${MONGODB_INITDB_ROOT_PASSWORD}<br>    command: mongod --replSet ${MONGODB_REPLICA_SET} --bind_ip localhost --keyFile /etc/keys/authKey<br>    volumes:<br>      - ./data:/data/db<br>      - ./keys/authKey:/etc/keys/authKey:ro<br>    ports:<br>      - 27017:27017<br>    healthcheck:<br>      test: [&quot;CMD-SHELL&quot;, &quot;mongosh mongodb://${MONGODB_INITDB_ROOT_USERNAME}:${MONGODB_INITDB_ROOT_PASSWORD}@localhost:27017 --eval &#39;show dbs&#39; || exit 1&quot;]<br>      interval: 30s<br>      timeout: 10s<br>      retries: 1<br>      start_period: 20s<br>    deploy:<br>      resources:<br>        limits:<br>          memory: 512M<br>        reservations:<br>          memory: 256M<br><br>networks:<br>  mongoCluster:<br>    driver: bridge</pre><p>Replace <strong>&lt;REPLACE_WITH_YOUR_USERID&gt;</strong> with your desired user ID.</p><h4>Start MongoDB</h4><pre>docker compose up -d<br>docker logs -f ct-mongodb-node-01</pre><h3>Secondary Node Setup (Node 2)</h3><p>Repeat similar steps on <strong>Linux Machine 2</strong>.</p><h4>Key differences:</h4><ul><li>Copy the <strong>same authKey</strong></li><li>Use the <strong>same replica set name</strong></li><li>Use a different container name</li></ul><pre>mkdir mongodb &amp;&amp; cd mongodb<br>mkdir data<br>mkdir keys<br>nano keys/authKey</pre><p>Paste the authKey content from Node 1.</p><h4>.env file (same as Node 1)</h4><pre>MONGODB_INITDB_ROOT_USERNAME=root<br>MONGODB_INITDB_ROOT_PASSWORD=15f6yuEHok46<br>MONGODB_REPLICA_SET=myReplicaSet</pre><h4>Start Node 2</h4><pre>docker compose up -d<br>docker logs -f ct-mongodb-node-02</pre><h3>Initialize the Replica Set</h3><p>Login to <strong>Node 1</strong></p><pre>docker exec -it ct-mongodb-node-01 /bin/sh<br>mongosh -u root -p 15f6yuEHok46 --authenticationDatabase admin</pre><pre>rs.initiate({<br>  _id: &quot;myReplicaSet&quot;,<br>  members: [<br>    { _id: 0, host: &quot;&lt;NODE1_PRIVATE_IP&gt;:27017&quot; },<br>    { _id: 1, host: &quot;&lt;NODE2_PRIVATE_IP&gt;:27017&quot; }<br>  ]<br>})</pre><h4>Verify from Node 2</h4><pre>rs.status()</pre><p>You should see one <strong>PRIMARY</strong> and one <strong>SECONDARY</strong>.</p><h3>Application Connection String</h3><p>Use this connection string in your application</p><pre>mongodb://root:15f6yuEHok46@&lt;NODE1_IP&gt;:27017,&lt;NODE2_IP&gt;:27017/admin?replicaSet=myReplicaSet&amp;authSource=admin</pre><p>MongoDB drivers automatically:</p><ul><li>Detect primary changes</li><li>Reconnect during failover</li></ul><h3>Final Thoughts</h3><p>With this setup, you now have:</p><ul><li>✅ High availability MongoDB</li><li>✅ Automatic failover</li><li>✅ Secure inter-node authentication</li><li>✅ Docker-based deployment (easy to scale)</li></ul><p>For production, consider:</p><ul><li>Adding a <strong>third node or arbiter</strong></li><li>Monitoring with <strong>MongoDB Atlas / Prometheus / Grafana</strong></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=711d561bd2f6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>