<?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 Moshe Eliya on Medium]]></title>
        <description><![CDATA[Stories by Moshe Eliya on Medium]]></description>
        <link>https://medium.com/@mosiko1234?source=rss-841d7f4a587c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Bzbt9RCnS3Jx1FqY</url>
            <title>Stories by Moshe Eliya on Medium</title>
            <link>https://medium.com/@mosiko1234?source=rss-841d7f4a587c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 19:30:51 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mosiko1234/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 Much Does a Fractional CTO Cost? A 2026 Pricing Guide]]></title>
            <link>https://medium.com/@mosiko1234/how-much-does-a-fractional-cto-cost-a-2026-pricing-guide-18cb2ec0892b?source=rss-841d7f4a587c------2</link>
            <guid isPermaLink="false">https://medium.com/p/18cb2ec0892b</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[leadership]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[entrepreneurship]]></category>
            <dc:creator><![CDATA[Moshe Eliya]]></dc:creator>
            <pubDate>Sat, 06 Jun 2026 00:00:47 GMT</pubDate>
            <atom:updated>2026-06-06T12:31:49.438Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*oF3vAcAu11bZTCGb.png" /></figure><p>If you’re a founder weighing whether to bring in senior technical leadership, the first question is almost always the same: <em>what is this going to cost me?</em> It’s the right question — but the honest answer isn’t a single number. A fractional CTO can cost anywhere from a few thousand dollars a month to the equivalent of a senior salary, depending on how deeply involved they are. This guide breaks down the real ranges, the models behind them, and how to know what you should actually be paying.</p><h3>The short answer</h3><p>Here are the typical 2026 market ranges for a fractional (part-time / outsourced) CTO, by engagement model. These are general market figures — not a quote — and vary with seniority, geography, and scope.</p><p>Advisory (hourly)</p><p>$200-$450 / hour</p><p>Occasional decisions, reviews, a second opinion</p><p>Day rate</p><p>$1,200-$2,500 / day</p><p>Recurring presence, e.g. one day a week</p><p>Monthly retainer</p><p>$4,000-$15,000 / month</p><p>Ongoing leadership at a fixed cadence</p><p>Project / fixed scope</p><p>$10,000-$60,000+</p><p>A defined outcome (architecture, audit, migration)</p><p>Equity-blended</p><p>Reduced cash + 0.25%-2% equity</p><p>Pre-seed / seed startups conserving cash</p><p>The wide spread is real and intentional: “fractional CTO” covers everything from a monthly strategy call to a hands-on technical leader who is in your codebase every week. The price tracks the depth.</p><h3>The five engagement models, explained</h3><h3>1. Advisory (hourly)</h3><p>The lightest touch. You pay for specific conversations — a build-vs-buy decision, an architecture review, a hiring panel, due-diligence support before a raise. Hourly rates for genuinely senior people sit in the <strong>$200-$450</strong> range. This is the cheapest entry point, but it’s advice only: nobody owns the outcome between calls.</p><h3>2. Day rate</h3><p>A fixed rate for a committed day, often <strong>one day a week</strong>. At <strong>$1,200-$2,500/day</strong> this buys recurring presence — enough to actually move things, not just comment on them. It’s the most common structure for founders who need continuity without a full-time hire.</p><h3>3. Monthly retainer</h3><p>A flat monthly fee for a defined scope and availability — <strong>$4,000-$15,000/month</strong> is the typical band. The low end is light-touch leadership (strategy, reviews, being on call for decisions); the high end is a deeply embedded leader running your engineering function several days a week. The retainer is predictable, which makes it the easiest to budget around.</p><h3>4. Project / fixed scope</h3><p>When the need is a specific outcome — a cloud migration, a security hardening pass, a re-architecture, investor technical due diligence — a fixed-price project (<strong>$10,000-$60,000+</strong>) ties cost to deliverable rather than time. You know the number up front; the risk of scope creep sits with the provider, not you.</p><h3>5. Equity-blended</h3><p>For pre-seed and seed companies short on cash, part of the compensation can be equity — typically <strong>0.25%-2%</strong>, depending on stage, time commitment, and whether the role trends toward co-founder. This lowers the cash cost but should be treated as real compensation, not a discount.</p><h3>What actually drives the price</h3><p>Two fractional CTOs can be 3× apart in cost for defensible reasons. The main drivers:</p><ul><li><strong>Strategy vs. hands-on.</strong> An advisor who only attends meetings costs far less than a leader who also writes code, reviews PRs, and ships. The second is more expensive — and usually far more valuable, because decisions arrive already implemented.</li><li><strong>Seniority and track record.</strong> Someone who has scaled engineering through funding rounds, exits, or real production incidents commands a premium. You’re paying for judgment, and judgment compounds.</li><li><strong>Time commitment.</strong> A half-day a month and three days a week are different jobs. Cost scales with hours, but not linearly — deep involvement carries a context premium.</li><li><strong>Stage and complexity.</strong> Greenfield MVP work is cheaper to lead than untangling years of tech debt, compliance (SOC 2, HIPAA), or a distributed production system under load.</li><li><strong>Breadth of mandate.</strong> Pure technical strategy is one rate. Strategy <em>plus</em> hiring, vendor negotiation, security, and investor conversations is another.</li><li><strong>Geography.</strong> US-based leaders cost more than many other markets; remote engagements can blend the two.</li></ul><h3>Fractional vs. full-time: the comparison that matters</h3><p>The instinct is to compare a fractional CTO’s monthly fee to a salaried CTO’s monthly salary. That comparison is misleading. The true cost of a full-time CTO is:</p><blockquote><em>base salary + payroll taxes + benefits + equity (often 1–5%) + recruiting fees + 3–6 months to hire + ramp-up time</em></blockquote><p>In most markets a full-time CTO is a <strong>$250,000-$400,000+</strong> annual commitment once equity and overhead are included — plus the months you spend not having one while you search. A fractional CTO gives you senior judgment <strong>now</strong>, at a fraction of that, with no equity dilution required and no long-term liability if your needs change.</p><p>The trade-off is real: a full-time CTO is all-in on your company. A fractional one is not. The right answer depends on stage. Before product-market fit, most companies don’t need — and can’t justify — a full-time CTO. They need senior decisions made correctly. That’s exactly the gap <a href="https://dmse.dev/en/cto-as-a-service">CTO-as-a-Service</a> fills. (For a deeper comparison of the options, see <a href="https://dmse.dev/en/blog/fractional-cto-vs-alternatives">Fractional CTO vs. the alternatives</a>.)</p><h3>Is it worth it? Reframe the question</h3><p>Don’t ask “can I afford a fractional CTO?” Ask “what does <em>not</em> having senior technical judgment cost me?” The expensive mistakes in early companies are rarely the salary line — they’re the decisions:</p><ul><li>A stack or architecture choice that has to be rebuilt 18 months in.</li><li>A cloud bill quietly growing 3× faster than it should.</li><li>A security gap discovered during due diligence, mid-raise.</li><li>Six months of engineering velocity lost to tech debt nobody managed.</li></ul><p>Any one of these costs more than a year of fractional leadership. The role pays for itself precisely by preventing the decisions that are expensive to reverse. (If you want to see what good looks like, read <a href="https://dmse.dev/en/blog/cto-as-a-service-guide">what a CTO-as-a-Service actually does</a>.)</p><h3>How to budget for it (and three red flags)</h3><p>A sensible way to start: scope the <strong>outcome</strong> first, not the hours. Decide what has to be true in 90 days — a roadmap you trust, a stable architecture, a hire made, a migration done — and let that define the model. Most founders begin with a short assessment or a day-rate engagement and expand only once the value is obvious.</p><p>Three things to be wary of:</p><ol><li><strong>A rate with no scope.</strong> Senior leadership should be able to tell you <em>what you get</em> for the price. A number with no deliverable is a red flag.</li><li><strong>Advice with no ownership.</strong> If nobody owns the outcome between meetings, you’ve bought opinions, not leadership.</li><li><strong>Strategy with no shipping.</strong> The most valuable fractional CTOs can also build. Decisions that never turn into working software aren’t worth much.</li></ol><h3>How DMSE approaches it</h3><p>At DMSE we don’t sell a fixed price list, because the right engagement depends entirely on your stage and what you’re trying to make true. Some clients need one day a week; some need a focused project; some need an embedded leader for a quarter. What’s constant is the principle: <strong>senior leadership that also ships</strong> — strategy and architecture from someone who is also in the code, so decisions arrive as working systems, not slide decks.</p><p>The first step isn’t a contract — it’s a short conversation to scope what you actually need. <a href="https://dmse.dev/en/contact">Book a free 15-minute intro call</a>, and we’ll tell you honestly which model fits (and whether you even need one yet).</p><p><em>Originally published at </em><a href="https://dmse.dev/en/blog/how-much-does-a-fractional-cto-cost/"><em>https://dmse.dev</em></a><em> on June 6, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=18cb2ec0892b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Optimizing GitLab CI/CD Pipelines for High-Efficiency]]></title>
            <link>https://medium.com/@mosiko1234/optimizing-gitlab-ci-cd-pipelines-for-high-efficiency-f2ebbc046a89?source=rss-841d7f4a587c------2</link>
            <guid isPermaLink="false">https://medium.com/p/f2ebbc046a89</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[gitlab]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[gitlab-ci]]></category>
            <dc:creator><![CDATA[Moshe Eliya]]></dc:creator>
            <pubDate>Sun, 07 Apr 2024 13:38:52 GMT</pubDate>
            <atom:updated>2024-04-07T13:38:52.507Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*25jwbnmYpKdXHS7M5PNIPQ.png" /></figure><p>In the world of DevOps, efficiency and automation are paramount. GitLab CI/CD (Continuous Integration/Continuous Deployment) is a powerful tool used by developers to automate the testing and deployment of code. As projects grow in complexity, the need for an optimized CI/CD pipeline becomes essential to ensure swift, error-free releases. This article delves into advanced techniques to enhance the performance and scalability of your GitLab CI/CD pipelines.</p><h3>1. Pipeline Structure and Modularization</h3><p>A well-structured pipeline not only improves readability but also execution speed. By modularizing jobs and leveraging includes, you can reuse code and simplify your .gitlab-ci.yml file.</p><p>Example: Using include for Modular Pipelines</p><pre>include:<br>  - local: &#39;/templates/.build-template.yml&#39;<br>  - local: &#39;/templates/.test-template.yml&#39;<br><br>stages:<br>  - build<br>  - test<br>  - deploy<br><br>build_job:<br>  stage: build<br>  script:<br>    - echo &quot;Building the application...&quot;<br><br>test_job:<br>  stage: test<br>  script:<br>    - echo &quot;Running tests...&quot;<br><br>deploy_job:<br>  stage: deploy<br>  script:<br>    - echo &quot;Deploying application...&quot;</pre><p>By including templates, you can maintain cleaner and more manageable pipeline configurations.</p><h3>2. Caching and Artifacts</h3><p>Proper use of caching and artifacts can drastically reduce pipeline runtime by avoiding redundant operations.</p><blockquote>Example: Effective Caching</blockquote><pre>stages:<br>  - setup<br>  - build<br><br>setup_dependencies:<br>  stage: setup<br>  script:<br>    - pip install -r requirements.txt<br>  cache:<br>    key: &quot;${CI_COMMIT_REF_SLUG}&quot;<br>    paths:<br>      - .cache/pip<br><br>build:<br>  stage: build<br>  script:<br>    - ./build_script.sh<br>  dependencies:<br>    - setup_dependencies</pre><p>This setup ensures that the dependencies are cached based on the Git branch, reducing installation time in subsequent runs.</p><h3>3. Parallelization and Job Splitting</h3><p>Parallelizing tasks within your pipeline can lead to significant reductions in overall execution time.</p><p>Example: Parallel Test Execution</p><pre>test:<br>  stage: test<br>  script:<br>    - pytest tests/<br>  parallel:<br>    matrix:<br>      - TEST_GROUP: [1,2,3,4]</pre><p>This configuration splits the test suite into four parallel jobs, allowing them to run simultaneously, thus reducing the total time spent on the test stage.</p><h3>4. Dynamic Environment Configuration</h3><p>Utilizing dynamic environments for different stages of the deployment can help in efficient management and isolation of changes.</p><p>Example: Dynamic Environments</p><pre>deploy_review:<br>  stage: deploy<br>  script:<br>    - deploy_to_review.sh<br>  environment:<br>    name: review/$CI_COMMIT_REF_NAME<br>    url: https://$CI_ENVIRONMENT_SLUG.example.com<br>  only:<br>    - branches</pre><p>This snippet automatically deploys each branch to a dedicated review environment, facilitating easier testing and review processes.</p><h3>5. Pipeline Efficiency Analysis</h3><p>Regularly analyzing pipeline efficiency and identifying bottlenecks are crucial for continuous improvement.</p><p>Example: Pipeline Profiling</p><pre>gitlab-runner --debug exec docker my_job</pre><p>Using the --debug flag with GitLab Runner can help identify slow stages and scripts in your CI/CD pipeline.</p><h3>Conclusion</h3><p>Optimizing your GitLab CI/CD pipelines is a continuous process that requires attention to detail and a deep understanding of both your software’s needs and GitLab’s powerful features. By structuring your pipeline efficiently, leveraging caching and artifacts, parallelizing tasks, utilizing dynamic environments, and regularly performing efficiency analyses, you can significantly enhance your DevOps processes. This will lead to faster deployments, higher quality software, and a more agile development cycle.</p><p>DevOps engineers are encouraged to experiment with these techniques to find the optimal setup for their projects, ensuring that their pipelines are as efficient and effective as possible.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f2ebbc046a89" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Continuous Integration (CI): Implementing an Effective CI Pipeline with GitLab]]></title>
            <link>https://medium.com/@mosiko1234/continuous-integration-ci-implementing-an-effective-ci-pipeline-with-gitlab-fe6fe36007f7?source=rss-841d7f4a587c------2</link>
            <guid isPermaLink="false">https://medium.com/p/fe6fe36007f7</guid>
            <category><![CDATA[gitlab-ci]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[gitlab]]></category>
            <category><![CDATA[ci]]></category>
            <dc:creator><![CDATA[Moshe Eliya]]></dc:creator>
            <pubDate>Sat, 06 Apr 2024 19:35:49 GMT</pubDate>
            <atom:updated>2024-04-06T19:35:49.808Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*25jwbnmYpKdXHS7M5PNIPQ.png" /></figure><p><strong>What is CI?</strong></p><p>Continuous Integration (CI) is a software development practice that revolutionizes how teams deliver software. By automating the merging of code changes, builds, and tests, CI enables frequent and reliable software releases. Developers working on different parts of a project can commit their code changes to a central repository, like GitLab. The CI pipeline then swings into action, automatically integrating these changes, building the entire project, and running a suite of tests to ensure everything works as expected.</p><p><strong>Benefits of Implementing CI:</strong></p><ul><li><strong>Improved Software Quality:</strong> CI acts as a safety net for your codebase. With frequent automated testing, bugs are identified and addressed much earlier in the development lifecycle. This reduces the likelihood of critical defects making it to production and impacting users.</li><li><strong>Enhanced Development Efficiency:</strong> CI automates repetitive tasks such as code building and testing, freeing up developer time for more strategic work. This streamlining can significantly boost development team productivity.</li><li><strong>Streamlined Collaboration:</strong> CI fosters a culture of collaboration within development teams. By integrating code changes regularly, developers can identify and address merge conflicts promptly, preventing delays and frustration. Additionally, CI provides a clear and centralized view of the project’s health, promoting better communication and collaboration between developers.</li></ul><p><strong>Implementing CI with GitLab:</strong></p><p>GitLab offers a robust built-in CI/CD (Continuous Integration and Continuous Delivery) pipeline that simplifies the setup and management of your CI process. Here’s how to get started:</p><ol><li><strong>Define Goals:</strong> Clearly define your CI goals before starting. Are you aiming to improve code quality, accelerate delivery timelines, or enhance collaboration?</li><li><strong>Create a </strong>.gitlab-ci.yml<strong> file:</strong> This YAML file acts as the configuration blueprint for your CI pipeline. Place it at the root of your GitLab repository.</li><li><strong>Define Stages:</strong> Break down your CI pipeline into stages, each representing a specific step in the process. Common stages include “build,” “test,” and “deploy.”</li></ol><p><strong>Example </strong>.gitlab-ci.yml<strong>:</strong></p><pre>stages:<br>  - build<br>  - test<br><br>build:<br>  stage: build<br>  script:<br>    - apt-get update &amp;&amp; apt-get install -y build-essential # Install build dependencies (replace with your specific needs)<br>    - make build # Build your project (replace with your build command)<br><br>test:<br>  stage: test<br>  script:<br>    - make test  # Run your unit tests (replace with your test command)</pre><p><strong>Explanation:</strong></p><ul><li>This example defines two stages: “build” and “test.”</li><li>The “build” stage installs any necessary dependencies (like build tools) and then executes the build command (specific to your project).</li><li>The “test” stage runs the unit tests for your codebase.</li></ul><p><strong>Additional Considerations:</strong></p><ul><li><strong>GitLab Runners:</strong> GitLab Runners are lightweight processes that execute your CI pipeline jobs. You can configure them to run on your own infrastructure or utilize GitLab’s shared runners.</li><li><strong>Variables:</strong> Define variables in your .gitlab-ci.yml file to store sensitive information or configuration settings that can be reused across different jobs.</li><li><strong>Caching:</strong> Leverage GitLab’s caching capabilities to improve build performance by caching dependencies and build artifacts.</li></ul><p><strong>Tips for Successful Implementation:</strong></p><ul><li><strong>Start Small:</strong> Begin with a basic pipeline and gradually add complexity as your team becomes comfortable with the system.</li><li><strong>Embrace Collaboration:</strong> Ensure all team members are involved and collaborate effectively within the CI process. Developers should write unit tests for their code.</li><li><strong>Provide Training:</strong> Train your team on the CI process, GitLab CI/CD, and best practices for writing effective tests.</li><li><strong>Monitor and Improve:</strong> Continuously monitor your CI pipeline, identify areas for improvement, and make adjustments as needed.</li></ul><p><strong>Important Note:</strong></p><p>Implementing CI is a learning process. Refer to GitLab’s documentation for detailed instructions and explore the vast array of features and integrations available within the GitLab CI/CD platform. A well-designed and implemented CI pipeline with GitLab can significantly enhance your software development process, leading to higher quality software, faster delivery times, and a more productive and collaborative development team.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fe6fe36007f7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HPA on Kubernetes: Scaling the Future]]></title>
            <link>https://medium.com/cloud-native-daily/hpa-on-kubernetes-scaling-the-future-1655a1c183f?source=rss-841d7f4a587c------2</link>
            <guid isPermaLink="false">https://medium.com/p/1655a1c183f</guid>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[horizontal-pod-autoscaler]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[site-reliability-engineer]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Moshe Eliya]]></dc:creator>
            <pubDate>Sun, 01 Oct 2023 08:39:00 GMT</pubDate>
            <atom:updated>2023-10-01T08:39:00.775Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*558rt6vj5QiNisoH-xo47w.png" /></figure><h3>Introduction to HPA and Kubernetes</h3><h4>What is Kubernetes?</h4><p>Ever heard of a traffic conductor directing vehicles in a busy intersection? Think of Kubernetes as that conductor, but for containerized applications. It’s an open-source platform designed to automate deploying, scaling, and managing containerized applications. Imagine having hundreds of containers; Kubernetes ensures they run smoothly and efficiently.</p><h4>What is HPA (Horizontal Pod Autoscaling)?</h4><p>Picture this: a bridge that expands or contracts based on the number of vehicles. That’s HPA for you, but for pods in Kubernetes. HPA automatically scales the number of pods in a deployment or replica set based on observed metrics like CPU utilization or other select performance metrics.</p><h3>Why Use HPA in Kubernetes?</h3><h4>Efficient Resource Utilization</h4><p>Why have ten servers running when you only need five? HPA ensures that resources are not wasted. It adjusts the number of pods based on the demand, ensuring optimal resource utilization.</p><h4>Improved Application Availability</h4><p>Remember the last time a website crashed during a sale? With HPA, Kubernetes can handle traffic spikes by increasing the number of pods, ensuring your application remains available.</p><h4>Cost Savings</h4><p>Less waste means more savings. By ensuring you only use the resources you need, HPA can lead to significant cost reductions.</p><h3>How Does HPA Work in Kubernetes?</h3><h4>Metrics and Thresholds</h4><p>HPA operates like a thermostat for your home. You set a desired temperature, and the system adjusts based on the room’s current temperature. In Kubernetes, you define metrics and thresholds, and HPA scales pods based on these.</p><p><strong>Example 1: CPU Utilization</strong></p><p>You can set an average CPU utilization threshold. If the current CPU usage exceeds this, HPA will add more pods.</p><pre>metrics:<br>- type: Resource<br>  resource:<br>    name: cpu<br>    target:<br>      type: Utilization<br>      averageUtilization: 80</pre><p>In this example, if the average CPU utilization exceeds 80%, HPA will scale up.</p><p><strong>Example 2: Memory Consumption</strong></p><p>Similarly, you can set a memory consumption threshold.</p><pre>metrics:<br>- type: Resource<br>  resource:<br>    name: memory<br>    target:<br>      type: AverageValue<br>      averageValue: 500Mi</pre><p>Here, if the average memory consumption per pod exceeds 500Mi, HPA will scale up.</p><h3>The Role of the Metrics Server</h3><p>The Metrics Server acts as HPA’s informant, constantly updating it about resource usage, much like a weather station providing real-time data to a climate control system.</p><h3>Setting Up HPA in Kubernetes: A Practical Example</h3><h4>Prerequisites</h4><ul><li>A running Kubernetes cluster.</li><li>kubectl command-line tool.</li><li>Basic Kubernetes knowledge.</li></ul><h3>Step-by-Step Guide</h3><ol><li>Install the Metrics Server:</li></ol><pre>kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml</pre><p>2. Define metrics in an HPA configuration file:</p><pre>apiVersion: autoscaling/v2beta2<br>kind: HorizontalPodAutoscaler<br>metadata:<br>  name: sample-hpa<br>spec:<br>  scaleTargetRef:<br>    apiVersion: apps/v1<br>    kind: Deployment<br>    name: sample-deployment<br>  minReplicas: 1<br>  maxReplicas: 10<br>  metrics:<br>  - type: Resource<br>    resource:<br>      name: cpu<br>      target:<br>        type: Utilization<br>        averageUtilization: 50</pre><p>3. Deploy the HPA:</p><pre>kubectl apply -f sample-hpa.yaml</pre><p>4. Monitor: Use kubectl get hpa to view the current status.</p><h3>Common Challenges and Solutions</h3><h4>Over-Scaling Issues</h4><p>Too much of a good thing can be bad. Sometimes, HPA might scale out too much, leading to unnecessary costs. Solution? Adjust your metrics and thresholds to be more conservative.</p><h4>Under-Scaling Concerns</h4><p>On the flip side, being too conservative can lead to performance issues. If you notice frequent performance bottlenecks, consider loosening your thresholds a bit.</p><h3>Conclusion</h3><p>HPA on Kubernetes is like giving your applications a brain. It allows them to adjust and adapt based on demand, ensuring efficiency, availability, and cost savings. As with anything, there are challenges, but with understanding and fine-tuning, HPA can be a game-changer.</p><h3>FAQs</h3><p><strong>What metrics can HPA use for scaling?</strong></p><ul><li>HPA primarily uses CPU and memory metrics but can be configured to use custom metrics as well.</li></ul><p><strong>How quickly does HPA respond to traffic spikes?</strong></p><ul><li>HPA checks metrics at regular intervals, typically every 30 seconds. So, it’s pretty responsive!</li></ul><p><strong>Is HPA suitable for all applications?</strong></p><ul><li>While HPA is beneficial for many applications, it might not be ideal for those with predictable traffic patterns.</li></ul><p><strong>Can I use HPA with other scaling methods?</strong></p><ul><li>Yes, HPA can be used in conjunction with other scaling methods like Vertical Pod Autoscaling (VPA).</li></ul><p><strong>How do I monitor HPA’s actions?</strong></p><ul><li>Monitoring tools like Prometheus, combined with Grafana, can provide insights into HPA’s scaling actions.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1655a1c183f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cloud-native-daily/hpa-on-kubernetes-scaling-the-future-1655a1c183f">HPA on Kubernetes: Scaling the Future</a> was originally published in <a href="https://medium.com/cloud-native-daily">Cloud Native Daily</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kubernetes Termination Signal: Ensuring Graceful Application Shutdown]]></title>
            <link>https://medium.com/@mosiko1234/kubernetes-termination-signal-ensuring-graceful-application-shutdown-6079db5bb41a?source=rss-841d7f4a587c------2</link>
            <guid isPermaLink="false">https://medium.com/p/6079db5bb41a</guid>
            <category><![CDATA[kubernetes-cluster]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[site-reliability-engineer]]></category>
            <category><![CDATA[platform-engineering]]></category>
            <dc:creator><![CDATA[Moshe Eliya]]></dc:creator>
            <pubDate>Sun, 27 Aug 2023 09:09:29 GMT</pubDate>
            <atom:updated>2023-08-27T09:09:29.815Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PI0FpfJ1Yx1fxOx77VM5tQ.png" /></figure><p>In the world of container orchestration, Kubernetes has emerged as a leading platform that allows for efficient management, scaling, and deployment of containerized applications. As applications run within containers, proper termination of these containers becomes crucial to maintain the overall health and reliability of the system. In this article, we will delve into the concept of Kubernetes termination signals and understand how they ensure the graceful shutdown of applications, avoiding data loss or disrupted user experiences.</p><h3>Table of Contents</h3><ol><li>Understanding Kubernetes Termination Signals<br> The Importance of Graceful Shutdown</li><li>Termination Signal Workflow<br>Step 1: Initiation of Termination<br>Step 2: Preparing for Shutdown<br>Step 3: Container Termination<br>Step 4: Post-Termination Cleanup</li><li>Handling Termination in Applications<br>Listening for Signals<br>Saving Application State<br>Draining Connections</li><li>Termination Grace Period<br>Customizing Grace Period</li><li>Impact on High Availability<br>Replica Sets and Termination</li><li>Termination Signal Best Practices<br>Logging and Monitoring<br>Resource Deallocation<br>Handling Unfinished Processes</li><li>Case Study: Implementing Termination Handling<br>Application-Specific Considerations</li><li>Challenges and Considerations<br>Managing Critical Data<br>Network Termination<br>Timeouts and Deadlines</li><li>Kubernetes Tools for Termination<br>Termination Grace Period Seconds<br>PreStop Hook</li><li>Conclusion</li></ol><h3>1. Understanding Kubernetes Termination Signals</h3><h4>The Importance of Graceful Shutdown</h4><p>When a Kubernetes cluster needs to scale down, update, or replace pods, it sends termination signals to the running containers. These signals are crucial because they allow containers to perform a graceful shutdown, ensuring that the application completes ongoing tasks, saves critical data, and releases resources before closing. Without proper termination handling, abrupt shutdowns could lead to data loss, corrupted files, or disrupted user experiences.</p><h3>2. Termination Signal Workflow</h3><h4>Step 1: Initiation of Termination</h4><p>The termination process begins when Kubernetes decides to remove or replace a pod. It sends a termination signal, often SIGTERM (Signal 15), to the primary process in the container.</p><h4>Step 2: Preparing for Shutdown</h4><p>Upon receiving the termination signal, the application should start preparing for shutdown. This involves stopping the acceptance of new requests, finishing ongoing processes, and ensuring all data is persisted.</p><h4>Step 3: Container Termination</h4><p>After the application completes its tasks, it receives a SIGKILL (Signal 9) if it hasn’t shut down within a certain time frame. This forcefully terminates the container.</p><h4>Step 4: Post-Termination Cleanup</h4><p>Containers have the opportunity to run scripts or perform cleanup tasks before shutting down completely. This is done using the “preStop” hook, allowing graceful termination.</p><h3>3. Handling Termination in Applications</h3><h4>Listening for Signals</h4><p>Applications can catch termination signals programmatically and execute custom shutdown procedures. This prevents abrupt closures and ensures that applications have a chance to complete their critical operations.</p><h4>Saving Application State</h4><p>To prevent data loss, applications should save their state and configuration settings before shutdown. This ensures that, upon restarting, the application can resume from where it left off.</p><h4>Draining Connections</h4><p>Applications should gracefully close network connections before shutting down. This prevents dropped connections and ensures that users experience minimal disruption.</p><h3>4. Termination Grace Period</h3><h4>Customizing Grace Period</h4><p>Kubernetes provides a termination grace period, allowing applications more time to shut down gracefully. This can be specified in pod configurations and gives applications a chance to wrap up tasks before termination.</p><h3>5. Impact on High Availability</h3><h4>Replica Sets and Termination</h4><p>Replica sets and deployment strategies are impacted by termination signals. Kubernetes ensures that a certain number of healthy replicas are available before terminating pods, maintaining high availability.</p><h3>6. Termination Signal Best Practices</h3><h4>Logging and Monitoring</h4><p>Logging termination events helps administrators track the lifecycle of containers. Monitoring termination-related metrics assists in identifying any issues or bottlenecks during shutdown.</p><h4>Resource Deallocation</h4><p>Containers should release any allocated resources, such as network ports or file handles, before termination. This prevents resource leaks and ensures efficient resource utilization.</p><h4>Handling Unfinished Processes</h4><p>Applications should handle unfinished tasks or processes when receiving termination signals. This could involve marking tasks as incomplete or queuing them for later execution.</p><h3>7. Case Study: Implementing Termination Handling</h3><h4>Application-Specific Considerations</h4><p>Different applications have unique requirements for graceful termination. A stateless application might simply need to complete ongoing requests, while a stateful application could involve complex data synchronization.</p><h3>8. Challenges and Considerations</h3><h4>Managing Critical Data</h4><p>Applications must carefully manage critical data to prevent data corruption or loss during shutdown. Proper synchronization and storage mechanisms are essential.</p><h4>Network Termination</h4><p>Applications with network dependencies should ensure that they deregister from load balancers and cleanly disconnect from databases to avoid leaving dangling connections.</p><h4>Timeouts and Deadlines</h4><p>Termination should not take an excessive amount of time. Setting appropriate timeouts prevents situations where stuck applications hinder scaling or updates.</p><h3>9. Kubernetes Tools for Termination</h3><h4>Termination Grace Period Seconds</h4><p>Kubernetes allows the specification of a termination grace period for pods. This value can be adjusted based on application requirements and complexities.</p><h4>PreStop Hook</h4><p>The “preStop” hook enables containers to run scripts before termination. This is valuable for performing cleanup tasks or notifying external services about impending shutdown.</p><h3>10. Conclusion</h3><p>In the dynamic landscape of containerized applications, Kubernetes termination signals play a pivotal role in maintaining system reliability and data integrity. By allowing applications to gracefully shut down, Kubernetes ensures that critical processes are completed, resources are deallocated, and user experiences remain uninterrupted. Implementing robust termination handling practices is a crucial aspect of building resilient and efficient containerized systems.</p><h3>FAQs</h3><ol><li><strong>What happens if an application doesn’t handle termination signals?</strong> If an application doesn’t handle termination signals, it might be forcefully terminated, leading to potential data loss or corrupted files.</li><li><strong>Can termination signals be customized for each pod?</strong> Yes, Kubernetes allows you to set a termination grace period that can be customized for each pod.</li><li><strong>Are termination signals the same as regular Linux signals?</strong> Yes, termination signals like SIGTERM and SIGKILL are based on standard Linux signals but have specific implications in the context of Kubernetes.</li><li><strong>How does Kubernetes ensure high availability during pod termination?</strong> Kubernetes ensures high availability by maintaining a certain number of healthy replicas before terminating pods.</li><li><strong>Can applications perform resource deallocation during termination?</strong> Yes, applications can release allocated resources like network ports and file handles to ensure efficient resource utilization.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6079db5bb41a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploying OKD in an Air-Gapped Environment: A Comprehensive Guide]]></title>
            <link>https://medium.com/@mosiko1234/deploying-okd-in-an-air-gapped-environment-a-comprehensive-guide-36eb8f462c73?source=rss-841d7f4a587c------2</link>
            <guid isPermaLink="false">https://medium.com/p/36eb8f462c73</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[airgap]]></category>
            <category><![CDATA[okd]]></category>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[openshift]]></category>
            <dc:creator><![CDATA[Moshe Eliya]]></dc:creator>
            <pubDate>Wed, 16 Aug 2023 12:37:37 GMT</pubDate>
            <atom:updated>2023-08-16T12:37:37.650Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*jy-d9q00oUtqDTiCsUbV6w.jpeg" /></figure><h3>OpenShift Kubernetes Distribution (OKD) is a powerful container orchestration platform. But what happens when you need to deploy it in an environment without internet access? This article dives into the intricacies of setting up OKD in an air-gapped environment using a repository that provides all the necessary tools and scripts.</h3><h3>Introduction</h3><p>Air-gapped environments are isolated from the public internet, often for security reasons. Deploying applications or platforms in such environments can be challenging due to the lack of direct access to external resources. This guide will walk you through the process of deploying OKD in such conditions.</p><h3>Repository Overview</h3><p>The <a href="https://github.com/mosheeliya1993/okd_deploy_airgap.git">okd_deploy_airgap</a> repository provides a structured approach to this challenge. It contains:</p><ul><li>Ansible Playbooks: For automating the deployment process.</li><li>Terraform Scripts: To provision the necessary infrastructure.</li><li>Documentation: Detailed README files to guide users through the process.</li></ul><h3>Steps to Deploy OKD in an Air-Gapped Environment</h3><ol><li>Prepare Your Environment: Ensure you have the necessary tools installed, including Ansible, Terraform, and VirtualBox.</li><li>Clone the Repository:</li></ol><pre>git clone https://github.com/mosheeliya1993/okd_deploy_airgap.git</pre><ol><li><strong>Infrastructure Setup with Terraform:</strong> Navigate to the infrastracture/terraform directory and follow the instructions in the README. This will set up the necessary virtual machines and network configurations.</li><li><strong>Download Dependencies:</strong> Due to the air-gapped nature, you’ll need to download all dependencies locally. The repository provides scripts to assist in downloading all necessary images and dependencies.</li><li><strong>Run Ansible Playbooks:</strong> Once all dependencies are downloaded, navigate to the ansible directory and execute the provided playbooks. These playbooks automate the installation and configuration of OKD on the provisioned infrastructure.</li><li><strong>Post-Deployment Steps:</strong> After successfully deploying OKD, you might need to perform some post-deployment configurations, such as setting up routes, services, or applications specific to your use case.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=36eb8f462c73" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OKD: The Community-Powered Kubernetes Distribution]]></title>
            <link>https://medium.com/@mosiko1234/okd-the-community-powered-kubernetes-distribution-dda50cd3dac3?source=rss-841d7f4a587c------2</link>
            <guid isPermaLink="false">https://medium.com/p/dda50cd3dac3</guid>
            <category><![CDATA[openshift]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[infrastructure]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[okd]]></category>
            <dc:creator><![CDATA[Moshe Eliya]]></dc:creator>
            <pubDate>Wed, 16 Aug 2023 12:32:52 GMT</pubDate>
            <atom:updated>2023-08-16T14:48:26.284Z</atom:updated>
            <content:encoded><![CDATA[<p>In the ever-evolving world of container orchestration, Kubernetes has emerged as the de facto standard. But with its widespread adoption come variations tailored to specific needs. One such variation is OKD, formerly known as OpenShift Origin. Let’s dive into what OKD is, its advantages, common challenges, and its unique requirements.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/311/1*E2HaBA0MmX-sr5mnou-Jfw.jpeg" /></figure><h3>What is OKD?</h3><p>OKD is the community distribution of Kubernetes optimized for continuous application development and multi-tenant deployment. It adds developer and operational-centric tools on top of Kubernetes, enabling rapid application development, easy deployment and scaling, and long-term lifecycle maintenance.</p><h3>Why Use OKD?</h3><h3>1. Developer-Friendly:</h3><p>OKD provides a complete open-source development platform. It integrates with popular CI/CD tools and supports multiple languages and frameworks, making it a favorite among developers.</p><h3>2. Operational Efficiency:</h3><p>With built-in monitoring, logging, and automated scaling, OKD ensures that operations teams have the tools they need to keep applications running smoothly.</p><h3>3. Enhanced Security:</h3><p>OKD offers robust multi-tenancy capabilities. It integrates with enterprise authentication systems and provides fine-grained role-based access control.</p><h3>4. Extensibility:</h3><p>Being open-source, OKD can be extended with plugins and integrations, allowing organizations to build atop it to suit their specific needs.</p><h3>Common Challenges &amp; Their Solutions:</h3><h3>Challenge 1: Complex Setups:</h3><p>Setting up a Kubernetes cluster can be daunting.</p><p>Solution: OKD offers a streamlined installation process with built-in configuration options, making the setup process more straightforward.</p><h3>Challenge 2: Multi-Tenancy Concerns:</h3><p>In multi-tenant environments, ensuring isolation and security is paramount.</p><p>Solution: OKD’s robust multi-tenancy features ensure that different teams can work on the same cluster without stepping on each other’s toes.</p><h3>Challenge 3: Continuous Integration and Deployment:</h3><p>Modern applications require frequent updates, demanding a seamless CI/CD pipeline.</p><p>Solution: OKD integrates seamlessly with popular CI/CD tools, ensuring that applications can be updated without downtime.</p><h3>Special Requirements for OKD:</h3><ol><li><strong>Hardware and Infrastructure:</strong> OKD has specific hardware requirements, depending on the size of the deployment. It’s essential to ensure that the infrastructure can handle the load.</li><li><strong>Networking:</strong> OKD requires certain ports to be open and uses specific networking modes, which might need adjustments in firewall rules.</li><li><strong>Storage:</strong> Persistent storage solutions need to be set up and integrated with OKD for stateful applications.</li><li><strong>Dependencies:</strong> OKD might require certain software dependencies to be installed, especially in air-gapped environments.</li></ol><h3>Conclusion:</h3><p>OKD, as a community-driven Kubernetes distribution, offers a plethora of features tailored for developers and operations teams alike. While it addresses many challenges inherent in container orchestration, it’s essential to understand its unique requirements to harness its full potential.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dda50cd3dac3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Harnessing OpenTelemetry with Jaeger, ELK, and Prometheus]]></title>
            <link>https://medium.com/cloud-native-daily/harnessing-opentelemetry-with-jaeger-elk-and-prometheus-e06360de831a?source=rss-841d7f4a587c------2</link>
            <guid isPermaLink="false">https://medium.com/p/e06360de831a</guid>
            <category><![CDATA[monitoring]]></category>
            <category><![CDATA[jaeger]]></category>
            <category><![CDATA[opentelemetry]]></category>
            <category><![CDATA[observability]]></category>
            <category><![CDATA[prometheus]]></category>
            <dc:creator><![CDATA[Moshe Eliya]]></dc:creator>
            <pubDate>Sun, 06 Aug 2023 13:56:10 GMT</pubDate>
            <atom:updated>2023-08-17T01:34:57.867Z</atom:updated>
            <content:encoded><![CDATA[<h4>Integrating OpenTelemetry with Jaeger (tracing), ELK (logging), and Prometheus (monitoring) for a comprehensive Observability solution for your applications.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rea84RXOin7hQL6jT9Pq0w.png" /></figure><h3>Introduction to OpenTelemetry</h3><p>OpenTelemetry is an open-source observability framework for cloud-native software. It provides APIs, libraries, agents, and instrumentation to facilitate the collection of traces, metrics, and logs from applications. As the merger of OpenTracing and OpenCensus, OpenTelemetry aims to create a unified standard for application performance monitoring (APM) and observability.</p><h3>Why OpenTelemetry?</h3><p>In today’s complex microservices architectures, understanding how requests flow through various services, diagnosing performance bottlenecks, and ensuring system reliability is crucial. OpenTelemetry provides the tools to achieve this, offering a holistic view of the system’s performance and health.</p><h3>Integration with Jaeger</h3><p><strong>Jaeger </strong>is a distributed tracing system, and it’s one of the tracing backends compatible with OpenTelemetry. Here’s how they work together:</p><ul><li><strong>Tracing:</strong> OpenTelemetry captures trace data from applications, which Jaeger then collects, stores, and visualizes.</li><li><strong>Visualization:</strong> Jaeger’s UI offers a detailed view of trace data, allowing developers to understand request flows, find latencies, and diagnose issues.</li></ul><p>When integrating OpenTelemetry with Jaeger, you’ll typically configure the OpenTelemetry Collector with an exporter for Jaeger. Here’s a basic configuration example:</p><pre>exporters:<br>  jaeger:<br>    endpoint: &quot;jaeger-collector:14250&quot;<br>    insecure: true<br>service:<br>  pipelines:<br>    traces:<br>      receivers: [otlp]<br>      processors: [batch]<br>      exporters: [jaeger]</pre><p>This configuration sets up the OpenTelemetry Collector to receive traces using the OTLP protocol and then export them to a Jaeger collector.</p><h3>Integration with ELK Stack</h3><p>The <strong>ELK Stack</strong> (Elasticsearch, Logstash, Kibana) is a popular log management platform. OpenTelemetry’s logs can be integrated with ELK to provide:</p><ul><li><strong>Centralized Logging:</strong> Collect logs from various services in a centralized Elasticsearch cluster.</li><li><strong>Analysis: </strong>Use Elasticsearch’s powerful search capabilities to analyze log data.</li><li><strong>Visualization: </strong>Kibana provides dashboards to visualize log patterns, errors, and other crucial metrics.</li></ul><p>For logging integration with the ELK stack, you might use Filebeat to ship logs to Elasticsearch. Here’s a basic Filebeat configuration to send OpenTelemetry logs to Elasticsearch:</p><pre>filebeat.inputs:<br>- type: log<br>  paths:<br>    - /path/to/opentelemetry/logs/*.log<br><br>output.elasticsearch:<br>  hosts: [&quot;localhost:9200&quot;]</pre><p>This configuration tells Filebeat where to find the OpenTelemetry logs and where to send them in the Elasticsearch cluster.</p><h3>Integration with Prometheus</h3><p><strong>Prometheus </strong>is a leading open-source monitoring solution. With OpenTelemetry, you can:</p><ul><li><strong>Collect Metrics:</strong> OpenTelemetry captures metrics from applications, which can be scraped by Prometheus.</li><li><strong>Alerting:</strong> Set up alerts based on specific metric thresholds or anomalies.</li><li><strong>Visualization:</strong> While Prometheus provides basic visualization, it’s often paired with Grafana for more advanced dashboards.</li></ul><p>When using OpenTelemetry with Prometheus, you’ll configure the OpenTelemetry Collector to expose metrics in a format that Prometheus can scrape. Here’s a basic configuration:</p><pre>receivers:<br>  otlp:<br>    protocols:<br>      grpc:<br>      http:<br><br>exporters:<br>  prometheus:<br>    endpoint: &quot;0.0.0.0:8889&quot;<br><br>service:<br>  pipelines:<br>    metrics:<br>      receivers: [otlp]<br>      processors: []<br>      exporters: [prometheus]</pre><p>This configuration sets up the OpenTelemetry Collector to receive metrics and then expose them on an endpoint that Prometheus can scrape.</p><h3>Conclusion</h3><p>OpenTelemetry, with its integrations, offers a comprehensive observability solution. By harnessing its power with tools like Jaeger for tracing, ELK for logging, and Prometheus for monitoring, teams can gain deep insights into their applications, ensuring performance, reliability, and optimal user experiences.</p><h4>Further Reading:</h4><ul><li><a href="https://gethelios.dev/blog/opentelemetry-tracing/?utm_source=medium&amp;utm_medium=referral&amp;utm_campaign=cloud+native+daily">OpenTelemetry Tracing: Everything you need to know</a></li><li><a href="https://gethelios.dev/blog/opentelemetry-python/?utm_source=medium&amp;utm_medium=referral&amp;utm_campaign=cloud+native+daily">OpenTelemetry Python - Walkthrough and monitoring Examples</a></li><li><a href="https://gethelios.dev/opentelemetry-a-full-guide/?utm_source=medium&amp;utm_medium=cloud+native+daily">OpenTelemetry: A full guide</a></li><li><a href="https://gethelios.dev/blog/combinining-opentelemetry-traces-with-prometheus-metrics-to-build-a-powerful-alerting-mechanism/?utm_source=medium&amp;utm_medium=referral&amp;utm_campaign=cloud+native+daily">Combining OTel and Prometheus metrics for alerting machine</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e06360de831a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cloud-native-daily/harnessing-opentelemetry-with-jaeger-elk-and-prometheus-e06360de831a">Harnessing OpenTelemetry with Jaeger, ELK, and Prometheus</a> was originally published in <a href="https://medium.com/cloud-native-daily">Cloud Native Daily</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Splitting AWS CloudFormation Templates Using Nested Stacks]]></title>
            <link>https://medium.com/@mosiko1234/splitting-aws-cloudformation-templates-using-nested-stacks-189aea71f690?source=rss-841d7f4a587c------2</link>
            <guid isPermaLink="false">https://medium.com/p/189aea71f690</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[cloud-engineering]]></category>
            <category><![CDATA[platform]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-cloudformation]]></category>
            <dc:creator><![CDATA[Moshe Eliya]]></dc:creator>
            <pubDate>Sun, 06 Aug 2023 08:37:36 GMT</pubDate>
            <atom:updated>2023-08-06T08:54:31.989Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/421/0*n0rQ9VDGzsNdSmvq" /></figure><h3>Understanding AWS CloudFormation and the Power of Nested Stacks</h3><h3>What is AWS CloudFormation?</h3><p>AWS CloudFormation is a service offered by Amazon Web Services (AWS) that allows users to define and provision AWS infrastructure resources in a predictable and repeatable manner. With CloudFormation, you can model your entire infrastructure as code, which means that you can standardize your resources, reduce manual tasks, and streamline the deployment of applications and infrastructure.</p><p>At its core, CloudFormation uses templates, typically written in YAML or JSON, to define the set of AWS resources and their relationships. Once a template is created, CloudFormation takes care of provisioning and configuring those resources for you. This ensures that your infrastructure is set up consistently, reducing potential errors and deviations that can arise from manual setups.</p><p>Benefits of AWS CloudFormation include:</p><ul><li><strong>Infrastructure as Code (IaC):</strong> Represent your infrastructure in code form, making it easy to version, share, and reuse.</li><li><strong>Consistency and Repeatability:</strong> Ensure that your infrastructure is deployed consistently across different environments, such as development, staging, and production.</li><li><strong>Safety and Compliance:</strong> With CloudFormation’s rollback capabilities, if there’s an error in your deployment, it can automatically roll back to the previous state, ensuring that your resources remain in a known, stable configuration.</li><li><strong>Integration with AWS Services:</strong> CloudFormation integrates seamlessly with other AWS services, allowing you to automate complex deployments and workflows.</li></ul><p>Now that we understand the basics of AWS CloudFormation let’s delve into a more advanced topic: nested stacks.</p><p>When working with AWS CloudFormation, as your infrastructure grows, so does the complexity of your templates. One way to manage this complexity is by splitting your templates into smaller, more manageable pieces using nested stacks. In this article, we’ll walk you through the process of creating a main template that calls other templates, which in turn can create resources.</p><h3>What are Nested Stacks?</h3><p>Nested stacks allow you to decompose large CloudFormation templates into smaller, reusable pieces. Essentially, you can create a main template (the parent stack) that calls other templates (child stacks). Each child stack can create resources, and the parent stack can pass parameters down to the child stacks.</p><h3>Step-by-Step Guide to Using Nested Stacks</h3><p><strong>Splitting the YAML File:</strong></p><ul><li><strong>Identify Logical Groupings:</strong> Before splitting your template, identify the resources or logical groupings of resources that you want to separate out.</li><li><strong>Create Separate Files:</strong> For each of these groupings, create separate YAML files.</li><li><strong>Ensure Standalone Structure:</strong> Each smaller YAML file should have the necessary headers and structure to be a standalone CloudFormation template.</li></ul><p><strong>Main YAML File:</strong></p><ul><li><strong>Use </strong><strong>AWS::CloudFormation::Stack Resource:</strong> In your main YAML file, instead of defining the resources directly, you&#39;ll use the <strong>AWS::CloudFormation::Stack</strong> resource type to reference the smaller YAML files.</li><li><strong>Provide S3 Location:</strong> Each nested stack will need an S3 location where the smaller YAML file is stored.</li></ul><p>For instance:</p><p><strong>network-stack.yaml</strong> (a smaller YAML for VPC and Subnets):</p><pre>AWSTemplateFormatVersion: &#39;2010-09-09&#39;<br>Resources:<br>  MyVPC:<br>    Type: &#39;AWS::EC2::VPC&#39;<br>    Properties:<br>      CidrBlock: &#39;10.0.0.0/16&#39;<br>  MySubnet:<br>    Type: &#39;AWS::EC2::Subnet&#39;<br>    Properties:<br>      VpcId: !Ref MyVPC<br>      CidrBlock: &#39;10.0.1.0/24&#39;</pre><p><strong>main-stack.yaml </strong>(the main YAML that references the smaller YAML):</p><pre>AWSTemplateFormatVersion: &#39;2010-09-09&#39;<br>Resources:<br>  NetworkStack:<br>    Type: &#39;AWS::CloudFormation::Stack&#39;<br>    Properties:<br>      TemplateURL: &#39;https://s3.amazonaws.com/my-bucket/network-stack.yaml&#39;</pre><p><strong>Upload to S3:</strong></p><ul><li>Before creating the main stack, you’ll need to upload the smaller YAML files to an S3 bucket. The URLs of these files in S3 are what you’ll reference in the <strong>TemplateURL </strong>property of the <strong>AWS::CloudFormation::Stack</strong> resource in the main template.</li></ul><p><strong>Create the Main Stack:</strong></p><ul><li>Now, you can use the AWS Management Console, AWS CLI, or SDKs to create a stack using the main YAML file. CloudFormation will take care of creating the nested stacks based on the smaller YAML files.</li></ul><h3>Things to Remember:</h3><ul><li><strong>Permissions:</strong> Ensure that the AWS account has the necessary permissions to create the resources and also to read from the S3 bucket where the smaller templates are stored.</li><li><strong>Dependencies:</strong> Be cautious about dependencies between resources across different nested stacks. You might need to pass outputs from one stack as parameters to another.</li></ul><h3>Conclusion</h3><p>Nested stacks in AWS CloudFormation offer a powerful way to manage and organize your infrastructure as code. By splitting your templates into smaller pieces, you can achieve better modularity, reusability, and maintainability. As with any tool, it’s essential to understand the intricacies and best practices to make the most of it. Happy templating!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=189aea71f690" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>