<?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 Kayode Adeniyi on Medium]]></title>
        <description><![CDATA[Stories by Kayode Adeniyi on Medium]]></description>
        <link>https://medium.com/@mkbadeniyi?source=rss-213ea16b4456------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*gcg9L6qk_U3G9LkJ1-FR0A.jpeg</url>
            <title>Stories by Kayode Adeniyi on Medium</title>
            <link>https://medium.com/@mkbadeniyi?source=rss-213ea16b4456------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 23:00:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mkbadeniyi/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[Deploying Edge Stack as an API Gateway]]></title>
            <link>https://medium.com/ambassador-api-gateway/deploying-ambassador-edge-stack-as-an-api-gateway-2b5ad069df57?source=rss-213ea16b4456------2</link>
            <guid isPermaLink="false">https://medium.com/p/2b5ad069df57</guid>
            <category><![CDATA[ambassador-edge-stack]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[api-gateway]]></category>
            <category><![CDATA[envoy-proxy]]></category>
            <dc:creator><![CDATA[Kayode Adeniyi]]></dc:creator>
            <pubDate>Fri, 07 Apr 2023 16:43:41 GMT</pubDate>
            <atom:updated>2025-06-09T21:40:50.246Z</atom:updated>
            <content:encoded><![CDATA[<h4>Guest Author</h4><p><a href="https://www.getambassador.io/products/edge-stack/api-gateway">Edge Stack</a> is a powerful API gateway and <a href="https://www.getambassador.io/docs/edge-stack/latest/topics/running/ingress-controller">Ingress controller</a> that simplifies microservices management. Built on top of the <a href="https://www.getambassador.io/learn/envoy-proxy">Envoy proxy</a>, it provides advanced features such as <a href="https://www.getambassador.io/blog/rate-limiting-apis-scale-patterns-strategies">rate limiting</a>, authentication, and observability while being highly scalable and flexible. Whether you’re just starting with microservices or already have a complex architecture, Edge Stack is an excellent choice for simplifying microservices management.</p><p>This tutorial will guide you through setting up Edge Stack with a node.js server in a Docker container in your <a href="https://www.getambassador.io/products/telepresence">local environment</a>. By following these steps, you’ll learn how to leverage the power of Edge Stack to simplify your microservices management while also gaining hands-on experience with Docker and Kubernetes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WEq2iWpqbQKsYBQRYFIl7A.png" /></figure><h4>Prerequisites</h4><p>To get the most out of this tutorial, you’ll need:</p><ul><li>Basic understanding of <a href="https://developer.mozilla.org/en-US/docs/Learn/JavaScript/First_steps/What_is_JavaScript">Javascript</a> and <a href="https://www.netguru.com/glossary/node-js">Node.js</a></li><li>Knowledge of <a href="https://www.ibm.com/docs/en/cics-ts/6.1?topic=programs-clientserver-model">client and server interaction</a></li><li>Basic understanding of <a href="https://aws.amazon.com/docker/">Docker</a> and <a href="https://www.simplilearn.com/tutorials/docker-tutorial/docker-compose">Docker-Compose</a></li></ul><h4>Project Architecture</h4><p>Crafting an architecture for the application you intend to build is vital because it helps you understand the application’s complexity and workflow, map out the integral components, and how they’ll communicate with each other. Keeping this in mind, I created an architecture to enable you to visualize the application workflow we will build in this article.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/0*1SB-ecGX6VbkARh1" /></figure><h4>Project Setup</h4><p>This section will focus on setting up the environment in which our server will run. First, we will install nodeJS, Docker, and Docker-compose in our system. We added Docker to this setup because it isolates the whole application, making it easy to run on any operating system with Docker installed without any crashes.</p><p><strong>Installing Node.js: </strong>To set up node.js, we first fetch its installation package and install it using the apt-get install command. Run the commands below on your terminal to do this.</p><pre>curl -fsSL https://deb.nodesource.com/setup_19.x | sudo -E bash — &amp;&amp;\<br>sudo apt-get install -y nodejs</pre><p>If you are not on Debian-based operating system, check the installation guide that matches yours <a href="https://nodejs.org/en/download">here</a>.</p><p><strong>Installing Docker and Docker-Compose: </strong>To set up a docker repository in Linux, run the following commands. Not using Linux? Then follow <a href="https://docs.docker.com/compose/install/">these installation instructions</a>.</p><pre>sudo apt-get update</pre><pre>sudo apt-get install \<br> ca-certificates \<br> curl \<br> gnupg \<br> lsb-release</pre><pre>sudo mkdir -m 0755 -p /etc/apt/keyrings</pre><pre>curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg — dearmor -o /etc/apt/keyrings/docker.gpg</pre><pre>echo \<br> “deb [arch=$(dpkg — print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \<br> $(lsb_release -cs) stable” | sudo tee /etc/apt/sources.list.d/docker.list &gt; /dev/null</pre><p><strong>Installing the Docker Engine: </strong>To set up a docker engine in Linux, run the following commands<strong>:</strong></p><pre>sudo apt-get update<br>sudo chmod a+r /etc/apt/keyrings/docker.gpg<br>sudo apt-get update<br>sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin</pre><p><strong>Installing Docker Compose: </strong>Run this command sudo apt install docker-compose to install Docker Compose on your machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/0*7xrppio-Pvfz3_AQ" /></figure><h4><strong>Let’s Code</strong></h4><p>In this section, we will create a node.js server and expose an endpoint to deliver an array of data inside HTTP responses. After creating the server, we will configure Edge Stack’s routes and run both services using Docker-compose. The complete GitHub source code is available <a href="https://github.com/Adeniyikayodee/ambassadorEdgeStack">here</a>.</p><p>The first step is to set up a node project. To do this, run the npm init command and fill out the prompts. After completing this step, you will have a package.json file that contains descriptive and functional metadata about the project inside your home directory.</p><p>Next, we will run the npm install express nodemon command to install Express and Nodemon to enable the node server to run smoothly. For context, Express is a back-end web application framework for building <a href="https://blog.getambassador.io/how-to-deploy-a-rest-api-with-ambassador-edge-stack-and-amazon-eks-11625f1ba505">RESTful APIs</a>, while Nodemon<strong> </strong>is a<strong> </strong>command-line tool that helps with the speedy development of node projects by restarting the application on any change in the code.</p><p>After installing Express and Nodemon, we can now build the server-side logic and create an entry point to the server. To do this, go to your root directory, create a file named app.js, and paste the following code snippet below into it.</p><pre>// app.js<br>const express = require(“express”);<br>const app = express();<br>const content = require(“./route”);<br><br>// Data to be fetched by the API<br>app.use(&quot;/v1/content&quot;,content);<br>const PORT = process.env.PORT || 3000;<br>app.listen(PORT, () =&gt; {<br> console.log(`Server started on port ${PORT}`);<br> });</pre><p>In the app.js file, we imported the express server and a route file (we will create it in the coming steps) and exposed an endpoint on port 3000.</p><p>Now, let’s create a controller that will handle the logic and serve responses to incoming requests. Create a controller.js<strong> </strong>file in your root directory and paste the following code.</p><pre>// controller.js<br>const content = [<br> { id: 1, name: “John Doe”, age: 32 },<br> { id: 2, name: “Jane Doe”, age: 30 },<br> { id: 3, name: “Jim Smith”, age: 35 },<br> { id: 4, name: “Jim SMith”, age: 40}<br> ];<br><br>const getContent = async (req,res) =&gt; {<br>    console.log(&quot;Fetching static content from Array of users.&quot;);<br><br>    if (content.length == null){<br>        console.log(&quot;No content to be fetched&quot;);<br>        return res.status(404).json({<br>            message: &quot;No content to be fetched&quot;,<br>            content: content<br>        })<br>    }<br><br>    console.log(&quot;content fetched.&quot;,content);<br><br>    return res.status(200).json({<br>        message: &quot;content fetched&quot;,<br>        content: content,<br>    })<br>}<br><br>module.exports = {getContent};<br></pre><p>In this file, we created an array of JSON objects and named it content. Then we created a function called <strong>getContent</strong> that will send the array of JSON objects to the request and export it so it can be imported into other files.</p><p>Now, let’s create a file named route.js, import the controller we built in the previous step, and configure it to be called when the /fetch postfix is used in the endpoint.</p><pre>// route.js<br>const app = require(“express”);<br>const router = app.Router();<br>const {getContent} = require(&quot;./controller&quot;);<br><br>router.get(&quot;/fetch&quot;,getContent);<br><br>module.exports = router;<br><br>router.get(&quot;/fetch&quot;,getContent);<br><br>module.exports = router;</pre><p>We are ready to test our server! So, open the package.json file and override the script’s object with the following code block.</p><pre>“scripts”: {<br> “test”: “nodemon app.js”,<br> “start”: “node app.js”<br> },</pre><p>Save all your file changes, and then start the server by running the npm test command. This will return something similar to the output below<strong>:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/567/0*DfhJpiOMs2Wea5w0" /></figure><p>Let’s go ahead and test the endpoint by opening our browser and pasting this URL below in the address bar.</p><pre>http://localhost:3000/v1/content/fetch</pre><p>After pasting the URL on your browser, you will see an output such as this in your terminal and a response in the browser window.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/537/0*2hmpcH1MgsgJ012K" /></figure><h4>Configuring the Edge Stack API Gateway</h4><p>Now, we will configure Edge Stack to act as an API Gateway for our content service. We will create a route file for each service that tells the ambassador to request a resource from a specific service. These route files are also known as Mappings.</p><p>To create a mapping for our content service, create a folder in the backend folder, and inside of it, create a file named content.yaml and paste the YAML configuration below into it.</p><pre>// backend/ambassador/content.yaml<br> — -<br>apiVersion: getambassador.io/v2<br>kind: Mapping<br>name: get_content<br>prefix: /v1/content/<br>rewrite: ‘’<br>service: content:3000</pre><p>For context, here’s a brief explanation of the YAML configuration file above:</p><ul><li><strong>apiVersion:</strong> The API version used by Kubernetes</li><li><strong>kind:</strong> The type of manifest to be used in Kubernetes</li><li><strong>name:</strong> The name of the route</li><li><strong>prefix:</strong> A part of the URL path that comes before the actual endpoint</li><li><strong>Rewrite:</strong> It refers to the ability to modify the URL path or headers of a request before it is forwarded to the backend service</li><li><strong>service:</strong> Traffic is to be routed through this service</li></ul><p>Now that our node server and Edge Stack’s mapping are ready, we will use docker-compose to run our application.</p><h4><strong>Configuring docker-compose environment</strong></h4><p>In the docker-compose file, we will spin up two containers — one for Edge Stack’s and the other for the node server. The Ambassador container will run on port 8080 and mount the mappings into the container to complete the ambassador’s configuration, while the node server will run on port 3000.</p><p><strong>Dockerize the node server: </strong>Before we configure docker-compose, we need to dockerize the node server. To do this, we need a Dockerfile. So, create a Dockerfile in your root directory and paste the following code.</p><pre>FROM node:14-alpine<br>WORKDIR /usr/app<br>COPY package.json .<br>RUN npm install<br>COPY . .</pre><p>In this Dockerfile, we used a node alpine base image for the environment. Then we create a directory and copy the package.json file into it. Finally, we run the install command and copy the rest of the code into the directory. Now we are ready to create the docker-compose environment for our application.</p><p><strong>Writing the docker-compose file: </strong>In your project’s root directory, create a docker-compose.yaml file and paste the YAML configuration below into it.</p><pre>version: &quot;3&quot;<br><br>services:<br>  ambassador:<br>    image: datawire/ambassador:1.10.0<br>    ports:<br>      - 8080:8080<br>    volumes:<br>      - ./backend/ambassador:/ambassador/ambassador-config<br>    environment:<br>      - AMBASSADOR_NO_KUBEWATCH=no_kubewatch<br><br>  content:<br>    build: backend/content/<br>    container_name: content<br>    command: node app.js<br>    hostname: content:3000<br>    restart: always<br>    ports:<br>      - 3000:3000<br>    environment:<br>      PORT: 3000</pre><p>To improve workflow efficiency and reduce errors, we will create a Makefile and configure it to run our Docker environment. To do this, create a Makefile in your project’s repository and paste the code below.</p><pre>// Makefile<br><br>.PHONY: start status stop<br>start:<br> docker-compose up -d --build<br><br>status:<br> docker ps<br><br>stop:<br> docker-compose down</pre><p>So far, we’ve built and dockerized the node server, configured the Ambassador Edge Stack API Gateway, and created a docker-compose environment to run this application. In the next section, we will test the whole setup.</p><h3><strong>Testing the content service</strong></h3><p>To test our service, run the command below from the root of your directory to spin up our environment.</p><pre>sudo make start</pre><p>After a successful run, your output would be something like this;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*x2GGItb9D10cRqB4" /></figure><p>To confirm that the containers are running, you can list them by running this make command.</p><pre>sudo make status</pre><p>If the containers spun up successfully, your output would be something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hrrqbMEwERuXdu72" /></figure><p>As you can see from the output above, the containers are up at their respective ports and ready to work. Now let’s test the endpoint exposed on the content service, just like we did in the previous step when we set up our service. The only difference will be that the request will be directed towards the Edge Stack API gateway on port 8080, the opposite of what we did beforehand. So, hit the following endpoint in your browser’s address bar:</p><pre>http://localhost:8080/v1/content/fetch</pre><p>You will see an output such as this in your browser:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4pQBYsdE00GvR8t4" /></figure><p>Additionally, to successfully debug and improve the container, check the logs of the Ambassador container for in-depth information on the API requests. To do this, get the container ID of the ambassador container by running the make status command, copy the id, and use it in the command below:</p><pre>sudo docker logs -f dae0ccec1f43</pre><p>On running the command above, an output similar to the one in the image below will be displayed. This is detailed information about the successful GET request. It shows the type of request, status code, status flags (if any), service, and port on which the Edge Stack forwarded the request. You can visit <a href="https://www.getambassador.io/docs/edge-stack/latest/topics/running/debugging">Edge Stack’s official documentation</a> to learn more about ambassador logs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*BkbiMG-dRAFCsUEr" /></figure><h4><strong>Conclusion</strong></h4><p>This article guided you through configuring a Docker environment for a node server and showed you how to configure Edge Stack to route traffic to your server. Finally, it showed you how to trace any errors using Ambassador’s Envoy-based logging mechanism.</p><p>Edge Stack accelerates Kubernetes development by providing easy route configuration, scalability, and logging for better debugging. I recommend Kubernetes development teams use it as an API gateway for their <a href="https://www.getambassador.io/resources/cloud-native-workflow-gitops-and-kubernetes">cloud-native </a>applications.</p><p>Visit the <a href="https://www.getambassador.io/products/edge-stack/api-gateway">Edge Stack</a> website or the <a href="https://www.getambassador.io/docs/edge-stack/latest/tutorials/getting-started">documentation</a> to learn more. Good luck learning! 😇</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2b5ad069df57" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ambassador-api-gateway/deploying-ambassador-edge-stack-as-an-api-gateway-2b5ad069df57">Deploying Edge Stack as an API Gateway</a> was originally published in <a href="https://medium.com/ambassador-api-gateway">Ambassador Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Telepresence Improves Your Development Workflow]]></title>
            <link>https://medium.com/ambassador-api-gateway/how-telepresence-improves-your-development-workflow-c1e970481844?source=rss-213ea16b4456------2</link>
            <guid isPermaLink="false">https://medium.com/p/c1e970481844</guid>
            <category><![CDATA[development-workflow]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[telepresence]]></category>
            <category><![CDATA[debugging-tools]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Kayode Adeniyi]]></dc:creator>
            <pubDate>Thu, 12 Jan 2023 18:07:30 GMT</pubDate>
            <atom:updated>2023-01-12T18:07:30.751Z</atom:updated>
            <content:encoded><![CDATA[<h4>Guest Author</h4><p>Building software is a continual process that caters to different factors integral to the software development lifecycle, such as writing code, building, testing, and deploying.</p><p>Today, a smooth development cycle has become a big priority, especially for companies requiring agile development to scale substantially. To do so, cloud native companies have started to focus on improving and speeding up the <a href="https://www.getambassador.io/docs/telepresence/latest/concepts/devloop">inner and outer dev loops</a> of Kubernetes Application Development.</p><p>In this article, I’ll explain the change in the software development workflow over the years, how the efficiency of dev loops contributes to the quality of an application and the speed at which updates are made to it, and finally, how to improve your development workflow using <a href="https://www.getambassador.io/products/telepresence">Telepresence</a> and <a href="https://skaffold.dev/">Skaffold</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0W-3z9Ew9qNv2kWq" /></figure><h4><strong>What’s a Development Workflow?</strong></h4><p>A development workflow is a process that organizations use to develop software. It usually starts by defining the product and moves through to the development, testing, release, and production stages. Organizations usually have to tune their development workflow according to their business and application needs. The relevance of a development workflow is justified because it defines and maintains the right balance of stability versus velocity.</p><p>A couple of years ago, the <a href="https://blog.getambassador.io/using-api-gateways-to-facilitate-your-transition-from-monolith-to-microservices-5e630da24717">monolithic</a> development workflow was intensively used in the industry. With many advantages, it also had shortcomings, such as a tightly coupled architecture, a large codebase, and less scalability and reusability. Over time, the microservice development workflow was birthed to solve these shortcomings, and several organizations shifted from the monolithic to the microservice workflow.</p><p>This shift affected the developer experience as well. Now, developers are responsible for the whole software development lifecycle, including managing external dependencies that add dev time to the equation. To cater to the added responsibility of building service-based applications while understanding the complete development lifecycle, an appropriate branching workflow had to be adopted. So, developers adopted the Trunk-Based development workflow.</p><p>What is the Trunk-Based workflow? You may ask. I’ll tell you! The trunk-based development workflow gives developers more freedom and control. This means that any development team that utilizes it can quickly develop features and roll them out with record speed.</p><p>When developers adopt the trunk-based flow, there is a cyclic process that is followed which is called the <a href="https://www.getambassador.io/docs/kubernetes/latest/concepts/devloop">Dev Loops</a>.</p><h4><strong>Understanding How Dev Loops work</strong></h4><p>You can think of Dev loops as a pipeline of stages, each contributing to completing a feature’s or bug fixes’ development lifecycle. Dev loops are divided into two distinct loops; the inner dev loop and the outer dev loop.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XWTl7kOkK0uMLDYi" /></figure><p><strong>Inner Dev Loop: </strong>The <a href="https://www.getambassador.io/resources/inner-dev-loop">inner dev loop</a> is where the individual developer writes the code for the new feature or bug fix and then goes further to test the impact of their changes, refactor if necessary and retest again. Once the developer is satisfied with the code changes they’ve made, they’ll typically push it to a version control system which automatically triggers the outer dev loop. Since the inner dev loop is where the coding, testing, and refactoring happens, the amount of time a developer spends in this loop impacts the speed at which a bug fix or feature can be shipped to end users.</p><p><strong>Outer Dev Loop: </strong>The outer dev loop happens after the developer pushes the code changes to a version control system. This often includes code review, merging, initiation of a CI/CD pipeline, and test execution leading up to the final release. It’s essential for most of the things happening in the outer dev loop to be efficient and automated so engineers can focus more on building the application rather than dealing with deployments.</p><h4><strong>How a Slow Inner Dev Loop Impacts Kubernetes Development</strong></h4><p>The <a href="https://www.getambassador.io/kubernetes-learning-center">adoption of Kubernetes</a> and other <a href="https://www.getambassador.io/products/ambassador-cloud">cloud native technologies</a> added containerization to the development workflow. This addition, even though it came with benefits, made the inner dev loop slow because developers now have to wait for their code updates to be containerized, pushed to a registry, and deployed to a Kubernetes cluster before seeing the impact of their code changes.</p><p>Since the key objective of every development team is to ship updates to their end users as quickly as possible, this slow inner dev loop that comes with the adoption of Kubernetes had to be addressed!</p><p>Over the years, various approaches have been utilized to speed up the container’s inner dev loop. Among them are; running everything locally or remotely, both of which have pros and cons. For instance, running everything locally would provide great local debugging options but, at the same time, consume much of the machine’s resources, slowing everything down. On the other hand, running everything remotely means the dev team loses these local debugging tools and must always containerize every update they make and push it to the remote Kubernetes cluster before seeing its impact.</p><p>That’s why the “remocal” (local-to-remote) <a href="https://www.getambassador.io/developer-control-plane/code/productive-local-dev-environment">development environment</a> was created. This remocal approach combines the pros of the “local” and “remote” development environment and addresses their cons.</p><h4><strong>What is a Remocal (Local-to-Remote) Development Environment?</strong></h4><p>The <a href="https://www.youtube.com/watch?v=iAzK1CgSEHU">remocal development environment</a> enables developers to debug their code locally while utilizing the dependencies of their respective remote Kubernetes cluster. This way, they get the best of both worlds without compromising the feedback loop speed and, in parallel, utilize the readily available dependencies and resources of the remote Kubernetes cluster.</p><p><a href="https://www.getambassador.io/docs/telepresence/latest/quick-start">Telepresence</a> is one of those tools that enables Kubernetes teams to implement a local-to-remote development environment in their workflow.</p><h4>What is Telepresence?</h4><p>Telepresence is an open source CNCF tool that allows developers to code and test microservices locally against a remote Kubernetes cluster. With this tool, developers can run code locally and forward requests to and from the remote Kubernetes cluster, bypassing the slower process of waiting for a container to be built, pushed to the registry, and deployed. <a href="https://www.getambassador.io/products/telepresence">Telepresence offers an enterprise version</a> that allows Kubernetes development teams to reduce development compute costs and change failure rate, create personal intercepts, and use secure preview URLs to share your development environment with teammates and collaborate on fixes without wasting time reproducing bugs across everyone’s machine.</p><h4><strong>Hands-on Lab with Skaffold and Telepresence</strong></h4><p>In this section, we will get hands-on with Skaffold and Telepresence. To follow along with this lab, you’ll need to have a running Kubernetes Cluster and knowledge of YAML configs.</p><h4><strong>Automate the building of container images with Skaffold</strong></h4><p>Skaffold is a great automation tool for building and deployment. We will use Skaffold to automate the building and pushing of a Docker image for our sample project.</p><p><strong>Step 1: Install Skaffold</strong></p><p>The first thing we need to do is install Skaffold. If you use a Linux machine like me, run the commands.</p><pre>curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.0.0/skaffold-linux-amd64 &amp;&amp; \<br>sudo install skaffold /usr/local/bin/</pre><p>If you are not using a Linux machine, <a href="https://skaffold.dev/docs/install/">Skaffold’s official documentation</a> will guide you through installing it on your operating system.</p><p><strong>Step 2: Clone the sample project</strong></p><p>I created a <a href="https://github.com/Adeniyikayodee/Telepresence">sample application</a> for the purpose of this lab and pushed it to GitHub. To clone the project, run this command git clone <a href="https://github.com/Adeniyikayodee/Telepresence.git">https://github.com/Adeniyikayodee/Telepresence.git</a> on your terminal.</p><p><strong>Step 3: Initialize Skaffold</strong></p><p>In your root directory run this command skaffold init and then choose the Builder option of your choice using the arrow keys on your keyboard. For the purpose of this lab, select <strong>Docker (backend/svc1/Dockerfile)</strong> and <strong>Docker (web/Dockerfile)</strong> and then press enter. After doing this, enter <strong>“Y”</strong> on the prompt to successfully configure the skaffold.yaml config. You will find it in your project’s root directory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/895/0*jdmbIBaRDqqbinxS" /></figure><p><strong>Step 4: Automate the build and deployment</strong></p><p>To automate the building of the docker images for our sample application, run the skaffold run command. This command builds and deploys the application once. After this, check the deployment status by running the kubectl get status command. On doing this, you’ll get results similar to the one in the image below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/0*an8ODVrv6lBDpcrM" /></figure><p><strong>Step 5: View the application on your browser</strong></p><p>As you can see, the Kubernetes application has been deployed successfully and is now ready for use. Copy the EXTERNAL-IP address of the service/web and paste it into your preferred browser to see the application. It will be similar to the one in the image below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2BnG7ALv9LNv_uTU" /></figure><p>This application renders the text “Hello, this is Telepresence” in the front end. Take note that the color of the text is black, as we will update the color of the text for debugging purposes later on in this lab.</p><h4><strong>Debug Kubernetes services with Telepresence</strong></h4><p>Before we start, we must understand the debugging workflow. We will connect it with our backend’s service inside our k8s cluster. Telepresence will create an envoy proxy besides our backend service and route the traffic from our remote backend service to our local backend service on our local machine. This will help us see the effects of changes we make in our code.</p><p><strong>Step 1: Install Telepresence</strong></p><p>As mentioned earlier, I am on a Linux machine. So, I’ll be installing it using the commands below.</p><pre># 1. Download the latest binary (~50 MB):<br>sudo curl -fL https://app.getambassador.io/download/tel2/linux/amd64/latest/telepresence -o /usr/local/bin/telepresence<br><br># 2. Make the binary executable:<br>sudo chmod a+x /usr/local/bin/telepresence</pre><p>If you are using another operating system other than Linux, check out the Telepresence official documentation on installing it.</p><p><strong>Step 2: Connect your local machine to the remote K8s cluster using Telepresence</strong></p><p>With Telepresence now installed, let’s connect our local machine to the remote Kubernetes cluster. To do this, run the telepresence connect command. If all goes well, it will return results like the one below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/0*qRmkPXAOR4IUZJcv" /></figure><p><strong>Step 3: Start the local backend service</strong></p><p>Now that we’ve successfully connected our local machine to the remote Kubernetes cluster using Telepresence let’s start our local backend service by running npm start. This will return the output below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/714/0*YI7C0jC5czHbMXfI" /></figure><p>With this, our local server is ready to listen to API requests. So let’s trigger a <a href="https://www.getambassador.io/docs/telepresence/latest/concepts/intercepts">Telepresence intercept</a><strong>!</strong></p><p><strong>Step 4: Trigger a Telepresence intercept</strong></p><p>To trigger a <a href="https://www.getambassador.io/docs/telepresence/latest/concepts/intercepts">Telepresence intercept</a>, run the command below on your terminal. This is going to reroute the traffic intended for svc1 service in the remote Kubernetes cluster to the local svc1 service running on our machine.</p><pre>$ telepresence intercept svc1 — port 3001 — ingress-host gke_carbon-ruler-351105_us-central1-c_cluster-1 — ingress-port 80</pre><p>A successful intercept will return the results below, notifying you that the intercept has been triggered successfully and the traffic has been rerouted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/778/0*_D5nwsVZJ3QGVlDJ" /></figure><p>Let’s test the intercept by changing the color of our frontend text. To do this, go to the backend/svc1/controller.js file and replace the changeColor function with the code snippet below. For context, the code snippet above will return the hash code of “Red” color, which will be consumed by the front end and used dynamically.</p><pre>exports.changeColor = async (req, res) =&gt; {<br> console.log(&quot;Calling change color function&quot;);<br> return res.json({<br> data: &quot;#FF0000&quot;,<br> message: &quot;Calling change color function&quot;,<br> });<br>};</pre><p>Save your code changes, return to your browser, and click on the reload icon. On doing this, you’ll notice that the color of the text has now changed to red.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JyDB5GE85sXyRhlu" /></figure><p>And the debugged backend output will keep updating, as seen in the image below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/0*bqkSgjLVYMr9e-hL" /></figure><p>Once you are satisfied with these changes, you can then push your changes to a version control system to trigger the outer dev loop and deploy the update to your end users.</p><p>As you can see, Telepresence, as opposed to other conventional solutions and techniques, delivers a perfect development, testing, and debugging environment all in one package. Because of the on-the-spot feedback, developers are more productive and produce higher-quality code. All of these are essential for creating scalable systems.</p><h3><strong>Conclusion</strong></h3><p>In this article, you’ve learned about development workflows, the importance of Dev Loops, and how utilizing remocal (local-to-remote) development environments speed up the Container Inner Dev Loop and, as such, makes shipping updates to your end users faster.</p><p>You also got your hands dirty on a Kubernetes cluster by automating artifact building and deployment using Skaffold and debugging the sample application with Telepresence. To learn more about <a href="https://skaffold.dev/">Skaffold</a> and <a href="https://www.telepresence.io/">Telepresence</a>, you can view their documentation and experiment on a Kubernetes cluster. Good luck learning! 😇</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c1e970481844" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ambassador-api-gateway/how-telepresence-improves-your-development-workflow-c1e970481844">How Telepresence Improves Your Development Workflow</a> was originally published in <a href="https://medium.com/ambassador-api-gateway">Ambassador Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to use Policy As Code to Enforce Security and Compliance]]></title>
            <link>https://blog.devops.dev/how-to-use-policy-as-code-to-enforce-security-and-compliance-b58007aef90d?source=rss-213ea16b4456------2</link>
            <guid isPermaLink="false">https://medium.com/p/b58007aef90d</guid>
            <category><![CDATA[devsecops]]></category>
            <category><![CDATA[compliance]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Kayode Adeniyi]]></dc:creator>
            <pubDate>Sun, 14 Aug 2022 12:33:13 GMT</pubDate>
            <atom:updated>2023-06-23T07:52:46.725Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Eg5vX4yvXFiuSBel8_DjAQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@jdent?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Jason Dent</a> on <a href="https://unsplash.com/s/photos/security?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Integrating the necessary security controls and audit capabilities to satisfy data compliance within the DevOps process presents unique opportunities for organizations to scale.</p><p>Understanding the role of Policy as Code erases a lot of compliance worries for DevOps Engineers, and ensures that organizations do not fall short of the standards within their industry.</p><p>Policy as code is a method of managing and defining security rules, conditions and criteria through code. It enforces security and risk policies programmatically, within the CI/CD pipeline.</p><p>With the evolution of resources created for DevOps, the scale and fast-paced growth of cloud platforms, it is hard for the teams to validate or apply security and compliance policies on every IaC change.</p><p>Policy as Code (PaC) allows you to translate the policies into machine language files and enforce security and compliance. The feedbacks from legal, cyber security and compliance teams are very important, achieving this to detailed can be done via PaC</p><p>In this article, you will learn how to use PaC to enforce Security and Compliance in the CI/CD Pipelines.</p><blockquote><strong>Benefits of policy-as-code</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/848/1*DtMaZDmRnDjb-0x0Vpe8fQ.png" /></figure><h4><strong>How Policy as Code Works</strong></h4><p>Policies are written in a high-level language (such as Python or YAML), and code is pushed into a policy engine that makes use of queries.</p><p>The policy engine takes these policies as input, processes them, and outputs them as a query result. This result calculates a decision that aligns with the policies and determines which AST (application security testing) should be used and where.</p><p>To make the security testing run without breaking current builds, the policies are enforced with an API call to the Continuous Integration (CI) pipeline.</p><h4>Policy as Code implementation</h4><p>In this section, we will explore the use cases of PaC. We are going to use the following tools for the use cases.</p><blockquote><strong>Styria’s Open Policy Agent (OPA)</strong></blockquote><p>This is a policy engine that provides policy language called Rego. This language allows declarative and granular control. OPA evaluates the policies against input data present in a JSON file, Terraform plan, or Kubernetes resource.</p><p>There are three components involved in OPA decision-making.</p><ul><li><strong>Data </strong>— OPA uses information about the domain to make decisions</li><li><strong>Query Input</strong> — the question that your application sends to OPA</li><li><strong>Policy </strong>— Can be a simple “true” or “false”. OPA uses this component to return the result.</li></ul><p><strong>Tip: </strong>You can use OPA as a third-party library (if your application is developed in Golang) or you can deploy it as a daemon.</p><blockquote><strong>Armory’s Spinnaker</strong></blockquote><p>This is an Open-Source CD (continuous delivery) platform to release application changes. It allows developers to own their software code from commit to delivery. Before moving towards implementing the policies, you must know about following Spinnaker concepts.</p><ul><li><strong>Application</strong> — the service, configurations, and infrastructure which we are going to deploy using Spinnaker.</li><li><strong>Pipeline</strong> — Sequence of stages given by Spinnaker.</li><li><strong>Stage </strong>— A unit building block of a pipeline, describing its action.</li><li><strong>Artifact </strong>— Object that references an external source.</li></ul><h3>Installing Armory Spinnaker</h3><p>Here, we will set up Spinnaker or Kubernetes — Minnaker. We can also use several other methods for this purpose, for instance, using Operators to install open-source Spinnaker.</p><ol><li><strong>Create Application</strong></li></ol><p>We will use the Spinnaker web console to create a new application. Log in to the console and click on Applications &gt; Create Application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*09HMX5DY8eZJJMsT" /></figure><p><strong>2. Create Pipelines</strong></p><p>Armory allows us to store Spinnaker pipelines in the Git repository using (Dinghy) pipeline-as-code and we can manage them like we manage the code. The application holds the pipelines, so we will see them after the application is created in the first step.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_h687K1yOWf18NTX" /></figure><p><strong>3. Pipeline Configuration</strong></p><p>At this step, we will add stages to the pipeline configuration. Let’s create a stage for Dev Environment and name it Deploy Dev. Add manual approval stage before deploying to the production environment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Blr8xsdDMr3KgMeD" /></figure><h3>Installing OPA</h3><p>We use Kubernetes ConfigMaps for OPA policies. OPA server is installed in the production environment and exposed as a Service in the Minnaker deployment.</p><p>Example use-cases to show the implementation of “Shift-Left” in Policy as Code in CD pipelines.</p><blockquote><strong>Use case 1.</strong></blockquote><p>Many companies use security scanning software to find common loopholes. For instance, a recent loophole CVE-2021–31440 resulted in access in the Linux Kernal by allowing the escalation of Kubernetes container local privilege using eBPF.</p><p>By default, Kubernetes privileged containers inherit CAP_SYS_ADMIN privileges to allow unprivileged users in a privileged container to escalate privileges to the node and break out of the container.</p><p>We will create a policy using OPA that will not allow privileged Pods and embed it in the CD pipelines.</p><blockquote><strong>Use case 2.</strong></blockquote><p>Another use case can be an Amazon EKS cluster. Software teams share the same cluster resources with some sort of physical or logical isolation. Suppose, DevOps want to enforce a policy to prevent the Developer’s team from creating AWS load balancer services.</p><h3><strong>Writing the policies</strong></h3><p>We write the following two policies using OPA Rego language.</p><ul><li><strong>Disallow-privileged-containers</strong></li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a8860fb0677e757a3ea4913a5957d5bd/href">https://medium.com/media/a8860fb0677e757a3ea4913a5957d5bd/href</a></iframe><ul><li><strong>Disallow-eks-loadbalancer-service</strong></li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0b5b92a6ed22b492ffe783ee1caf5dd6/href">https://medium.com/media/0b5b92a6ed22b492ffe783ee1caf5dd6/href</a></iframe><h3><strong>Enforce the policies</strong></h3><p>Create <em>configMaps</em> and label it openpolicyagent.org/<strong>policy</strong>=rego to enforce the OPA policies.</p><blockquote><strong>Testing the policies</strong></blockquote><p>If a build trigger is configured, we push the commits to the Git Repository to test the Continuous Delivery Pipelines with the Policies. For the demo, we start the execution of the pipeline in the Spinnaker Web Console.</p><ol><li><strong>Testing Disallow-privileged-containers policy</strong></li></ol><p>When the developer tries to push a commit to create a privileged container in the Kubernetes cluster, it will get an OPS policy engine error in the pipeline.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/255194f342708fe060cfe6a645a6bd81/href">https://medium.com/media/255194f342708fe060cfe6a645a6bd81/href</a></iframe><p><strong>2. Testing Disallow-eks-loadbalancer-service policy</strong></p><p>When the developer tries to push a commit to create an AWS NLB cluster in the Amazon EKS cluster, it will get an OPS policy engine error in the pipeline.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/edb06f92954843b54a783d838299eb66/href">https://medium.com/media/edb06f92954843b54a783d838299eb66/href</a></iframe><h3><strong>Policy as Code vs Infrastructure as Code</strong></h3><p>PaC support multiple integrations and platforms, limit access only to authorized users and grant access based on the least privilege.</p><p>Policies use block-listing, allow-listing, or their combination to define the boundaries, and monitor infrastructure to examine compliance throughout the infrastructure lifecycle and across clouds.</p><p>Infrastructure as Code is a way to automate the process of provisioning infrastructure using code. The PaC behaves as a bridge between IaC and DevOps. It has a large number of use cases that can be applied during the development lifecycle covering security, compliance, data management, and more.</p><h4>Wrapping up</h4><p>Using the manual review technique, we can check if the software is compliant, but usually, they are prone to errors and are time-consuming. DevOps should adopt the Policy as Code approach along with GitOps to accelerate development timeframes, enforce security and all forms of compliance. All they need is to manage policies throughout the software lifecycle and spread them across all pipelines, cloud environments, and clusters.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b58007aef90d" width="1" height="1" alt=""><hr><p><a href="https://blog.devops.dev/how-to-use-policy-as-code-to-enforce-security-and-compliance-b58007aef90d">How to use Policy As Code to Enforce Security and Compliance</a> was originally published in <a href="https://blog.devops.dev/">DevOps.dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How To Secure Cloud-Native Applications]]></title>
            <link>https://blog.devops.dev/how-to-secure-cloud-native-applications-38f59d99785e?source=rss-213ea16b4456------2</link>
            <guid isPermaLink="false">https://medium.com/p/38f59d99785e</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[deployment]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Kayode Adeniyi]]></dc:creator>
            <pubDate>Sat, 23 Jul 2022 07:54:07 GMT</pubDate>
            <atom:updated>2022-07-26T11:41:38.823Z</atom:updated>
            <content:encoded><![CDATA[<p>Cloud-native applications have emerged to ensure application agility and scalability. But they have their challenges in terms of security. Insecure cloud-native applications (CNAs) will continue to experience security compromises, including data breaches.</p><p>By every measure, Kubernetes is the de-facto standard for automating the deployment and management of cloud-native applications. Its adoption is transforming the ways in which organizations of every size seamlessly put infrastructure in the cloud.</p><p>In every industry, the IT team strives to achieve excellence by developing and releasing software using technologies such as containers, microservices, and declarative APIs. In parallel, these new technologies and architectures give rise to broad security risks and challenges that organizations must protect.</p><h3>The Kubernetes Attack Surface</h3><p>The attack surface of Kubernetes consists of three main things;</p><ul><li>Software Supply chain — Used to build immutable artifacts used to run and deploy containers.</li><li>Infrastructure components — Must be configured and provisioned to run Kubernetes.</li><li>Running and deploying containers that form up unit Kubernetes applications.</li></ul><p>Almost all Kubernetes threats can be mapped into one of the above-mentioned areas. In this article, we will use these areas mentioned above as a framework to write the key concepts of Kubernetes security that comprehensively span its applications and infrastructure.</p><h3>Securing the Software Supply Chain</h3><p>In Kubernetes, the changes to the production level are made in a centralized place known as the software supply chain. So, this software supply chain serves as the bottleneck where the incorporation of users can directly impact the application lifecycle. Building container images that contain the standard application delivery format is the primary goal of a cloud-native software supply chain in Kubernetes.</p><p>Vast distribution and deployment of these container images need a well-prepared strategy to ensure security.</p><ul><li>Base Images</li></ul><p>The base operating system OS images play an important role in container security. Using an official language-specific base Image from a good provider such as OpenJDK is preferred over installing the package on a Linux image.</p><p>The base images in use should be updated regularly to close any loopholes or remove any other security concerns.</p><ul><li>Image Components</li></ul><p>Container images should be kept minimal to avoid any security hole production in them. Use the multistage builds in the containerized application for libraries, binaries, and files containing configurations only. Formally, the following image contents should be avoided in the production environment where possible.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/844/1*3A0iA5rmaRIUyAH6Nllh_w.png" /></figure><ul><li>Image Scanning</li></ul><p>Scan the images after building that so that they may not destroy the already running Kubernetes clusters. Standalone tools like trivy, clair, and anchor are available to scan the images. These are also sometimes integrated with registries of images. Refer to the following table to know when to use the image scanner.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/1*A53riVjXLvN1b8DR6_fgHQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/1*qLTiE9zSa6fOIWb8u7p3Og.png" /></figure><ul><li>Build Systems</li></ul><p>The pipelines, infrastructure and CI build used to create these images should also be secured. With the increase in the number of tools used to deploy cloud-native applications and infrastructure on Kubernetes, don’t forget to secure the whole CI/CD pipeline.</p><p><strong>Keep the following essential security measures in mind:</strong></p><ul><li>Limited access to the administrative role.</li><li>Ingress only required a network.</li><li>Grant minimal required permissions while managing secretes.</li><li>Implement network firewalls.</li><li>Implement automatic scanning for vulnerability, static code analysis, license management, etc.</li><li>Container Registry</li></ul><p>The image registry where the images are stored should also be secured. An internal, private registry provides more security by adding extra operational overhead in the relevant access controls and registry infrastructure. A better solution can be to use a registry that is managed by a cloud platform or some other provider. Som configures reports, and alerts for vulnerabilities and license violations to save from issues on existing and new images.</p><h3>Securing the Kubernetes Infrastructure</h3><p>Deployment and management of Cloud-native applications largely depend on Kubernetes. So, Kubernetes itself needs to be protected against vulnerabilities, and security threats and the clusters working within Kubernetes should be healthy. Each cluster in Kubernetes contains a group of infrastructure components that are required to execute the platform applications on it. These components may need user configurations or administrators while provisioning clustersm and understanding them can be beneficial in focusing on valuable security migrations.</p><p>These components can be categorized as;</p><p><strong>Control Plane Components</strong> — Manage operations within the cluster</p><p><strong>Worker Node Components</strong> — Execute containerized applications in Pods.</p><p>Global decisions related to cluster operations are managed inside the Kubernetes control plane. As a result, protecting its components from threats is paramount since these components could compromise the whole cluster environment.</p><h3>Securing Deployed and Running Workloads</h3><p>After securing the software supply chain, the images that are built using it and the Kubernetes cluster infrastructure, the rest of the work is on controlling the security of Kubernetes Pods that are deployed and run.</p><p><strong>Note: </strong>Pods are the smallest units deployed into clusters and form Kubernetes applications collectively.</p><p>So, according to the smallest unit nature of Pod, they can be the target for individual exploits. Making Pods and their containers secure requires continuous attention. Achieving this implements security deep into the infrastructure and allows control of the requirements of each component individually.</p><p>Runtime security and deploy time contain separate security measures but the main focus is on first set the parameters that limit what containerized applications access and then frequently monitoring for any change in behaviour from these limitations.</p><h4>Admission Controllers</h4><p>The primary methods for limiting or restricting the deployment of pods in Kubernetes are called <a href="https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/">admission controllers</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/846/1*Unqv5xoJnPkRqhXd12Kx-A.png" /></figure><h4>Security Contexts</h4><p>Pod restrictions applied at runtime using the main Kubernetes controls are known as security contexts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/844/1*4iDz6oM1FAlpbSleY4LLhg.png" /></figure><h4>Kubernetes Network Policies</h4><p>It restricts the impact of a hacker that is able to get access to any specific set of deployed and running containers, including restricting the ability to move throughout a cluster laterally.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/844/1*5NNqSagDcB7ddKSZlWDQVw.png" /></figure><h4>RBAC and service account</h4><p>Role-based access control is used by Kubernetes to authenticate access to the cluster resources. Set <strong>automountServiceAccountToken</strong> to <strong>false </strong>so that the application does not heed Kubernetes roles. This is important because Kubernetes mounts a default service account on creation time so Pod may be granted more permission than required.</p><h4>Runtime threat detection</h4><p>In the final steps, the security concepts discussed above must be complemented with runtime protection because no security controls can be declared foolproof. Tools like <a href="https://falco.org/">Falco</a> can be configured to detect and produce alerts when non-device files are written in /dev.</p><pre>- rule: create_files_below_dev</pre><pre>desc: creating any files below /dev other than known programs that manage devices. Some rootkits hide files in /dev.</pre><pre>condition: (evt.type = creat or evt.arg.flags contains O_CREAT) and proc.name != blkid and fd.directory = /dev and fd.name != /dev/null</pre><pre>output: &quot;File created below /dev by untrusted program (user=%user.name command=%proc.cmdline file=%fd.name)&quot;</pre><pre>priority: WARNING</pre><h3>Conclusion</h3><p>Due to the complex nature of cloud-native applications, every component should be deployed securely. With the multi-layered approach to secure the components, companies can scale usage of Kubernetes with more confidence.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=38f59d99785e" width="1" height="1" alt=""><hr><p><a href="https://blog.devops.dev/how-to-secure-cloud-native-applications-38f59d99785e">How To Secure Cloud-Native Applications</a> was originally published in <a href="https://blog.devops.dev/">DevOps.dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Devops Best Practices for Continuous Delivery]]></title>
            <link>https://blog.devops.dev/devops-best-practices-for-continuous-delivery-2f0ebbae65c6?source=rss-213ea16b4456------2</link>
            <guid isPermaLink="false">https://medium.com/p/2f0ebbae65c6</guid>
            <category><![CDATA[continous-deployment]]></category>
            <category><![CDATA[continous-delivery]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Kayode Adeniyi]]></dc:creator>
            <pubDate>Sat, 09 Jul 2022 08:05:06 GMT</pubDate>
            <atom:updated>2022-07-11T10:41:53.548Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/914/1*dchb-eVwFvGeWX_MdipyvQ.png" /></figure><p>Alongside shorter development cycles, continuous delivery solutions contribute to time and cost savings for development teams. Continuous delivery solutions also enable a stronger, more robust feedback cycle, which can strengthen a business’ final product.</p><p>These solutions offer more visibility into the development cycle, helping team leads, product managers, and management receives better insight and analytics on development progress and success.</p><p>With this, most organizations are modifying their methods of working, by shifting to a more agile model like DevOps. DevOps engineers need to consider various principles to make sure the continuous delivery (CD) of new functionalities in production.</p><p>In this article, we will review the critical challenges of implementing a CD process and present the Dos and Don’t of its integration into existing software-development-related workflows.</p><h3>Prerequisites</h3><p>Here are the requirements/prerequisites for the continuous development process;</p><ul><li>A working CI environment.</li><li>Developers, SQA, and operations teams must communicate the goals.</li><li>Automate and version everything.</li><li>Share procedures and tools between teams.</li><li>Empower the teams by making infrastructure project-friendly.</li><li>Production versions of the Application must be ready.</li></ul><h3>What Is Continuous Delivery?</h3><p>Continuous delivery represents the workflows, activities, and automation needed to shepherd a new piece of functionality from ideation to the end-user. Modern application development relies on the CD and expands to the continuous integration (CI) processes by deploying the changes to the production environment (after build state) or to the staging/testing environment</p><p>The main goal of the CD process is to allow developers to always have a deployment-ready build artifact that has passed through a predefined list of tests. Developing, maintaining, and optimizing a continuous delivery process requires specialized skills and tools throughout the CI/CD pipeline.</p><p>Because this release system requires the fast delivery of complex solutions with concise feedback loops and high degrees of cross-functional collaboration, the DevOps methodology is perfectly suited to enable CD. In DevOps, the term CD is often considered as a single-phase including the combination of the delivery of the continuous artifacts and their automatic deployment into production.</p><h4><strong>Benefits of Continuous Delivery</strong></h4><p>Let’s go through the benefits of the well-documented and automated CD process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*5d2A5bhJAB87-P66uPgqEw.png" /></figure><h3>CD Dos and Don’ts</h3><h4>1. Automate testing</h4><p>Continuous<strong> </strong>development processes allow the developers to test their applications other than the unit testing. These tests include the following;</p><ul><li>UI testing</li><li>Load testing</li><li>Integration testing</li><li>Regression testing</li><li>API reliability testing</li></ul><p><strong>Do:</strong> Automate the verification and validation of software to include unit, component, capacity, functional, and deployment tests.</p><p><strong>Don’t:</strong> Use manual tests to verify and validate software.</p><h4>2. Mocking Environment</h4><p>A mock environment is very important for the CI pipeline as it allows the developers and SQAs to reproduce the errors that may occur in the production environment. You can follow the link to extend your knowledge to <a href="https://microsoft.github.io/code-with-engineering-playbook/automated-testing/unit-testing/mocking/#fakes">fake the environment</a>.</p><p><strong>Do:</strong> Run tests the same way on any platform (laptop, on-premises, cloud, container orchestration platform, etc.) to always have the same result with mocked data</p><p><strong>Don’t:</strong> Run tests that will potentially fail based on the status of the infrastructure</p><h4><strong>3. Deployment</strong></h4><p>In the deployment phase, the SQA team verifies that the staging environment is bug-free and ready to move to production. Both, for the automatic or manual deployment into a production environment.</p><h4>Automated Deployment</h4><p>With CD, the software is built in a way that enables it to be released into production at any time. To do this, a CD pipeline involves production-type test environments in which a new software version is automatically deployed for testing. Once the code is validated, the CD process requires human intervention to approve production deployments, and then the deployment itself is done by automation.</p><p><strong>Do:</strong> Build your binaries once while deploying the binaries to multiple target environments as necessary.</p><p><strong>Don’t:</strong> Build software in every stage of the deployment pipeline</p><h4>4. Feature Flag</h4><p>Essentially plays its role in the CD pipeline for the developers to release software faster and with more control. Using the feature flags, the developers can release the features constantly but they are not available to all users laying in the production.</p><p><strong>Do:</strong> Deploy new features or services to production but limit access dynamically for testing purposes</p><p><strong>Don’t:</strong> Wait until a feature is fully complete before committing the source code</p><h4>5. Gitops</h4><p><a href="https://www.gitops.tech/">GitOps</a> to minimize the time/effort required from the members of the development and operations teams. The main components of the GitOps methodology are;</p><ul><li>A versioning source control tool</li><li>An automated process</li></ul><p>GitOps improves CD by validating the changes, automated deployments, and rollbacks in case of failure.</p><p><strong>Do:</strong> Write all deployment processes in scripts, check them into the version control system, and run the scripts as part of the single delivery system</p><p><strong>Don’t: </strong>Use deployment documentation instead of automation; perform the manual deployment.</p><h4><strong>6. Disposable/Preview Environments</strong></h4><p>A disposable environment is a temporary environment that is created on-demand. It is based on CD automation to deploy the application in a very similar way as it is done in the other environments. Although, this process is complex as it required an understanding of the architecture of the application and its dependencies to deploy.</p><p><strong>Do:</strong> Utilize the automated provisioning, scripted deployment, and scripted database patterns; any environment should be capable of terminating and launching at will.</p><p><strong>Don’t:</strong> Fix environments to “DEV,” “QA,” or other predetermined environments</p><h4>7. A/B Testing</h4><p>The flag that allows the deployment of new features using CI and CD processes can raise the risk of deploying some component that might work for someone that has not worked for everyone at the same time. A/B testing allows developers to test the component with some traffic and then gradually increase and optimize the component. It is deployed once the maximum user experience is achieved. It reduces the risk of technical issues that can be raised after publishing and putting a load on the application.</p><p><strong>Do:</strong> Automate tests to verify the behaviour of the application; continually run these tests to provide near real-time benchmarking.</p><p><strong>Don’t:</strong> Never benchmark the performance of new features.</p><h4>8. Permission Management</h4><p>Company source code, passwords, and other confidential and important data are present in the automation tools used in CD pipelines. However, these tools offer resilience and measure of stability for an application, but securing their access is important to avoid any human error or malicious behaviour that can be the cause of the company’s loss.</p><p><strong>Do:</strong> Secure all actions on the deployment job’s orchestration platform by defining a role-based access policy to scripts and pipelines</p><p><strong>Don’t:</strong> Allow anyone to launch any job at any time without controls or checkpoints</p><h4><strong>9. Rollback</strong></h4><p>Restoring the system to its last state after pushing some changes to it is called rollback. This process makes sure that a system can be avoided failures by immediately restoring it to its previous state and saving the business from any big loss.</p><p>After deployment failure, the rollback process requires predefined procedures to restore/rollback applications automatically or manually. Only those components included in the rollback process were included in the last deployment.</p><p>Merging <a href="https://www.ibm.com/cloud/learn/aiops">AIOps</a> with the CI/CD pipeline can be helpful to roll back the changes in case of any failure efficiently. Ultimately, it can reduce downtime and improves the overall experience of the clients.</p><p><strong>Do:</strong> Provide an automated single-command rollback of changes after an unsuccessful deployment.</p><p><strong>Don’t:</strong> Manually undo changes applied in a recent deployment; shut down production instances while changes are undone.</p><h4><strong>10. Observability</strong></h4><p>Observability is now an important part of any architecture to manage a system efficiently. Also, it is important to know whether it is working properly and identify which component needs to be fixed, modified, or improved at any level.</p><h4>Metrics to measure</h4><ol><li>Lead time for changes — The time needed to push new changes to production.</li><li>Deployment frequency — How often builds are deployed to an environment.</li><li>Change failure rate — How many changes result in defects.</li><li>Mean time to recovery — The time required to recover from failure.</li></ol><p><strong>Do:</strong> Deploy software one instance at a time while conducting behaviour-driven monitoring; if an error is detected during the incremental deployment, a rollback release is initiated to revert changes.</p><p><strong>Don’t: </strong>Conduct non-incremental deployments without monitoring</p><h4><strong>11. Communication and Documentation</strong></h4><h4>Components of effective release notes</h4><ul><li>The application name and its new version</li><li>The version’s ticket number to determine the work performed</li><li>The release date</li><li>The team leading the project and potentially the developer who carried out production</li><li>A summarized runbook for rolling back in case of major force</li></ul><p><strong>Do:</strong> Automatically notify all engineering team members to coordinate projects and further actions</p><p><strong>Don’t:</strong> Wait until an error occurs during a deployment for dev and ops teams to collaborate and identify issues with the latest release currently in production</p><h3>Conclusion</h3><p>Many organizations have been reaching a high level of automation by adopting DevOps by implementing CI/CD methods. However, there is space to merge these principles with the new integration of Artificial Intelligent processes that uses learning models, this method will allow us to make our software more reliable and satisfy our customers.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2f0ebbae65c6" width="1" height="1" alt=""><hr><p><a href="https://blog.devops.dev/devops-best-practices-for-continuous-delivery-2f0ebbae65c6">Devops Best Practices for Continuous Delivery</a> was originally published in <a href="https://blog.devops.dev/">DevOps.dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DevOps Security Checklist for Kubernetes Deployment]]></title>
            <link>https://blog.devops.dev/devops-security-checklist-for-kubernetes-deployment-22d28c9bbc3a?source=rss-213ea16b4456------2</link>
            <guid isPermaLink="false">https://medium.com/p/22d28c9bbc3a</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[deployment]]></category>
            <dc:creator><![CDATA[Kayode Adeniyi]]></dc:creator>
            <pubDate>Sat, 02 Jul 2022 15:52:43 GMT</pubDate>
            <atom:updated>2022-07-12T12:17:09.585Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IH1J9sbs4FUMy3CabaeqBw.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@speedoshots?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Miłosz Klinowski</a> on <a href="https://unsplash.com/s/photos/security?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>With the advancement in technology stacks, automated deployment techniques, and associated development, the need for security is also increasing in parallel.</p><p>Kubernetes is an open-source system to automate the deployment, scaling, and management of containerized applications.</p><p>Kubernetes is also actively adapting the measures by introducing new methods to manage threats. So, in this article, we will learn the security checklist for the Kubernetes Deployment process</p><p><strong><em>Tip:</em></strong><em> </em><strong><em>The smallest units of software applications deployed into Kubernetes clusters and from Kubernetes applications collectively, are called Pods.</em></strong></p><p>Pods and their containers require great attention regarding security. It promotes the granular security control model that is more suitable for the requirements of application components individually.</p><h3><strong>1. Use Admission Controllers</strong></h3><p><a href="https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/">Admission Controllers</a> are responsible for the restricted deployment of Pods in Kubernetes. Go through the following table to get a better understanding.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/950/1*lqKqV1yLxZL_TetNmcl6dg.png" /></figure><h3>2. Runtime security and Deploy time</h3><p>Runtime security and deploy time is a security measure in Kubernetes deployment that involves limiting the functionality of containerized applications. It requires restricting certain parameters to limit the applications and then monitoring the deviation or any attempt to deviate the behaviour from that limits.</p><h3>3. Runtime threat detection</h3><p>The security checks always precede the new security threats hence, nothing can be declared foolproof. So, runtime threat protection is a mandatory part of the security checklist for Kubernetes Deployment.</p><ul><li>To best achieve the runtime threat protection, monitor the system-level activities like network communication and process execution at the level of individual container level. It helps to identify the potential signs of compromise.</li><li><a href="https://falco.org/">Falco</a> is a tool that can monitor Kubernetes API logs and syscalls. Configuring and using this tool to generate alerts upon any privilege escalation is also included in the Kubernetes deployment security measures checklist. For example, if someone tries to write in a protected directory, Falcon can be configured to detect the activity and generate the alert.</li></ul><p><strong>For example</strong></p><pre>- rule: create_files_below_dev<br>desc: creating any files below /dev other than known programs that manage devices. Some rootkits hide files in /dev.</pre><pre>condition: (evt.type = creat or evt.arg.flags contains O_CREAT) and proc.name != blkid and fd.directory = /dev and fd.name != /dev/null</pre><pre>output: “File created below /dev by untrusted program (user=%user.name command=%proc.cmdline file=%fd.name)” priority: WARNING</pre><h3>4. Use role-based access control</h3><p>Kubernetes protect the cluster resources using role-based access control (RBAC). Every Pod is mounted with a default service account in Kubernetes. So, due to the permissions of this default service account, the Pod can get more permissions than required.</p><p>For the best security practices in Kubernetes Deployment, set <strong>automountServiceAccountToken </strong>to false or implement the least privilege principle according to which, assign only the permissions required for the application to interact with the external components or Kubernetes.</p><h3>5. Implement Kubernetes Network Policies</h3><p>This Kubernetes Deoplyment checklist item doubles the security of the application and makes the attacker’s life harder. In this, Pod to-Pod traffic is protected. It is demonstrated in the following table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/1*B4SfYZGa87jr7UgbuqBzRw.png" /></figure><h3>6. Security Context</h3><p>Security contexts are responsible for applying the restriction on Pod dynamically. Therefore, the security context plays a vital role in the working of pod runtime security in Kubernetes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/1*bSXFk4OlvIto5Oo3tD-jAw.png" /></figure><h3><strong>Conclusions</strong></h3><p>Following the security measures described in this article, you can make the deployment process safer. However, there is also the possibility of loopholes. So, you must keep these security measures up to date according to the standards and requirements of the application.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=22d28c9bbc3a" width="1" height="1" alt=""><hr><p><a href="https://blog.devops.dev/devops-security-checklist-for-kubernetes-deployment-22d28c9bbc3a">DevOps Security Checklist for Kubernetes Deployment</a> was originally published in <a href="https://blog.devops.dev/">DevOps.dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Web3 Is Impacting Traditional Financial Services with Decentralized Finance (DeFi)]]></title>
            <link>https://medium.com/@mkbadeniyi/how-web3-is-impacting-traditional-financial-services-with-decentralized-finance-defi-fb15e258a90d?source=rss-213ea16b4456------2</link>
            <guid isPermaLink="false">https://medium.com/p/fb15e258a90d</guid>
            <category><![CDATA[defi]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[web3]]></category>
            <category><![CDATA[fintech]]></category>
            <category><![CDATA[financial-services]]></category>
            <dc:creator><![CDATA[Kayode Adeniyi]]></dc:creator>
            <pubDate>Sun, 19 Jun 2022 10:29:27 GMT</pubDate>
            <atom:updated>2022-06-19T10:29:27.077Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*euSMvlWzW3aKGIC9d1YMYA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@markusspiske?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Markus Spiske</a> on <a href="https://unsplash.com/s/photos/internet?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>The modern banking system has survived for hundreds of years. It has been able to survive various changes to technology, and society, thanks to its ability to adapt. The latest stressor, which many experts believe will pose a challenge to the financial system, is Web3.</p><p>The major impact of Web3 on the financial sector will come from Decentralized Finance DeFi). While the banking sector has always adapted to incorporate, and even benefit from new technology, DeFi could prove quite challenging. A major reason for this is that DeFi was created to be the polar opposite of the centralized financial system. Below is a detailed insight into how DeFi and Web3 could change the global financial system.</p><h3><strong>Tracing the Origins of Fintech, DeFi, and Web3</strong></h3><p>Just before the 2008 financial crash, the seeds of Web3 and DeFi were being planted. Changes to the traditional financial sector can be traced to 2007 with the success of micro-financing technology. A good example is M-Pesa, a micro-financing platform that was launched in Kenya. It helped to show that financial services could be delivered to millions of unbanked people with just a mobile phone.</p><p>Shortly after the launch of Mpesa in March that year, the iPhone was launched in June 2007. It created an app economy, which made it possible to launch nuanced, targeted financial services for millions of people. This changed how the world viewed the financial system and made it possible for people to access it via something in their hand.</p><p>A year later, in 2008, someone or a group, going by the name Satoshi Nakamoto, announced the Bitcoin project before its launch in 2009. Combined with the loss of trust in the financial system after the 2008 market crash, it helped to spur interest and adoption of the technology. Besides that, the 2010s were the decade of low rates, which benefited credit, savings, and wealth-focused startups, which helped to grow the venture capital-led explosion of fintech.</p><h3><strong>How DeFi is changing the Financial Sector</strong></h3><p>As the fintech industry has developed, interest in DeFi technology has grown. Many developers have realized that most of the services delivered via neo banks, and micro-finance platforms can as easily be offered via DeFi platforms. When these services are offered via a DeFi set-up, they come with numerous advantages over centralized platforms.</p><p>DeFi is based on the peer-to-peer concept that Bitcoin was built on. It eliminates the intermediaries from the financial system. Smart contracts are used to regulate interactions amongst parties in the Defi world. With enough time and creativity, all services offered via the centralized financial system could be replicated by DeFi applications. With DeFi, there is zero human intervention, which increases efficiency while reducing the chances of any errors.</p><p>At the most basic, DeFi is a protocol created using code called smart contracts that are secured via a blockchain network. The source code for DeFi protocols is open source, and available to anyone in the world that wants to view it. Users in a DeFi ecosystem communicate via smart contracts with their crypto wallets being used to transfer funds, lend, borrow, and use any other DeFi services developed within a protocol.</p><h3><strong>Why DeFi?</strong></h3><p>DeFi protocols allow users to access capital easily and affordably. They enable efficient, borrowing, and decentralized exchanges. Some of the DeFi protocols in the world have become highly efficient, and they now facilitate billions of dollars in transactions annually. A good example is the Uniswap DeFi protocol, which has facilitated over a trillion in transactions since it was created.</p><h3><strong>DeFi and the Insurance Sector</strong></h3><p>DeFi and Web3 technologies could prove extremely useful in transforming the global insurance sector, which is valued at over $5 trillion. While DeFi insurance products are still in the early stages, they show great potential. Some of the benefits of using DeFi protocols are:</p><ul><li>Protecting DeFi Deposits</li><li>Protecting against crypto flash loan attacks</li><li>Immediate redemption of tokenized assets</li><li>Protect against the risk of theft on crypto wallets</li><li>Protect funds from attacks on crypto exchanges</li><li>Quickly identify fraudulent claims</li><li>Boost reliability of medical history</li><li>Reduce overhead costs due to increased speed and efficiency during claims processing</li></ul><h3><strong>Democratizing Access to the Financial System</strong></h3><p>While the global financial system has played a role in wealth creation around the world, it has its limitations. For millions of people around the world, there is no way to access the financial system.</p><p>Around the world, over 1.7 billion people have been locked out of the financial system, which denies them access to basic financial services such as loans. DeFi could democratize the financial, and access areas where the mainstream financial system has been unable to penetrate. For these people, DeFi would be the only financial system they know. Without the limitations of national borders, DeFi can be accessed by anyone in any location in the world.</p><p>Within the existing financial system, it can cost 10% or more to send funds across international borders. With DeFi, users can receive funds from anywhere in the world at lower costs while enjoying great interest rates.</p><h3><strong>The Future of DeFi</strong></h3><p>While the future of Defi looks promising, there are still huge challenges that will need to be overcome. One of them is security. Since the creation of the DeFi industry, hackers have managed to trick protocol users and steal millions of dollars in funds. Most DeFi developers now realize they cannot handle these security challenges on their own. Currently, one of the solutions being used is smart contract insurance, where users are compensated in case hackers steal funds.</p><p>As the sector grows, the use of stablecoins is also going to grow. Doing so could help to drive mainstream adoption. People in nations where hyperinflation is an ongoing challenge will likely be amongst the early adopters of stablecoin-based DeFi ecosystems. Services, where banks have historically enjoyed an unchallenged monopoly, are moving into the DeFi realm, creating a more inclusive financial system.</p><h3><strong>Summary</strong></h3><p>The banking industry has always been technology-driven. Banks have invested in new technology such as improved internet platforms, faster processing systems, more reliable ATMs, and better payment gateways. All of these have contributed to a more efficient financial system. Acknowledging the role of technology in the sector should temper any urge to dismiss the role of Web3 and DeFi protocols in the future of the financial system.</p><p><strong>References</strong></p><p><a href="https://www.linkedin.com/pulse/web3-future-finance-what-digital-id-wallets-motion-defi-sam-boboev/?trk=pulse-article_more-articles_related-content-card">https://www.linkedin.com/pulse/web3-future-finance-what-digital-id-wallets-motion-defi-sam-boboev/?trk=pulse-article_more-articles_related-content-card</a></p><p><a href="https://internationalbanker.com/banking/web3-defi-and-the-atonement-of-purpose-is-banking-ready-to-answer-tomorrows-questions/">https://internationalbanker.com/banking/web3-defi-and-the-atonement-of-purpose-is-banking-ready-to-answer-tomorrows-questions/</a></p><p><a href="https://www.zdnet.com/finance/blockchain/what-is-defi-everything-you-need-to-know-about-the-future-of-decentralised-finance/">https://www.zdnet.com/finance/blockchain/what-is-defi-everything-you-need-to-know-about-the-future-of-decentralised-finance/</a></p><p><a href="https://www.linkedin.com/pulse/web-30-impact-banking-biren-parekh/?trk=articles_directory">https://www.linkedin.com/pulse/web-30-impact-banking-biren-parekh/?trk=articles_directory</a></p><p><a href="https://www.nasdaq.com/articles/how-web3-is-already-transforming-finance">https://www.nasdaq.com/articles/how-web3-is-already-transforming-finance</a></p><p><a href="https://www.asbresources.com/blog/defi-is-changing-the-future-of-the-financial-industry">https://www.asbresources.com/blog/defi-is-changing-the-future-of-the-financial-industry</a></p><p><a href="https://www.entrepreneur.com/article/387803%23:~:text=DeFi%2520protocols%2520serve%2520to%2520enable,according%2520to%2520supply%2520and%2520demand">https://www.entrepreneur.com/article/387803#:~:text=DeFi%20protocols%20serve%20to%20enable,according%20to%20supply%20and%20demand</a>.</p><p><a href="https://opengeekslab.com/blog/what-is-defi/%23How_DeFi_Changes_Financial_World">https://opengeekslab.com/blog/what-is-defi/#How_DeFi_Changes_Financial_World</a></p><p><a href="https://www.forbes.com/sites/philippsandner/2021/02/22/decentralized-finance-will-change-your-understanding-of-financial-systems/?sh=72a438a65b52">https://www.forbes.com/sites/philippsandner/2021/02/22/decentralized-finance-will-change-your-understanding-of-financial-systems/?sh=72a438a65b52</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fb15e258a90d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Best Practices For Building a CI/CD Pipeline with Jenkins]]></title>
            <link>https://blog.devops.dev/best-practices-for-building-a-ci-cd-pipeline-with-jenkins-c47d81fecf62?source=rss-213ea16b4456------2</link>
            <guid isPermaLink="false">https://medium.com/p/c47d81fecf62</guid>
            <category><![CDATA[continuous-delivery]]></category>
            <category><![CDATA[pipeline]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Kayode Adeniyi]]></dc:creator>
            <pubDate>Thu, 16 Jun 2022 15:23:37 GMT</pubDate>
            <atom:updated>2022-06-17T12:51:01.466Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Introduction to CI/CD and Jenkins</strong></h3><p>CI — Continuous Integration and Continuous Delivery<br>D — Continuous Integration and Continuous Deployment</p><p>As the name suggests, CI/CD is a method of delivering continuous applications to the customers by automation of development processes. Precisely, CI is a modern practice of software development to provide incremental code changes reliably. It automatically runs build and test steps and ensures the code changes are reliable to merge into the repository.</p><p>Then the code is delivered to the CD part which ensures the deployment of the updated code. Both CI/CD works together to provide continuous delivery to the customer, without human intervention to deploy each change.</p><p>In this article, you will learn some of the best practices for building a CI/CD Pipeline using Jenkins. We will talk about their importance and how to implement them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*p5GNu0M-m9g39OFvTOWRhQ.png" /><figcaption>CI/CD</figcaption></figure><h3><strong>Building CI/CD Pipeline with Jenkins — Best practices</strong></h3><p><em>In this section, we will talk about;</em></p><p>● Using the Source control management system to store CICD configurations</p><p>● Using declarative pipeline configurations</p><p>● Building in Parallel as much as possible</p><p>● Stop Merge upon pipeline failure</p><p>● Running unit tests along with your pipeline</p><p>● Running CICD tests with the same environment and binaries as they will use in production</p><h3>Using the Source control management system to store CI/CD configurations</h3><p><strong>Importance</strong></p><p>You should keep the CI/CD configurations along with your source code management system as the CICD configurations are as important as the source code is.</p><p>● Revert back to the previous version from the history of the changes.</p><p>● Put team members to review the changes before integration.</p><p>● If the CICD system corrupts, configurations will not lose as they are placed on the different servers.</p><p>● Migrating to the new CICD cluster will be more efficient.</p><p><strong>How to achieve</strong></p><p>Jenkins allows configuring the project using UI, known as a freestyle project. On the other hand, pipeline projects are configured using Jenkinsfile present in the root of the repository.</p><h3>Using declarative pipeline configurations</h3><p>Declarative pipeline configurations tell a system what to do but not how to do it. As a result of this, most of the complex work is done by the machine, and simpler tasks are left.</p><p><strong>Importance</strong></p><p>● Jenkins provides support for <a href="https://jenkins.io/doc/book/pipeline/syntax/#declarative-pipeline">decelerative pipeline configurations</a> which are easier to read both for humans and machines.</p><p>● Force to give proper stage/step structure to the jobs.</p><p>● Promotes portability.</p><p>● Promotes simpler pipelines by discouraging using a large number of scripts.</p><p><strong>How to achieve</strong></p><p>Convert most of the Jenkins Jobs and repos to declarative pipelines</p><h3>Building in Parallel as much as possible</h3><p>You can build parts of your pipeline in parallel using Jenkins.</p><p><strong>Importance</strong></p><p>Increase the speed of build and test iteration, hence improving the development productivity. Makes the deployment more efficient.</p><p><strong>How to achieve</strong></p><p>In Jenkins, you can run tests for different environments in parallel using declarative pipelines.</p><pre>Stafe(&#39;test&#39;){<br> steps {<br>   parallel(<br>     test_env1:{<br>       steps to build env1<br>     }, test_env2 {<br>       steps to build env2<br>     }<br>   )<br> }<br>}</pre><p>A typical pipeline involves the following steps. So, as you can see, the Test — unit phase can adopt the build-in parallel technique.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aTS8MNWCF0wKDrve37sitA.png" /><figcaption>CI/CD pipeline</figcaption></figure><h3>Stop Merge upon pipeline failure</h3><p><strong>Importance</strong></p><p>Pull Requests allow the reviewers and author to know about the quality of the code. So, they can block the merge and save from culprit changes in the production.</p><p><strong>How to achieve</strong></p><p><a href="https://www.jenkins.io/doc/tutorials/build-a-multibranch-pipeline-project/">Pipeline Multibranch</a> Plugin is provided by Jenkins to receive notifications of pull requests and new branches. Using the CICD information, it can also schedule an automatic build.</p><p>Also, the GitHub Auto status plugin is used to get the granular status. It only allows merging if every status check is passed. You can enable status checks in GitHub using the guide <a href="https://help.github.com/articles/enabling-required-status-checks/">provided here</a>.</p><h3>Running unit tests along with your pipeline</h3><p><strong>Importance</strong></p><p>Sometimes, our code contains the areas where the coverage is low. These areas are very sensitive and open to errors because of no attention. We can promote Unit testing using surfacing code coverage numbers for this red flag.</p><p><strong>How to achieve</strong></p><p>● Publish code coverage reports as part of the build-in Jenkins.</p><p>● Use the trend coverage chart provided by Jenkins.</p><p>● Observe if the coverage is dropping.</p><p>● You should aim for at least 90%-line coverage.</p><h3>Running CICD tests with the same environment and binaries as they will use in production</h3><p><strong>Importance</strong></p><p>There are cases when the code works in the development environment and not in the production. So, you must rule out this thing.</p><p><strong>How to achieve</strong></p><p>Make sure that the development environment can follow the same commands used to rest run during the Jenkins Pipeline. In this way, the developers will be able to test the changes locally and submit the pull requests.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c47d81fecf62" width="1" height="1" alt=""><hr><p><a href="https://blog.devops.dev/best-practices-for-building-a-ci-cd-pipeline-with-jenkins-c47d81fecf62">Best Practices For Building a CI/CD Pipeline with Jenkins</a> was originally published in <a href="https://blog.devops.dev/">DevOps.dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Blockchain, Smart Contracts, and Tokens Provide the Architecture for a New Form of Internet]]></title>
            <link>https://medium.com/coinmonks/how-blockchain-smart-contracts-and-tokens-provide-the-architecture-for-a-new-form-of-internet-f77f41f229f4?source=rss-213ea16b4456------2</link>
            <guid isPermaLink="false">https://medium.com/p/f77f41f229f4</guid>
            <category><![CDATA[token]]></category>
            <category><![CDATA[web3]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[defi]]></category>
            <category><![CDATA[blockchain]]></category>
            <dc:creator><![CDATA[Kayode Adeniyi]]></dc:creator>
            <pubDate>Tue, 14 Jun 2022 11:22:09 GMT</pubDate>
            <atom:updated>2022-06-17T21:30:12.808Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://en.wikipedia.org/wiki/Blockchain">Blockchain technology</a> has grown far beyond the scope of securing the Bitcoin network. While most of the focus remains on the use of the technology to facilitate payments, remittances or other types of online transactions, it could be an indicator for other concepts.</p><p>Instead of representing a means to transact on the internet, blockchain technology could represent the future of the internet. Combined with other technologies such as smart contracts, it could turn how the world perceives the internet on its head.</p><h4><strong>Web3 — A Blockchain-Based internet</strong></h4><p><a href="https://en.wikipedia.org/wiki/Web3">Web3</a> is a growing idea about the next generation of the internet. Its proponents state that Web1 was the first alliteration of the internet. It relied on web pages filled with content created by commercial companies.</p><p>Web2 was introduced with the arrival of social media, where users of the internet were no longer just observers but also creators of the content online. With web2, the masses could now benefit directly from the internet. However, it is still heavily reliant on commercial companies with huge resources, which has led to the centralization of the internet.</p><p>This highly centralized future has led to some unsavoury trends in recent times. Today, a few large corporations have the power to decide who can profit from the internet and who cannot. They also have the power to decide whose content is viewed by the masses. For many, this represents a dystopian Orwellian future.</p><p>Web3 is envisioned as an internet cut-off from Big Tech, where everyone has an equal voice. By eliminating the middleman, it will create a decentralized internet that is self-regulating in all aspects, including how content is created, and who can profit from it.</p><h4><strong>The Role of the Blockchain in Web3</strong></h4><p>Web3 is envisioned to revolve around blockchain technology, smart contracts, and crypto coins. The goal of Web3 is to create a single, decentralized layer where data can be managed across all systems without having to rely on mega-corporations that have their own interests, and are driven by the need to maintain profitability.</p><h4><strong>Governing a Decentralized Interne</strong>t</h4><p>For any organization to thrive, and grow, it has to be guided by a set of rules, which allows its users to understand how they can climb to the top. In the current state of the internet, Big Tech sets the rules on how things work.</p><p>With a decentralized internet, such centralized structures would be eliminated. Instead, governance would be via decentralized autonomous organizations (DAOs). A DAO enables the creation of a corporate structure that features the power of arbitration over several functions. For instance, they can be responsible for the accounts, division of shares, interaction mechanisms, and more. There is no limit on how complex or simplistic a DAO can be with enough time, expertise, and resources.</p><p>DAOs exist and are regulated via smart contracts. A smart contract is a self-executing code. Once all conditions are met, they execute the agreement contained in the code. Value and property can be authentically exchanged without having to rely on a notary register process to validate the transaction. In essence, it creates trustless trust, where the parties do not need to trust each other since the system is trustworthy. The use of code as law substitutes various organizational mechanisms, and in the future, it could substitute all of them.</p><h3>Possible Applications in the Decentralized Internet</h3><p><strong>1.Data Analysis</strong></p><p>Information decisions are only as good as the data on which they are based. By using the blockchain, it becomes possible to trust the validity of any data. Since its provenance can be proven via the blockchain, the quality of analysis results will be easier to validate.</p><p><strong>2. Content Creation</strong></p><p>For many years, content creators have grappled with who owns their work. To date, most online platforms still maintain that they have a right to use data uploaded to their platforms as they please. For a minor creator, protecting the copyright of their work via conventional methods is almost impossible.</p><p>The type of software and hardware needed to monitor the internet for copyright infringement and royalty tracking is simply impossible. Using the blockchain makes it easy to verify the authenticity of any content on the internet. It also makes it easy to track royalty payments without having to go through a third party. As a result, it eliminates the need for centralized organizations to track royalty payments.</p><p>It is impossible to fake any information when the internet is decentralized since it can immediately be recognized as fake, and penalties applied immediately.</p><p><strong>3. Gamification via Tokens</strong></p><p>Once Web3 becomes the default internet, many brands may begin to tokenize their reward systems with tokens that have real-world value. Current token systems mean that rewards are locked into certain programs. However, in a future Web3, tokens could be decentralized and used for various programs by different companies. Cross-brand tokens could essentially help to ensure that a lot of value, which is currently locked due to closed reward systems, is unlocked.</p><p><strong>4. Decentralized Storage</strong></p><p>One of the biggest challenges when it comes to a decentralized internet is how the information will be stored. It is part of the reason some may believe that a truly decentralized internet is not possible. However, there are already projects that demonstrate this is possible.</p><p>One such project working on this solution is the internet Computer (ICP) project. While the project is not the perfect solution, it lays out the basic framework for how decentralized storage could work in the future. Essentially, it would be an incentive-based system where users receive compensation for helping to provide storage and computing power for a decentralized internet.</p><h3>Summary</h3><p>In the future, blockchain technology adoption will mainly depend on the speed at which the masses will gain confidence in it. To most people, giving computers powers over functions such as property rights might be too difficult to accept. However, the masses will more likely accept some aspects, such as loan processing, which is already a feature of <a href="https://en.wikipedia.org/wiki/Decentralized_finance">decentralized finance</a> (DeFi).</p><blockquote>Join Coinmonks<a href="https://t.me/coincodecap"> Telegram Channel</a> and<a href="https://www.youtube.com/c/coinmonks/videos"> Youtube Channel</a> learn about crypto trading and investing</blockquote><h3>Also, Read</h3><ul><li><a href="https://medium.com/coinmonks/coindcx-review-8444db3621a2">CoinDCX Review</a> |<a href="https://coincodecap.com/crypto-margin-trading-exchanges"> Crypto Margin Trading Exchanges</a></li><li><a href="https://coincodecap.com/red-dog-casino-review">Red Dog Casino Review</a> |<a href="https://coincodecap.com/swyftx-review"> Swyftx Review</a> |<a href="https://coincodecap.com/coingate-review"> CoinGate Review</a></li><li><a href="https://coincodecap.com/bookmap-review-2021-best-trading-software">Bookmap Review</a> |<a href="https://coincodecap.com/crypto-exchange-usa"> 5 Best Crypto Exchanges in the USA</a></li><li><a href="https://coincodecap.com/ftx-futures-trading">How to trade Futures on FTX Exchange</a> |<a href="https://coincodecap.com/okex-vs-binance"> OKEx vs Binance</a></li><li><a href="https://coincodecap.com/coinloan-review">CoinLoan Review</a> |<a href="https://medium.com/coinmonks/youhodler-4-easy-ways-to-make-money-98969b9689f2"> YouHodler Review</a> |<a href="https://coincodecap.com/blockfi-review"> BlockFi Review</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f77f41f229f4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/coinmonks/how-blockchain-smart-contracts-and-tokens-provide-the-architecture-for-a-new-form-of-internet-f77f41f229f4">How Blockchain, Smart Contracts, and Tokens Provide the Architecture for a New Form of Internet</a> was originally published in <a href="https://medium.com/coinmonks">Coinmonks</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to deploy an Amazon EKS cluster using Terraform]]></title>
            <link>https://blog.devops.dev/how-to-deploy-an-amazon-eks-cluster-using-terraform-4661808d5466?source=rss-213ea16b4456------2</link>
            <guid isPermaLink="false">https://medium.com/p/4661808d5466</guid>
            <category><![CDATA[devops-training]]></category>
            <category><![CDATA[amazon-web-services]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Kayode Adeniyi]]></dc:creator>
            <pubDate>Thu, 09 Jun 2022 00:25:37 GMT</pubDate>
            <atom:updated>2022-06-23T07:21:37.241Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Cloud infrastructure requires continuous work to achieve scalability. Elastic Kubernetes Services are even application-specific but clusters require infrastructure. So, creating the clusters and scaling them manually is not the preferred way especially if you need to execute consistency and repeated processes. In this article, you will learn to deploy the Amazon EKS cluster using terraform.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*JDVe6RqEFcjGs2zq1fDDvQ.jpeg" /><figcaption>Amazon EKS Logo</figcaption></figure><h4><strong>What is Terraform?</strong></h4><p>Terraform is an open-source infrastructure as a code software tool created by HashiCorp. Users define and provide data center infrastructure using a declarative configuration language, HashiCorp Configuration Language, or optionally JSON. Several other configuration management tools have been developed, however, terraform is becoming popular among DevOps, Engineers, and Infrastructure professionals.</p><p>Terraform is an open-source IAC (Infrastructure as Code) software tool developed by the HashiCorp company. HashiCorp implements its own configuration language. Users can use this language or JSON to define and provide the infrastructure of their data center.</p><p>Instead of manual processes, Infrastructure as Code allows to provision and manage the infrastructure through code, hence is beneficial for the following major reasons.</p><blockquote>· Faster deployment</blockquote><blockquote>· Cost-efficient</blockquote><blockquote>· Scalable and Repeatable infrastructure</blockquote><p><em>Tip: Files containing Terraform code are often called configuration files.</em></p><h3><strong>Deploy an Amazon EKS cluster using Terraform</strong></h3><h4><strong>Prerequisites</strong></h4><p>Setup the following tools to have smooth implementation ahead.</p><p>● <a href="https://aws.amazon.com/">Amazon Web Services (AWS) account</a>.</p><p>● Credentials and programmatic access for the Identity and Access Management (IAM)</p><p>● Local AWS credentials. These are set up locally with AWS configuration.</p><p>● Virtual Private Cloud configured for EKS.</p><p>● <a href="https://code.visualstudio.com/">Code editor — for example, VS Code.</a></p><p>Now, we are set to start the deployment of the EKS cluster using Terraform. The whole process consists of the following main steps.</p><ol><li>Creating the main.tf file — Create EKS cluster</li><li>Creating the variables.tf file — Makes cluster repeatable in any environment</li><li>Creating an EKS environment Let’s break down the above steps and learn the underlying procedure.</li></ol><p>Let’s break down the above steps and learn the underlying procedure.<br>Creating the main.tf</p><p>Open a text editor and create a new directory and a new file main.tf inside the directory. After creating the file, create and using the following;<br>· AWS Terraform provider<br>· IAM role for EKS<br>· IAM role EKS policy<br>· EKS cluster and worker nodes</p><p>Step 1: Add the following code for AWS provider code in the main.tf file.</p><pre>terraform { required_providers { aws = { source = &quot;hashicorp/aws&quot; } } } </pre><p>Step 2: To give IAM role access to EKS, add the following code to as the first resource for this role.</p><pre>resource &quot;aws_iam_role&quot; &quot;eks-iam-role&quot; { <br>   name = &quot;devopsthehardway-eks-iam-role&quot; <br>   path = &quot;/&quot; <br>   assume_role_policy = &lt;&lt;EOF<br>{</pre><pre>&quot;Version&quot;: &quot;2012-10-17&quot;,<br>&quot;Statement&quot;: [<br> {<br> &quot;Effect&quot;: &quot;Allow&quot;,<br> &quot;Principal&quot;: {<br>    &quot;Service&quot;: &quot;eks.amazonaws.com&quot;<br> },<br> &quot;Action&quot;: &quot;sts:AssumeRole&quot;<br> }<br>]<br>}<br>EOF<br>}</pre><p>Step 3: Worker nodes run on the EC2 instance. You have to add the following two policies to access the EC2 instance.</p><p>· AmazonEKSClusterPolicy</p><p>· AmazonEC2ContainerRegistryReadOnly-EKS</p><pre>resource &quot;aws_iam_role_policy_attachment&quot; &quot;AmazonEKSClusterPolicy&quot; {<br>     policy_arn = &quot;arn:aws:iam::aws:policy/AmazonEKSClusterPolicy&quot;     role = aws_iam_role.eks-iam-role.name <br>} </pre><pre>resource &quot;aws_iam_role_policy_attachment&quot; &quot;AmazonEC2ContainerRegistryReadOnly-EKS&quot; { <br>     policy_arn = &quot;arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly&quot; role = aws_iam_role.eks-iam-role.name <br>}</pre><p>Step 4: After adding policies, add the following code to create the cluster.</p><pre>resource &quot;aws_eks_cluster&quot; &quot;devopsthehardway-eks&quot; { <br>    name = &quot;devopsthehardway-cluster&quot; <br>    role_arn = aws_iam_role.eks-iam-role.arn <br>    vpc_config {  <br>        subnet_ids = [var.subnet_id_1, var.subnet_id_2] <br>    } </pre><pre>    depends_on = [ aws_iam_role.eks-iam-role ] <br>}</pre><p>Step 5: Just like you created the IAM role for the cluster, set up an IAM role for the worker nodes. The only difference is that you need to add the following policies to the EKS worker node policies.</p><p>· AmazonEKSWorkerNodePolicy</p><p>· AmazonEKS_CNI_Policy</p><p>· EC2InstanceProfileForImageBuilderECRContainerBuilds</p><p>· AmazonEC2ContainerRegistryReadOnly</p><pre>resource &quot;aws_iam_role&quot; &quot;workernodes&quot; {  <br>    name = &quot;eks-node-group-example&quot;  <br>    assume_role_policy = jsonencode({  <br>        Statement = [{ <br>            Action = &quot;sts:AssumeRole&quot; <br>            Effect = &quot;Allow&quot; <br>            Principal = { <br>                Service = &quot;ec2.amazonaws.com&quot; <br>            }  <br>        }]  <br>        Version = &quot;2012-10-17&quot;  <br>    }) </pre><pre>} </pre><pre>resource &quot;aws_iam_role_policy_attachment&quot; &quot;AmazonEKSWorkerNodePolicy&quot; {  <br>    policy_arn = &quot;arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy&quot;                  role = aws_iam_role.workernodes.name <br>} </pre><pre>resource &quot;aws_iam_role_policy_attachment&quot; &quot;AmazonEKS_CNI_Policy&quot; {         policy_arn = &quot;arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy&quot;  role = aws_iam_role.workernodes.name </pre><pre>} </pre><pre>resource &quot;aws_iam_role_policy_attachment&quot; &quot;EC2InstanceProfileForImageBuilderECRContainerBuilds&quot; {  <br>policy_arn = &quot;arn:aws:iam::aws:policy/EC2InstanceProfileForImageBuilderECRContainerBuilds&quot;  <br>role = aws_iam_role.workernodes.name <br>} </pre><pre>resource &quot;aws_iam_role_policy_attachment&quot; &quot;AmazonEC2ContainerRegistryReadOnly&quot; {  <br>policy_arn = &quot;arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly&quot;  <br>role = aws_iam_role.workernodes.name <br>}</pre><p>Step 6: The last code in this part is for creating one worker node in the scaling_config file.</p><pre>resource &quot;aws_eks_node_group&quot; &quot;worker-node-group&quot; {  <br>    cluster_name = aws_eks_cluster.devopsthehardway-eks.name     node_group_name = &quot;devopsthehardway-workernodes&quot;  <br>node_role_arn = aws_iam_role.workernodes.arn  <br>subnet_ids = [var.subnet_id_1, var.subnet_id_2]  <br>instance_types = [&quot;t3.xlarge&quot;]  <br>scaling_config {  <br>    desired_size = 1  <br>    max_size = 1  <br>    min_size = 1  }  <br>    depends_on = [    aws_iam_role_policy_attachment.AmazonEKSWorkerNodePolicy,  aws_iam_role_policy_attachment.AmazonEKS_CNI_Policy,  #aws_iam_role_policy_attachment.AmazonEC2ContainerRegistryReadOnly,  ] <br>}  </pre><p><strong><em>Note: Use at least three worker nodes in the production environment.</em></strong></p><h4><strong>Creating the variables.tf file</strong></h4><p>To ensure that you can use the code in any EKS environment, create the variables.tf file, and add the following two variables (one can be a public subnet and the other can be a private subnet)</p><pre>variable &quot;subnet_id_1&quot; { <br>    type = string <br>    default = &quot;subnet-your_first_subnet_id&quot; <br>} </pre><pre>variable &quot;subnet_id_2&quot; { <br>    type = string <br>    default = &quot;subnet-your_second_subnet_id&quot; <br>}</pre><h4><strong>Creating the EKS environment</strong></h4><p>Navigate to the module via the terminal and run the following commands;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ggZCuI3FFiJ--5mS4-i6Ww.png" /></figure><p>After inspecting the AWS EKS in the console, destroy all resources by running the “terraform destroy” command in the terminal.</p><h3><strong>Additional resources:</strong></h3><p><strong>Terraform Variables: </strong><a href="https://spacelift.io/blog/how-to-use-terraform-variables">https://spacelift.io/blog/how-to-use-terraform-variables</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4661808d5466" width="1" height="1" alt=""><hr><p><a href="https://blog.devops.dev/how-to-deploy-an-amazon-eks-cluster-using-terraform-4661808d5466">How to deploy an Amazon EKS cluster using Terraform</a> was originally published in <a href="https://blog.devops.dev/">DevOps.dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>