<?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 jigar shah on Medium]]></title>
        <description><![CDATA[Stories by jigar shah on Medium]]></description>
        <link>https://medium.com/@jigarshah088?source=rss-9d5567af57e0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*HxspQ_nPrqCUor3S.jpg</url>
            <title>Stories by jigar shah on Medium</title>
            <link>https://medium.com/@jigarshah088?source=rss-9d5567af57e0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 15:00:51 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jigarshah088/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[Langchain: A Primer]]></title>
            <link>https://medium.com/@jigarshah088/langchain-a-primer-561f99e84756?source=rss-9d5567af57e0------2</link>
            <guid isPermaLink="false">https://medium.com/p/561f99e84756</guid>
            <dc:creator><![CDATA[jigar shah]]></dc:creator>
            <pubDate>Fri, 24 Jul 2026 10:36:16 GMT</pubDate>
            <atom:updated>2026-07-24T10:36:16.223Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hQ5ebEcifoN60lWCg7keSA.png" /></figure><p>We (as humans collectively) have done software for over 20 years now. There are a few established practices that are accepted as the norm. Large Language Models (or LLMs) provide a powerful new avenue to build the next generation of software (sometimes called Software 3.0). However, that does not mean we need to start from scratch. This post is meant to serve as a gentle introduction to LangChain and its components. But before we get there, we need to understand the need for LangChain in the first place.</p><p>I expect the reader to have some understanding of how LLM applications work. I will try and avoid jargon as much as possible. In brief,</p><p><em>&gt; you provide a prompt to a model, and it generates a response.</em></p><p>That’s the ground-level idea. Every word in the idea above can be tweaked and made more complex, but the core idea remains the same.</p><p>I really like this tweet from <a href="https://x.com/HamelHusain/status/1798757828100047063">Hamel Husain</a> that cuts through the overly technical jargon.</p><h3>What is [LLM] orchestration?</h3><p>From <a href="https://www.databricks.com/glossary/orchestration">Databricks</a>,</p><blockquote>Orchestration is the coordination and management of multiple computer systems, applications and/or services, stringing together multiple tasks in order to execute a larger workflow or process. These processes can consist of multiple tasks that are automated and can involve multiple systems.</blockquote><p>In simpler terms, an orchestration is like a conductor in an orchestra, with the orchestra being the various components of a system. In the context of LLMs, this becomes even more important because of a few reasons:</p><ul><li>All major LLM providers (private and open-source) do not provide a standardized interface to their models</li><li>Connecting to enterprise systems and databases in a secure and scalable manner is challenging with the non-deterministic nature of LLMs</li><li>Validating and evaluating the output of LLMs is not straightforward.</li></ul><p>For a better understanding, look at this image from <a href="https://a16z.com/emerging-architectures-for-llm-applications/">a16z</a>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*toVVpgUt6L-5gJIj" /></figure><p>Emerging LLM App Stack | Credit: a16z</p><p>It’s a lot! The key takeaway is that there are multiple components with an orchestration block in the middle that connects everything.</p><h3>But why can’t I write an orchestration engine myself?</h3><p>You absolutely can, and I recommend you do so for a toy project or a proof of concept. However, if your project needs to be reliable, scalable, and maintainable, then you need to provide parallelization, fallbacks, batch, stremaing, async, and more such concepts that Software 2.0 has perfected over the years.</p><p>This is where you add in tools such as <a href="https://www.langchain.com/">LangChain</a> or <a href="https://github.com/microsoft/semantic-kernel">Microsoft Semantic Kernel</a>.</p><h3>What is LangChain?</h3><p>Here, I’m going to give an overview of LangChain, primarily for 2 reasons:</p><ol><li>The industry is gradually converging on it as the standard for LLM orchestration. It averages 1M+ installs per month, while similar tools barely reach 100k+.</li><li>I’ve been using it since 2023 and have seen it evolve from a simple wrapper to a full-fledged toolkit — seriously, massive props to <a href="https://x.com/hwchase17">Harrison Chase</a> and the entire LangChain team.</li></ol><p>As I explained above, LangChain is a framework to manage the different components of an LLM application. The entire stack, as shown on their website is:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/978/0*Bzj12jbHRnvMZa9A" /></figure><p>LangChain Stack | Credit: LangChain</p><p>Again, it’s a lot, but the key takeaway is that the stack comprises interoperable and interconnected components:</p><ol><li>A core protocol: This is the backbone, called the <a href="https://python.langchain.com/v0.2/docs/concepts/#langchain-expression-language-lcel">LangChain Expression Language (LCEL)</a></li><li>Multiple integrations: These are connectors to different models, prompt templates, databases, etc.</li><li>Set of architectures: These are different ways to structure the application, such as a single chain, multiple chains, single agent, etc.</li></ol><p>In addition, LangChain also consists of 2 highly desirable add-ons, which I’m not going to cover in detail here:</p><ol><li><a href="https://www.langchain.com/langsmith">LangSmith</a>: A all-in-one observability platform — think of it as a magnifying glass to see what’s happening inside your application.</li><li><a href="https://python.langchain.com/v0.2/docs/langserve/">LangServe</a>: A one-click deployment engine that turns LangChain applications into a RESTful API.</li></ol><h3>What is LCEL?</h3><p>In one line, LCEL is a way to declaratively combine LangChain components to create “chains”. For example,</p><pre>lcel_chain = prompt_template | openai_model | str_output_parser</pre><p>This one line of chain will take a user input, pass it to the OpenAI model, and then parse the output into a string. This is a very simple example, but you can imagine how complex these chains can get. The chain can be used to stream tokens as they are generated, which means that your users can see the output in real-time, reducing the time-to-first-token.</p><h3>The 3 methods in LangChain</h3><p>Based on their website, LangChain has 3 main architectures to build applications that work across the stack: Retrieval, Agents, and Evaluation.</p><h3>Retrieval</h3><h3>1. What is RAG?</h3><p>I’m sure you’ve heard of the term “RAG” or “retrieval-augmented generation” thrown around multiple times. In a non-technical language, it is a way to add context to the prompt you provide to the model so that it generates a more relevant response. This context can be taken from a document, a website, or any other source of information.</p><p>Now, how does the model know which document to look at, and specifically which part of the document to look at? This is where we enter into the realm of embeddings, vectorstores, similarity scores, and more such concepts, which I’ll cover in a later post.</p><p>Let me explain it with a diagram:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5LmPpl9Qc4pzmMO_" /></figure><p>R-A-G concept</p><p>The process is broken down into 4 steps:</p><ol><li>Ingestion: This is where all the relevant documents are ingested into the system by chunking them, converting them into embeddings and storing them in a vectorstore. Note that the documents can either be provided or dynamically fetched, depending on the use case.</li><li>Retrieval: Now, when a user provides a prompt, it passes through the retrieval component, which fetches the most relevant document from the vectorstore. At this point, the retrieval component can also fetch multiple documents and rank them based on relevance, or do more complex operations.</li><li>Augmentation: The retrieved context is then passed into the augmentation component, which combines the prompt and the context to create a new prompt. This new prompt is then passed to the model.</li><li>Generation: Finally, the model generates a response based on the new prompt.</li></ol><p>That’s all there is to RAG. As before, all the 4 steps above can be tweaked and made more complex, leading to more powerful applications.</p><h3>2. RAG in LangChain</h3><p>LangChain offers an extensive library of tools and an intuitive framework to compose the components of a RAG system, mostly contributed by the community. Let’s look at the same example from before, but using the stack:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wTB3NmPN6ZfpVehO" /></figure><p>RAG with LangChain</p><p>Notice how the core idea is the same: I’m still ingesting and retrieving documents, augmenting the prompt, and generating a response. The difference is that now I’m using:</p><ul><li><a href="https://qdrant.tech/">Qdrant</a> as a vectorstore to ingest and store the embedded documents. Read more <a href="https://python.langchain.com/v0.2/docs/integrations/vectorstores/qdrant/">here</a></li><li><a href="https://python.langchain.com/v0.2/docs/concepts/#runnable-interface">LCEL Runnables</a> to write in LCEL the retrieval, augmentation, and generation components</li><li><a href="https://python.langchain.com/v0.2/docs/integrations/chat/openai/#model-features">OpenAI Models</a> to connect to an external embedding and language model.</li></ul><p>The benefit I want to highlight is that everything is connected through LCEL, which means that I can swap out any component with another one that adheres to the LCEL protocol, be it a different vectorstore, different model, different prompt template, different retrieval strategy, different document sources, etc. Having an extensible and interoperable stack unlocks a lot of possibilities.</p><h3>Agents</h3><p>So now we’ve made an application that can augment prompts with information from documents. But what if we want to provide this application with reasoning or planning capabilities, or give it the ability to call external functions like getting the weather or sending an email? This is where Agents come in.</p><p>From the LangChain docs:</p><blockquote><em>Agents are systems that use LLMs as reasoning engines to determine which actions to take and the inputs to pass them. After executing actions, the results can be fed back into the LLM to determine whether more actions are needed, or whether it is okay to finish.</em></blockquote><p>Essentially, agents are chains wrapped with conditional statements and for/while loops:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/0*GxMyTRhgCbRdhbLA" /></figure><p>I’m sure you’ve seen this!</p><p>While the above isn’t exactly true, it does have a grain of truth in it. The good news is that we already have an understanding of how we can create the “THEN” blocks. What’s left is to understand how we can create the “IF” and “END” blocks.</p><h3>Agents in LangChain</h3><p>LangChain provides the functionality to build agents through <a href="https://langchain-ai.github.io/langgraph/">LangGraph</a>. At the risk of sounding like a broken record, LangGraph is a way to declaratively combine LangChain components and other functions to create “graphs”. It achieves this by providing nodes and edges that can be connected and have a common, shared state.</p><p>A key point of difference is that LangGraph is not a <a href="https://en.wikipedia.org/wiki/Directed_acyclic_graph">Directed Acyclic Graph (DAG)</a>, meaning that you can have loops in your graph.</p><p>Let’s look at an example application made with LangGraph:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*OsDFX3Bs4lyD6h-s" /></figure><p>LangGtaph</p><p>I’ll spare the technical details, which you can understand from this tutorial <a href="https://langchain-ai.github.io/langgraph/tutorials/introduction/">here</a>. Here are the key takeaways:</p><ul><li>The nodes are represented in blue. There’s 3 nodes here: <em>Chatbot</em>, <em>Tool</em>, and <em>END.</em></li><li>Chatbot is the LLM model that is responsible for converting the user input into a next step</li><li>Tool is an external function that can be called by the chatbot. In this example, it’s a Wikipedia search function</li><li>END denotes the end of the graph</li><li>The “normal” edges are represented in black. There’s only 1 edge of this type, which connects the Tool to the Chatbot, meaning that whenever the Tool executes, all output is sent to the Chatbot</li><li>The “conditional” edges are represented in purple. A conditional edge allows the agent to take different paths based on the output of the previous node. In this example, the Chatbot can either go to the Tool or the END node based on the user input and the agent’s reasoning.</li><li>The state represents the information that every node in the graph has access to. It also defines how each node can modify the state. In this example, the state contains a list of messages, and each node can only append to this list.</li><li>Finally, we provide memory to the agent through a database that stores the state of the graph after every step. Another key feature here is that the memory is controlled using threads, which means that the agent can run separate threads for separate users.</li></ul><p>I think LangGraph is extremely powerful, although a bit complicated for me to understand conditional edges and state management. I’ll keep exploring this and provide more insights in a future post.</p><h3>Evaluation</h3><p>All of what I’ve described above is actually pretty useless if you don’t know how well your application is performing. Moreover, LLMs are inherently non-deterministic, meaning that the same input will not always produce the same output. By application performance, I mean each and every component of the application, from the prompt templates to the retrieval strategies to the agent behavior.</p><p>Having a proper evaluation framework, such as <a href="https://docs.ragas.io/en/stable/concepts/metrics_driven.html">Metrics-Driven Development</a>, is the cornerstone of building reliable and scalable applications. This can be as simple as measuring the effectiveness of different prompts, or become more complex by measuring the impact of different retrieval strategies on the model’s performance, latency, throughput, etc.</p><h3>Evaluation with LangSmith</h3><p><a href="https://www.langchain.com/langsmith">LangSmith</a> is a one-stop observability platform to develop, collaborate, test, and monitor LLM applications. What’s super cool about LangSmith is that it integrates with all LangChain components off-the-shelf, and can even be configured to work with non-LangChain components.</p><p>I won’t go into the details of LangSmith here as I’m still learning it, but I will link this great <a href="https://www.youtube.com/watch?v=vygFgCNR7WA&amp;list=PLfaIDFEXuae0um8Fj0V4dHG37fGFU8Q5S">tutorial series by Lance Martin on how to use LangSmith</a>.</p><h3>Conclusion</h3><p>I hope this post has given you a good overview of LangChain and its components. I’ve tried to keep it as non-technical as possible! Many thanks to the folks over at <a href="https://www.linkedin.com/company/ai-maker-space/">AI Makerspace</a> for providing a great refresher through their AI Engineering Bootcamp! I’ll be writing more posts on how to use all these components to create powerful applications, so stay tuned!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=561f99e84756" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Overview of LLMs
LLM Agent]]></title>
            <link>https://medium.com/@jigarshah088/overview-of-llms-llm-agent-9819a212d9f8?source=rss-9d5567af57e0------2</link>
            <guid isPermaLink="false">https://medium.com/p/9819a212d9f8</guid>
            <dc:creator><![CDATA[jigar shah]]></dc:creator>
            <pubDate>Sun, 01 Mar 2026 03:11:04 GMT</pubDate>
            <atom:updated>2026-03-01T03:11:04.927Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Overview of LLMs<br>LLM Agent</strong></p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*Yea0m33uAzeePSjt.jpeg" /></figure><p>Fig. 1. Overview of a LLM-powered autonomous agent system. (Image source: Weng, Lilian. 2023)</p><p>LLM Agent like as a smart assistant. It’s not just a chatbot that responds to questions. It’s more like a digital helper that can take actions, make decisions, and use various tools to accomplish tasks. Just like a human might use a calculator for math or search the internet for information, an agent can use digital tools to enhance its capabilities.</p><p><strong>The Role of LLMs in Agents</strong></p><p><strong>Enhancing Reasoning and Acting</strong></p><p>LLMs can be thought of as the “brain” of an agent. They are responsible for understanding the task at hand, thinking through the problem, and deciding what actions to take. This process is often referred to as the ReAct approach, combining reasoning and acting.</p><p><strong>Using Tools</strong></p><p>Just like you might use a calculator for complex math, agents can use digital tools to perform tasks they aren’t inherently good at, such as precise calculations or looking up specific information online.</p><p><strong>LLM Components</strong></p><p><strong>Agent core</strong></p><p>The agent core is the central coordination module that manages the core logic and behavioral characteristics of an Agent. Think of it as the “key decision making module” of the agent. It is also where we define:</p><p>General goals of the agent: Contains overall goals and objectives for the agent.</p><p><strong>Tools for execution:</strong> Essentially a short list or a “user manual” for all the tools to which the agent has access</p><p>Explanation for how to make use of different planning modules: Details about the utility of different planning modules and which to use in what situation.</p><p><strong>Relevant Memory:</strong> This is a dynamic section which fills the most relevant memory items from past conversations with the user at inference time. The “relevance” is determined using the question user asks.</p><p><strong>Persona of the Agent (optional):</strong> This persona description is typically used to either bias the model to prefer using certain types of tools or to imbue typical idiosyncrasies in the agent’s final response.</p><p>The Agent core has access to Goals, Tools, planning helpers and a general format for the answer.</p><p><strong>Memory module</strong></p><p>Memory modules play a critical role in AI agents. A memory module can essentially be thought of as a store of the agent’s internal logs as well as interactions with a user.</p><p>There are two types of memory modules:</p><p><strong>Short-term memory</strong>: A ledger of actions and thoughts that an agent goes through to attempt to answer a single question from a user: the agent’s “train of thought.”</p><p><strong>Long-term memory</strong>: A ledger of actions and thoughts about events that happen between the user and agent. It is a log book that contains a conversation history stretching across weeks or months.</p><p>Memory requires more than semantic similarity-based retrieval. Typically, a composite score is made up of semantic similarity, importance, recency, and other application-specific metrics. It is used for retrieving specific information.</p><p><strong>Tools</strong></p><p>Tools are well-defined executable workflows that agents can use to execute tasks. Oftentimes, they can be thought of as specialized third-party APIs.</p><p>For instance, agents can use a RAG pipeline to generate context aware answers, a code interpreter to solve complex programmatically tasks, an API to search information over the internet, or even any simple API service like a weather API or an API for an Instant messaging application.</p><p><strong>Planning module</strong></p><p>Complex problems, such as analyzing a set of financial reports to answer a layered business question, often require nuanced approaches. With an LLM–powered agent, this complexity can be dealt with by using a combination of two techniques:</p><p><strong>Steps involved to develop own LLM agent</strong></p><p>1. A base LLM</p><p>2. A tool that you will be interacting with (e.g., Google Custom Search Engine, Calculator)</p><p>3. An agent to control the interaction</p><p>Llama Index is a powerful framework for building LLM agents that connect custom data sources to large language models.</p><p>Evaluating LLM agents based on context relevance, groundedness, and answer relevance helps maintain the quality of responses.</p><p>TrueLens provides an open-source library for tracking and evaluating LLM experiments, offering valuable insights for improving agent performance.</p><p><strong>Benefits of an Agent-Based Approach</strong></p><p>Freedom and Efficiency — Agents operate autonomously, reducing the need for constant human intervention and thereby freeing humans for other activities.</p><p>Flexibility — Agents can be adapted to various needs based on prompts.</p><p>Specialization — Prompting and training allows for deep expertise in domains. This is especially advantageous in disciplines that require a thorough understanding, like healthcare.</p><p>Solving Complex Problems — Agents can succeed where it’s harder for humans. They can efficiently and quickly solve complex problems that require intense calculations, multiple disciplines or thorough research.</p><p>Innovation and Progress — LLM Agents provide ideas and information that can drive technology and development forward.</p><p><strong>Multi-Agent LLMs</strong></p><p>Multi-agent LLM systems are frameworks where multiple LLM agents interact with each other or work in collaboration to achieve complex tasks or goals. This extends the capabilities of individual LLM Agents by leveraging their collective strengths and specialized expertise of multiple models. By communicating, collaborating, sharing information and insights and allocating tasks, multi-agent LLM systems can solve problems more effectively than a single agent can, flexibly and at scale.</p><p><strong>LLM Agents Use Cases</strong></p><p>Customer Service and Support — Providing customer support, handling inquiries, resolving issues, and offering information 24/7.</p><p>Content Creation and Copywriting — Generating creative content, such as articles, blogs, scripts, and advertising copy.</p><p>Semantic search agent -Semantic search is based on meaning, distinguished from lexical search which focuses on the exact words used.</p><p>Language Translation and Localization — Translation services for various content types, aiding in bridging language barriers and localizing content for different regions.</p><p>Education and Tutoring — Functioning as personalized tutors, providing explanations, answering questions, and assisting with learning materials in a wide range of subjects.</p><p>Programming and Code Generation — Writing, reviewing, and debugging code, thereby speeding up the development process and helping in learning programming languages.</p><p>Research and Data Analysis — Sifting through large volumes of text, summarizing information, and extracting relevant data, which is invaluable for research and analysis.</p><p>Healthcare Assistance — Offering support in areas like patient interaction, medical documentation, and even as assistive tools for diagnosis and treatment planning, though they don’t replace professional medical advice.</p><p>Personal Assistants — Managing schedules, setting reminders, answering questions, and even helping with email management and other administrative tasks.</p><p>Legal and Compliance Assistance — Assisting in legal research, document review, and drafting legal documents (without replacing professional legal advice).</p><p>Accessibility Tools — Enhancing accessibility through tools like voice-to-text conversion, reading assistance, and simplifying complex text.</p><p>Interactive Entertainment — In gaming and interactive storytelling, creating dynamic narratives, character dialogue, and responsive storytelling elements.</p><p>Marketing and Customer Insights — Analyzing customer feedback, conducting sentiment analysis, and generating marketing content, providing valuable insights into consumer behavior.</p><p>Social Media Management — Managing social media content, from generating posts to analyzing trends and engaging with audiences.</p><p>Human Resources Management — Aiding in resume screening, answering employee queries, and even in training and development activities.</p><p><strong>Challenges</strong></p><p>Limited context capacity<strong>:</strong> LLMs are constrained by finite context lengths, limiting their ability to incorporate historical data and complex instructions. This constraint hampers performance, particularly in tasks requiring a deep contextual understanding. To address this challenge, efforts should focus on expanding the context window, allowing LLMs to grasp more historical information and detailed instructions.</p><p>Long-term planning<strong>:</strong> Unlike humans who can adjust plans in response to unexpected circumstances, LLMs find it difficult to deviate from predefined paths. To mitigate this challenge, mechanisms must be developed that enable agents to adapt their plans when confronted with unexpected errors. Agents should possess the capacity to handle deviations and adjust their strategies to attain desired outcomes.</p><p>Natural language Interface<strong>:</strong> LLMs heavily rely on natural language interfaces for communication with external components, like memory and tools. However, the reliability of model outputs can be uncertain. LLMs may produce unreliable results, encounter formatting issues, or even display rebellious behavior by refusing instructions. Ensuring the reliability and accuracy of these interfaces is crucial for optimal agent performance. This requires refining the natural language generation capabilities of LLMs to produce more accurate and contextually relevant responses.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9819a212d9f8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DevOps with SQL]]></title>
            <link>https://medium.com/@jigarshah088/devops-with-sql-203ddfdf1220?source=rss-9d5567af57e0------2</link>
            <guid isPermaLink="false">https://medium.com/p/203ddfdf1220</guid>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[jigar shah]]></dc:creator>
            <pubDate>Wed, 14 Aug 2024 19:44:54 GMT</pubDate>
            <atom:updated>2024-08-14T19:44:54.923Z</atom:updated>
            <content:encoded><![CDATA[<p>What is SQL and what relevance does it have in relation to a DevOps Engineer ?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/539/1*Wn3jq0iSEleeRpg92QOZcQ.png" /></figure><h3>Introduction:</h3><p>In today’s digital landscape, where data plays a critical role in decision-making and software systems are becoming increasingly complex, DevOps engineers need to possess a diverse set of skills. One such skill that holds great relevance is SQL (Structured Query Language). SQL is a powerful language used for managing and manipulating relational databases. In this blog post, we will explore what SQL is, its key elements and components, and its essential relevance to being a DevOps engineer.</p><h3>What is SQL?</h3><p>SQL, short for Structured Query Language, is a standardized programming language designed for managing relational databases. It provides a set of commands and syntax for interacting with databases, querying data, defining database structures, and performing various operations such as insertion, deletion, and modification of data. SQL is the de facto language for working with popular database management systems (DBMS) such as SQLite, MySQL, Microsoft SQL Server, PostgreSQL, and others.</p><h3>Key Elements of SQL:</h3><p>To gain a comprehensive understanding of SQL, let’s explore its key elements:</p><ol><li><strong>Data Definition Language (DDL):</strong> DDL statements are used to define the structure of a database, including creating and altering database objects such as tables, views, indexes, and constraints. Some commonly used DDL statements are <strong>CREATE, ALTER,</strong> and <strong>DROP</strong>.</li><li><strong>Data Manipulation Language (DML):</strong> DML statements enable the manipulation and retrieval of data within a database. Common DML statements include <strong>SELECT, INSERT, UPDATE</strong>, and <strong>DELETE</strong>. These statements allow you to query data, insert new records, update existing data, and delete records.</li><li><strong>Data Control Language (DCL):</strong> DCL statements are responsible for managing access and permissions within a database. They include commands such as <strong>GRANT </strong>and <strong>REVOKE</strong>, which control user privileges and security settings.</li><li><strong>Data Query Language (DQL):</strong> DQL statements are used for querying and retrieving data from a database. The most commonly used DQL statement is <strong>SELECT</strong>, which allows you to retrieve specific data based on conditions and filters.</li></ol><h3>Relevance of SQL in DevOps:</h3><p>As a DevOps engineer, you may wonder how on earth SQL fits into your day to day role. Here are some reasons why SQL is relevant in DevOps:</p><ol><li><strong>Database Administration:</strong> DevOps engineers often work with databases as part of their responsibilities. SQL skills allow you to perform administrative tasks such as creating, configuring, and maintaining databases, managing user permissions, and optimizing database performance.</li><li><strong>Data Analysis and Reporting:</strong> In a DevOps environment, understanding and analyzing data is crucial for making informed decisions and identifying patterns or bottlenecks. SQL enables you to extract, transform, and analyze data from databases, providing valuable insights for monitoring and improving software systems.</li><li><strong>Database Integration and Migration:</strong> As part of your DevOps journey, you might encounter scenarios where you need to integrate new software components with existing databases or migrate data from one database to another. SQL expertise enables you to write complex queries and scripts for seamless integration and data migration tasks.</li><li><strong>Infrastructure as Code (IaC):</strong> In modern DevOps practices, infrastructure is often managed as code using tools like Terraform or AWS CloudFormation. SQL can be used within these infrastructure provisioning scripts to set up databases, schemas, and initial data, making it easier to version and manage the entire infrastructure stack.</li></ol><p>It’s important to note that there are multiple types of SQL available, including SQLite, MySQL, Microsoft SQL Server, PostgreSQL, and others. These variations differ in terms of their features, syntax, and supported platforms. For example:</p><ul><li><strong>SQLite:</strong> A lightweight, serverless, file-based database engine suitable for small-scale applications and testing purposes.</li><li><strong>MySQL:</strong> A widely used open-source relational database management system known for its speed, scalability, and ease of use.</li><li><strong>Microsoft SQL Server:</strong> A robust and feature-rich database management system designed for enterprise applications running on Windows platforms.</li><li><strong>PostgreSQL:</strong> An advanced open-source database system known for its extensibility, SQL compliance, and support for complex data structures.</li></ul><p>Other cloud providers such as <strong>AWS, Azure, Google Cloud, and DigitalOcean</strong> offer their own managed database services with SQL compatibility. These services provide additional features, scalability, and ease of management for cloud-based applications.</p><p>To get started with SQL, here are some free resources:</p><ol><li><strong>W3Schools SQL Tutorial:</strong> A comprehensive online tutorial that covers SQL fundamentals, queries, joins, and more. Visit: <a href="https://www.w3schools.com/sql/">W3Schools SQL Tutorial</a>.</li><li><strong>SQLZoo:</strong> An interactive platform that offers SQL exercises and quizzes for beginners to advanced learners. Visit: <a href="https://sqlzoo.net/">SQLZoo</a></li><li><strong>PostgreSQL Tutorial by PostgreSQL.org:</strong> A comprehensive tutorial specifically focused on PostgreSQL, covering installation, basic SQL queries, and advanced concepts. Visit: <a href="https://www.postgresql.org/docs/tutorial/">PostgreSQL Tutorial</a></li></ol><p>Remember, practice and hands-on experience are key to mastering SQL. So, dive into the world of SQL, explore its capabilities, and leverage it to unlock your potential as a DevOps engineer.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=203ddfdf1220" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Evolution and Future Landscape of DevOps: 2024 and Beyond]]></title>
            <link>https://medium.com/@jigarshah088/the-evolution-and-future-landscape-of-devops-2024-and-beyond-a80069fd0955?source=rss-9d5567af57e0------2</link>
            <guid isPermaLink="false">https://medium.com/p/a80069fd0955</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[jigar shah]]></dc:creator>
            <pubDate>Sat, 20 Jul 2024 05:48:47 GMT</pubDate>
            <atom:updated>2024-07-20T05:48:47.506Z</atom:updated>
            <content:encoded><![CDATA[<p>As we step into 2024, the landscape of DevOps continues to evolve at a rapid pace. The past few years have seen significant advancements in technology, methodologies, and practices that have reshaped how organizations approach software development and operations. In this edition of DevOps Matrix, we will explore the key trends and innovations that are set to define the future of DevOps, offering insights into what lies ahead for professionals in this dynamic field.</p><p>1. AI and Machine Learning Integration</p><p>Artificial Intelligence (AI) and Machine Learning (ML) are poised to become integral components of the DevOps toolkit. By leveraging AI and ML, DevOps teams can achieve unprecedented levels of automation, efficiency, and predictive capabilities. These technologies can analyze vast amounts of data to identify patterns, optimize workflows, and predict potential issues before they arise.</p><p>For instance, AI-driven anomaly detection can monitor application performance and automatically alert teams to irregularities, reducing downtime and improving reliability. ML algorithms can optimize CI/CD pipelines by identifying bottlenecks and suggesting improvements, ensuring faster and more efficient software delivery.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/969/0*W_sCSTY4k9cgRY1Z" /></figure><p>2. GitOps: The Future of Continuous Delivery</p><p>GitOps is rapidly gaining traction as a paradigm that brings the principles of Git version control to infrastructure automation. By treating infrastructure as code and using Git repositories as the single source of truth, GitOps enhances collaboration, transparency, and traceability.</p><p>In 2024 and beyond, we can expect GitOps to become the standard for continuous delivery, enabling teams to manage complex deployments with ease. The use of declarative configurations stored in Git repositories ensures that the desired state of the infrastructure is always maintained, reducing configuration drift and enhancing system stability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NHBgRG9wgxBm7oIe" /><figcaption>Image credit:TechTarget</figcaption></figure><p>3. Enhanced Security with DevSecOps</p><p>Security has always been a critical concern in software development, but the rise of DevSecOps emphasizes the integration of security practices directly into the DevOps workflow. In the coming years, we will see a stronger focus on embedding security checks and controls at every stage of the development lifecycle.</p><p>Automated security testing, vulnerability scanning, and compliance checks will become standard practices, ensuring that security is not an afterthought but a fundamental aspect of the development process. This shift will help organizations build more secure applications while maintaining agility and speed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/541/0*oeeUi3QHLMl5Alw8" /></figure><p>4. Serverless Computing and Microservices</p><p>Serverless computing and microservices architecture have revolutionized the way applications are built and deployed. These technologies offer greater scalability, flexibility, and cost-efficiency compared to traditional monolithic architectures.</p><p>As we move forward, serverless and microservices will continue to play a pivotal role in the DevOps ecosystem. The ability to deploy and manage individual functions and services independently allows for faster development cycles and easier maintenance. Additionally, advancements in orchestration tools like Kubernetes will further simplify the management of microservices at scale.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*iw9mpXAkyHES97Zx" /><figcaption>Monoliths vs Microservices vs Serverless (Image credit: Designgurus.com)</figcaption></figure><p>5. Edge Computing: Bringing DevOps Closer to the User</p><p>Edge computing is set to transform the DevOps landscape by bringing computation and data storage closer to the end-users. This shift reduces latency, improves performance, and enables real-time processing of data.</p><p>In the future, DevOps teams will need to adapt to this decentralized approach, managing deployments across a distributed network of edge devices. This will require new strategies and tools for monitoring, scaling, and securing applications at the edge, ensuring a seamless user experience.</p><p>6. Observability: Beyond Monitoring</p><p>Traditional monitoring is evolving into observability, a more comprehensive approach that provides deep insights into the internal state of systems. Observability goes beyond simply tracking metrics and logs; it involves understanding the context and relationships between different components of an application.</p><p>With the increasing complexity of modern applications, observability will be crucial for maintaining system reliability and performance. Tools that offer real-time visibility into distributed systems, tracing requests across services, and identifying root causes of issues will become essential for DevOps teams.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/959/0*9sHA6jcRTnjb1nUF" /></figure><p>7. Collaboration and Culture: The Human Side of DevOps</p><p>While technological advancements are critical, the human aspect of DevOps remains equally important. In the future, fostering a culture of collaboration, continuous learning, and shared responsibility will be key to the success of DevOps initiatives.</p><p>Organizations will focus on breaking down silos between development, operations, and security teams, promoting cross-functional collaboration. Investing in training and professional development will ensure that team members stay up-to-date with the latest tools and practices, driving innovation and efficiency.</p><p>Conclusion</p><p>The future of DevOps is bright and full of exciting possibilities. As AI and ML become more integrated, security practices are embedded, and new architectures like serverless and edge computing take center stage, DevOps will continue to transform the way we develop and deliver software. By staying ahead of these trends and embracing a culture of continuous improvement, DevOps professionals can navigate the challenges and opportunities that lie ahead, driving their organizations toward greater success in 2024 and beyond.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a80069fd0955" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding RabbitMQ: Essential Concepts and Effective Practices]]></title>
            <link>https://medium.com/@jigarshah088/understanding-rabbitmq-essential-concepts-and-effective-practices-0a7b1095a821?source=rss-9d5567af57e0------2</link>
            <guid isPermaLink="false">https://medium.com/p/0a7b1095a821</guid>
            <category><![CDATA[message-queue]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[jigar shah]]></dc:creator>
            <pubDate>Thu, 11 Jul 2024 07:05:50 GMT</pubDate>
            <atom:updated>2024-07-11T07:05:50.043Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>In contemporary applications, there is a pronounced shift towards microservices architecture. This architecture, characterized by numerous independent services, inherently generates extensive inter-service communication. As a result, the system architecture can become exceedingly complex.</p><p>Request/response-based communication models are not well-suited for such environments, as they typically require applications to await responses from other services. When a client triggers a service that is inherently time-consuming or computationally intensive, it can exacerbate the problem. This latency can significantly degrade the user experience, especially if the client is a front-end application, leading to an unresponsive user interface.</p><p>All these factors create a need for asynchronous communication between the microservices, and Message Based Systems can help. In such a system, a new component called an <em>intermediary </em>is introduced to facilitate communication between two applications/services instead of directly establishing communication between them. This middle component is known as <em>Message Broker</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/797/0*WwJpI9SkjHgFA0_x.png" /></figure><p>Message Brokers aid in decoupling applications as they are not directly interacting with each other. Each application only needs to adhere to the data format of this Message Broker, and it does not need to handle the nuances of interacting with different services. Therefore, it simplifies incorporating heterogeneous applications in the system.</p><p>Message Brokers provide the ability to que messages, allowing web servers to respond to requests quickly instead of being forced to perform resource-heavy procedures on the spot that may delay response time. Message queueing is also good when you want to distribute a message to multiple consumers or to balance loads between workers.</p><h3>RabbitMQ</h3><p>RabbitMQ is an extremely popular open-source Message Broker used for building message-based systems. Although RabbitMQ supports multiple protocols, the most commonly used is AMQP.</p><p>AMQP 0–9–1 (Advanced Message Queuing Protocol) is a messaging protocol that enables conforming client applications to communicate with conforming messaging middleware brokers. It’s an application layer protocol that transmits data in binary format. In this application, data is sent as frames.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/0*NgpxQmodCw8aOtCP.png" /></figure><h3>Key Concepts</h3><p>● <strong>Producer</strong>: Application that sends the messages.</p><p>● <strong>Consumer</strong>: Application that receives the messages.</p><p>● <strong>Queue</strong>: Stores messages that are consumed by applications</p><p>● <strong>Connection</strong>: A TCP connection between your application and the RabbitMQ broker.</p><p>● <strong>Channel</strong>: Lightweight connections that share a single TCP connection. Publishing or or consuming messages from a queue is done over a channel.</p><p>● <strong>Exchange</strong>: Receives messages from producers and pushes them to queues depending on rules defined by the exchange type. A queue must be bound to at least one exchange to receive messages.</p><p>● <strong>Binding</strong>: Bindings are rules that exchanges use (among other things) to route messages to queues.</p><p>● <strong>Routing key</strong>: A key that the exchange uses to decide how to route the message to queues. Think of the routing key as an address for the message.</p><p>● <strong>Users</strong>: It is possible to connect to RabbitMQ with a given username and password. Users can be assigned permissions such as rights to read, write, and configure privileges within the instance. Users can also be assigned permissions for specific virtual hosts.</p><p>● <strong>Vhost, virtual host</strong>: Virtual hosts provide logical grouping and separation of resources. Users can have different permissions to different vhost(s), and queues and exchanges can be created so they only exist in one vhost.</p><h3>Message Flow in RabbitMQ</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/469/0*orW9IoanpZs24ZRF.png" /></figure><ol><li>Producer publishes messages to exchange via a channel established between them at the time of application startup.</li><li>Exchange receives the message and finds appropriate bindings based on message attributes and exchange types.</li><li>Selected binding is then used to route messages to intended queues.</li><li>The message stays in the queue until handled by the consumer.</li><li>Consumers receive the messages using channels established usually at application startup.</li></ol><h3>Exchange Types</h3><p>Exchanges are entities that receive messages. Exchanges take a message and route it into zero or more queues. The routing algorithm used depends on the exchange type and rules called bindings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/0*v7UdRWtj7XHHDQ5u.png" /></figure><p>There are four types of exchanges.</p><p>● Direct (Default): The message is routed to the queues whose binding key matches the message’s routing key. It is primarily used for unicast routing of messages.</p><p>● Fanout: It routes messages to all the queues bound to it, and the routing key is ignored.</p><p>● Topic: The topic exchange does a wildcard match between the routing key and the routing pattern specified in the binding.</p><p>● Header: The header exchanges use the message header attributes for routing.</p><h3>Consumer Acknowledgements and Publisher Confirms</h3><p>Since messages sent over the network are not guaranteed to reach the destination, RabbitMQ provides a delivery and processing confirmation mechanism. Delivery processing confirmation from the consumer to the broker is known as consumer acknowledgment. Broker confirmation to publish that message is received is known as publisher confirms.</p><p>Both can be positive and negative. Positive acknowledgment from consumers means a message is successfully processed, and negative means failures in processing. The same thing applies in case the publisher confirms.</p><p>RabbitMQ supports the acknowledgment of multiple messages at once.</p><h3>Prefetching Messages</h3><p>Since message delivery and acknowledgment are both done asynchronously, there can be more than one message “in flight” on a channel at any moment. This means we have a sliding window of deliveries that are unacknowledged.</p><p>For most consumers, it makes sense to limit the size of this window to avoid the unbounded buffer (heap) growth problem on the consumer end. This is done by setting a “prefetch count” value. The value defines the maximum number of unacknowledged deliveries permitted on a channel. When the number reaches the configured count, RabbitMQ will stop delivering more messages on the channel until at least one of the outstanding ones is acknowledged. This can be used as a simple load-balancing technique or to improve throughput if messages tend to be published in batches. In general, increasing prefetch will improve the message delivery rate to consumers.</p><h3>Best Practices</h3><p>· Make sure your queue size remains small. Having a large queue puts a heavy load on RAM usage. To free up RAM, RabbitMQ flushes messages to disk, thereby adversely impacting the queuing speed and performance of the broker.</p><p>● Limit the queue size by either setting TTL for the message or the max length of the queue. It should be used in cases where consumers can bear message loss.</p><p>● Make sure to do message processing at the consumer end asynchronously if possible and immediately acknowledge back. This impacts the queue depth. If your application’s message processing time is high, you must go for asynchronous processing. In message-critical applications like the payments system, you should acknowledge only after message processing so unprocessed messages don’t go missing. The faster you acknowledge back, the higher the throughput.</p><p>● Reuse TCP connections and use channels to multiplex connection between threads. Ideally, each process should open a single connection and use multiple channels in that connection for different threads in your application.</p><p>● Limit the number of connections. Many connections will generate a lot of metrics which increases CPU consumption. If connections can’t be reduced, increase the statistics collection interval.</p><p>● Don’t open and close connections frequently. This may result in higher latency as multiple TCP packets will be sent and received. Connections should be long-lived.</p><p>● If your application can’t afford message loss, your queue should be declared durable, and messages should be sent with persistent delivery mode.</p><p>● If the producer and consumer lie within a single application, we should use separate connections for both to remain isolated from each other’s flow control.</p><p>● Prefetch limits should be set with caution. Too low a value can hurt queue performance, and too high a value will keep some consumers idle most of the time. A simple calculation to get an estimation would be to divide the total round trip time by the processing time for each message.</p><h3>Conclusion</h3><p>Developing a message-based application using RabbitMQ facilitates asynchronous communication between multiple confirming parties. It has a wide set of configuration controls that can be fine-tuned based on your requirements. Some common use cases for RabbitMQ are multiplayer games, group chats, and background processing of tasks. To provide monitoring capabilities, RabbitMQ comes with a Management UI plugin that helps track useful metrics and provides useful insights into the system.</p><p>Note that this blog only focuses on the basic concepts of RabbitMQ and the best practices you should use while developing an application. You can always refer to <a href="https://www.rabbitmq.com/tutorials/amqp-concepts.html">official documentation</a> for further details.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0a7b1095a821" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AKS Automation: The Future of Kubernetes Management]]></title>
            <link>https://medium.com/@jigarshah088/aks-automation-the-future-of-kubernetes-management-d071f71e72ab?source=rss-9d5567af57e0------2</link>
            <guid isPermaLink="false">https://medium.com/p/d071f71e72ab</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[azure-kubernetes-service]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[jigar shah]]></dc:creator>
            <pubDate>Sat, 29 Jun 2024 05:21:07 GMT</pubDate>
            <atom:updated>2024-06-29T05:41:26.530Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yw7nlupdq79Y0qtzjuR4dg.jpeg" /></figure><p>Azure Kubernetes Service (AKS) is a managed Kubernetes service designed for deploying and managing containerized applications. Recently, Microsoft introduced AKS Automatic at the Build conference. In this article, we’ll explore this new feature and put it to the test!</p><p>With AKS Automatic, Azure simplifies your cluster management by handling node administration, scaling, security, and applying preconfigured settings that adhere to AKS’s well-architected best practices.</p><p>Regardless of skill level, users can leverage AKS Automatic to enhance the security, performance, and reliability of their applications.</p><h3>Prerequisites:</h3><p>- This article requires version 2.57.0 or later of the Azure CLI. If you’re using Azure Cloud Shell, the latest version is already installed there .</p><p>- The identity creating the cluster should also have the following permissions on the subscription:Microsoft.Authorization/policyAssignments/write ; Microsoft.Authorization/policyAssignments/read.</p><ul><li>Make sure your subscription has quota for 24 vCPUs of the Standard_DS4_v2 virtual machine for the region you’re deploying the cluster to .</li></ul><h3>Prepare our environment</h3><ul><li>Run az version to find the version and dependent libraries that are installed. To upgrade to the latest version, run az upgrade.<br>- Login to your tennat and select the appropriate subscription ID in which the resources should be billed :</li></ul><pre>az login -t xxxxxxxxxxxxxxxxxxxxxxxxxxxx<br>az acouunt set -s xxxxxxxxxxxxxxxxxxxxxx</pre><ul><li>Install the aks-preview extension</li></ul><pre>az extension add --name aks-preview<br>az extension update --name aks-preview</pre><ul><li>Register the feature flags using the az feature register command.</li></ul><pre>az feature register --namespace Microsoft.ContainerService --name EnableAPIServerVnetIntegrationPreview<br>az feature register --namespace Microsoft.ContainerService --name NRGLockdownPreview<br>az feature register --namespace Microsoft.ContainerService --name SafeguardsPreview<br>az feature register --namespace Microsoft.ContainerService --name NodeAutoProvisioningPreview<br>az feature register --namespace Microsoft.ContainerService --name DisableSSHPreview<br>az feature register --namespace Microsoft.ContainerService --name AutomaticSKUPreview</pre><p>Refresh the registration of the Microsoft.ContainerService resource provider by using the az provider register command</p><pre>az provider register --namespace Microsoft.ContainerService</pre><pre>az provider register --namespace Microsoft.ContainerService</pre><h3>Deploy the aks cluster with AKS Automatic</h3><ul><li>Create a resource group:</li></ul><pre>az group create --name test-aks-automator --tag createdby=ssegni --location francecentral</pre><pre>{<br>  &quot;id&quot;: &quot;/subscriptions/xxxxxxxxxxxxxxxxxxxx/resourceGroups/test-aks-automator&quot;,<br>  &quot;location&quot;: &quot;francecentral&quot;,<br>  &quot;managedBy&quot;: null,<br>  &quot;name&quot;: &quot;test-aks-automator&quot;,<br>  &quot;properties&quot;: {<br>    &quot;provisioningState&quot;: &quot;Succeeded&quot;<br>  },<br>  &quot;tags&quot;: {<br>    &quot;createdby&quot;: &quot;ssegni&quot;<br>  },<br>  &quot;type&quot;: &quot;Microsoft.Resources/resourceGroups&quot;<br>}</pre><ul><li>Create AKS Automatic cluster :</li></ul><pre>az aks create --resource-group test-aks-automator --name myAKSAutomaticCluster --sku automatic</pre><pre>Argument &#39;--sku&#39; is in preview and under development. Reference and support levels: <a href="https://aka.ms/CLI_refstatus">https://aka.ms/CLI_refstatus</a><br>The behavior of this command has been altered by the following extension: aks-preview<br> \ Running ..</pre><p>After the build process is finished, we can see in the resource group that a list of resources has been created :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*d3y3Za_sMJLYlsrC.png" /></figure><p>When we create the AKS Automatic cluster we have some Pre-configured features(you can’t disable or change their settings) ,defautl features (can be modified) and Optional features are available for you to configure and are not enabled by default.</p><p>Below is a summary of the most important options :</p><ul><li>Managed Prometheus for metric collection , Managed Grafana for visualization and Container insights for log collection are a defautl features.<br>- AKS Automatic manages the node pools using <strong>Node Autoprovisioning</strong> come us a Pre-configured features .<br>- AKS Automatic creates nodes based on workload requests using<strong> Node Autoprovisioning</strong>.Horizontal Pod Autoscaler<strong> (HPA</strong>), Kubernetes Event Driven Autoscaling <strong>(KEDA)</strong>, and Vertical Pod Autoscaler <strong>(VPA)</strong> are enabled on the cluster.( Pre-configured features)<br>- Node operating system is <strong>Azure Linux</strong> (Pre-configured)<br>- Clusters are <strong>automatically upgrade</strong>d (Pre-configured)</li></ul><p>- <strong>Azure RBAC </strong>for Kubernetes authorization for managing cluster authentication and authorization using <strong>Azure role-based access</strong> control is also Pre-configured feature .</p><p>-Managed Virtual Network using <strong>Azure CNI</strong> Overlay powered by<strong> Cilium</strong> combines the robust control plane of Azure CNI with the data plane of Cilium to provide high-performance networking and security.<br>- Managed<strong> NGINX </strong>using the application routing add-on with integrations for Azure DNS and Azure Key Vault is also Pre-configured feature.<br>- Azure Service <strong>Mesh (Istio)</strong> ingress gateway is optional .</p><p>If you see the pods that have been created with the creation of the cluster, you can find pods related to these features:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*75ymEwvfRl9UcJUN.png" /></figure><p>We can determine some pods such as : keda , vpa , aks-secrets-store, cilium, azure-policy , ….</p><p><em>🙏</em><strong><em>thanks for reading </em></strong><em>🙏</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d071f71e72ab" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Preview of Network Observability add-on AKS]]></title>
            <link>https://medium.com/@jigarshah088/preview-of-network-observability-add-on-aks-a1a5606010bd?source=rss-9d5567af57e0------2</link>
            <guid isPermaLink="false">https://medium.com/p/a1a5606010bd</guid>
            <dc:creator><![CDATA[jigar shah]]></dc:creator>
            <pubDate>Thu, 27 Jun 2024 05:14:15 GMT</pubDate>
            <atom:updated>2024-06-27T05:20:49.462Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O0c44m1ElgKYBnxhrp1xTA.jpeg" /></figure><p>As containerized environments grow in complexity, pinpointing the root cause of networking issues within a Kubernetes cluster becomes an increasingly challenging task. Intermittent outages and performance bottlenecks are particularly frustrating, and achieving comprehensive visibility into the networking architecture can seem daunting. Many organizations grapple with these difficulties, often finding it hard to implement effective and practical solutions.</p><p>Microsoft Azure released the Azure Kubernetes Service (AKS) — Network Observability add-on to solve these concerns. This feature gives customers powerful tools for better understanding their container network traffic. This feature enables administrators and developers to effectively diagnose networking issues and optimize the performance of their containerized applications by providing real-time insights and extensive networking information.</p><h3>What is Network Observability for AKS</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GXZYz8hxqurBXkeW.png" /><figcaption>Figure 2 — Microsoft Docs</figcaption></figure><h3>Azure Managed Prometheus and Grafana</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/665/0*EJXw6jMjWc_UQopp.png" /><figcaption>Figure 3 — Microsoft Docs</figcaption></figure><p>Azure-managed Prometheus and Grafana ease monitoring and visualization setup and management. Azure Monitor manages Prometheus, which collects and saves metrics from different sources, including the network observability addon. Grafana, a renowned open-source data visualization platform, integrates smoothly with Azure Monitor. AKS and the network observability addon have pre-configured dashboards and templates. These dashboards allow users to monitor and analyze network parameters graphically.</p><h3>Visualizing network observability data</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_qjUvsmk5k7ATh_A.png" /><figcaption>Figure 4</figcaption></figure><p>Follow the <a href="https://azure.microsoft.com/en-us/blog/enhance-kubernetes-troubleshooting-with-network-observability-add-on-in-aks/">Azure documentation</a> to set up network observability with Azure-managed Prometheus and Grafana. They can use Grafana to examine <a href="https://grafana.com/grafana/dashboards/18814-kubernetes-networking/">predefined dashboards</a> or develop bespoke visualizations after configuration.</p><h3>Conclusion</h3><p>Network Observability allows centralized application and network health monitoring. Grafana visualizes Prometheus AKS Network Observability metrics. The data plane supports Cilium and non-Cilium.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a1a5606010bd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kubernetes Commands And Tricks For DevOps Tasks]]></title>
            <link>https://medium.com/@jigarshah088/kubernetes-commands-and-tricks-for-devops-tasks-a414b0bcbbfa?source=rss-9d5567af57e0------2</link>
            <guid isPermaLink="false">https://medium.com/p/a414b0bcbbfa</guid>
            <dc:creator><![CDATA[jigar shah]]></dc:creator>
            <pubDate>Fri, 21 Jun 2024 09:44:37 GMT</pubDate>
            <atom:updated>2024-06-21T09:44:37.447Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*AhThDqg8VVyNT1EH.png" /><figcaption>kubectl</figcaption></figure><p>This article will help in understanding most important and majorly used Kubernetes commands that would be required for a <strong>DevOps Engineer</strong>. By mastering these commands, you’ll be equipped to navigate and control Kubernetes clusters effortlessly.</p><p>Kubernetes transforms container orchestration, and kubectl is the main tool for managing Kubernetes clusters.</p><p>To run these commands, use a <strong>Kubernetes cluster</strong> or an <strong>online cluster</strong>, and ensure kubectl is installed.</p><blockquote><em>Let’s dive into the essential </em><em>kubectl commands:</em></blockquote><h3>Fetch kubectl version</h3><p>Check the client and server version of kubectl.</p><pre>kubectl version</pre><h3>Get Cluster details</h3><p>Gather important details about the Kubernetes cluster.</p><pre>kubectl cluster-info</pre><h3>Listing Available Kubernetes API Resources</h3><p>In Kubernetes, the api-resources command is used with kubectl to list all top-level API resources available on the cluster&#39;s API server.</p><pre>kubectl api-resources</pre><h3>Retrieving Kubernetes Contexts</h3><p>List all available contexts (clusters, users, and namespaces) in your kubeconfig file.</p><pre>kubectl config get-contexts</pre><h3>Switch Clusters</h3><p>Switch between different contexts/Clusters. This is useful for managing multiple Kubernetes environment.</p><pre>kubectl config use-context &lt;context_name&gt;</pre><h3>Switch/default Namespace Context</h3><p>The kubectl config set-context command in Kubernetes allows you to set or change a context in your Kubernetes configuration. A context defines which user, and namespace kubectl commands will use by default. This is useful for managing multiple Kubernetes namespace.</p><pre>kubectl config set-context --current --namespace &lt;NAMESPACE_NAME&gt;</pre><h3>kubectl apply</h3><p>Creates or updates Kubernetes resources to match the desired state defined in <strong>YAML</strong> configuration files.</p><pre>kubectl apply -f &lt;file_path&gt;</pre><h3>Create Resources Using Kubectl</h3><p>Create a new resources. For Example here creating namespace</p><pre>kubectl create namespace &lt;namespace_name&gt;</pre><h3><a href="https://kubernetes.io/docs/reference/kubectl/generated/kubectl_patch/">Patching Kubernetes Resources</a></h3><p>Modify the attributes of a resource by applying a strategic merge patch, a JSON merge patch, or a JSON patch. JSON and YAML formats are accepted.</p><p>Note: Strategic merge patch is not supported for custom resources.</p><pre>kubectl patch (-f FILENAME | TYPE NAME) [-p PATCH|--patch-file FILE]</pre><p>Example:</p><pre># Partially update a node using a strategic merge patch, specifying the patch as JSON<br>kubectl patch node k8s-node-1 -p &#39;{&quot;spec&quot;:{&quot;unschedulable&quot;:true}}&#39;</pre><pre># Partially update a node using a strategic merge patch, specifying the patch as YAML<br>kubectl patch node k8s-node-1 -p $&#39;spec:\n unschedulable: true&#39;</pre><pre># Partially update a node identified by the type and name specified in &quot;node.json&quot; using strategic merge patch<br>kubectl patch -f node.json -p &#39;{&quot;spec&quot;:{&quot;unschedulable&quot;:true}}&#39;</pre><pre># Update a container&#39;s image; spec.containers[*].name is required because it&#39;s a merge key<br>kubectl patch pod valid-pod -p &#39;{&quot;spec&quot;:{&quot;containers&quot;:[{&quot;name&quot;:&quot;kubernetes-serve-hostname&quot;,&quot;image&quot;:&quot;new image&quot;}]}}&#39;</pre><pre># Update a container&#39;s image using a JSON patch with positional arrays<br>kubectl patch pod valid-pod --type=&#39;json&#39; -p=&#39;[{&quot;op&quot;: &quot;replace&quot;, &quot;path&quot;: &quot;/spec/containers/0/image&quot;, &quot;value&quot;:&quot;new image&quot;}]&#39;</pre><pre># Update a deployment&#39;s replicas through the &#39;scale&#39; subresource using a merge patch<br>kubectl patch deployment nginx-deployment --subresource=&#39;scale&#39; --type=&#39;merge&#39; -p &#39;{&quot;spec&quot;:{&quot;replicas&quot;:2}}&#39;</pre><h3>List Any Resources</h3><p>List all using kubectl get current namespace.</p><pre>kubectl get deploy -n kube-system</pre><h3>Manage Deployment</h3><p>Manage rollouts and updates for Deployments.</p><p>Example (Check rollout status for a Deployment):</p><pre>kubectl rollout status deployment/&lt;deployment_name&gt;</pre><h3>Describe Pod</h3><p>Get detailed information about a specific pod.</p><pre>kubectl describe pod &lt;pod_name&gt; -n &lt;NAMESPACE&gt;</pre><h3>Stream logs</h3><p>Retrieve logs from a running container from pod.</p><pre>kubectl logs &lt;pod_name&gt; &lt;container_name&gt; -f</pre><h3>Execute command in pod</h3><p>Execute commands directly inside a container in a pod.</p><pre>kubectl exec -it &lt;pod_name&gt; -c &lt;container_name&gt; -- /bin/sh</pre><h3>Scale Replicas</h3><p>Scale the number of replicas for a Deployment, ReplicationController, or StatefulSet. Below Scaling a Deployment to 3 replicas</p><pre>kubectl scale deployment &lt;deployment_name&gt; --replicas=3</pre><h3>Exposing Kubernetes Resources</h3><p>Expose a Deployment, ReplicaSet, or Pod as a Service. Here Exposing a Deployment as a NodePort service</p><pre>kubectl expose deployment &lt;deployment_name&gt; --type=NodePort --port=&lt;port_number&gt;</pre><h3>Delete k8s Resources</h3><p>Delete a resource defined in a YAML file or directly by name. Delete a pod or any other resources</p><pre>kubectl delete pod &lt;pod_name&gt;</pre><h3><a href="https://kubernetes.io/docs/reference/kubectl/generated/kubectl_taint/">Setting Node Taints in Kubernetes</a></h3><p>Add a taint to a node to restrict the scheduling of certain pods unless they are able to tolerate the taint.</p><p>Example (Taint a node with a key=value taint):</p><pre>kubectl taint nodes &lt;node_name&gt; key=value:taint_effect</pre><h3><a href="https://kubernetes.io/docs/reference/kubectl/generated/kubectl_cordon/">Marking a Node as Unschedulable in Kubernetes</a></h3><p>Indicate the node as not available for scheduling.</p><pre>kubectl cordon NODE</pre><h3><a href="https://kubernetes.io/docs/reference/kubectl/generated/kubectl_uncordon/">kubectl uncordon</a></h3><p>Mark node as schedulable. Which was unschedulable using kubectl cordon</p><pre>kubectl uncordon NODE</pre><h3><a href="https://kubernetes.io/docs/reference/kubectl/generated/kubectl_drain/">Draining a Kubernetes Node</a></h3><pre># Drain node &quot;foo&quot;, even if there are pods not managed by a replication controller, replica set, job, daemon set, or stateful set on it<br>kubectl drain foo --force</pre><pre># As above, but abort if there are pods not managed by a replication controller, replica set, job, daemon set, or stateful set, and use a grace period of 15 minutes<br>kubectl drain foo --grace-period=900</pre><h3>Explain Resources</h3><p>G<em>et the documentation for pod manifests</em></p><pre>kubectl explain pods</pre><h3>List Events</h3><pre>kubectl get events --sort-by=.metadata.creationTimestamp</pre><h3>Comparing Resource Configurations</h3><p>Compares the current state of the cluster against the state that the cluster would be in if the manifest was applied.</p><pre>kubectl diff -f ./my-manifest.yaml</pre><h3>Set Configuring Resources</h3><p>Rolling update “www” containers of “frontend” deployment, updating the image</p><pre>kubectl set image deployment/frontend www=image:v2</pre><h3>Replacing Resources in Kubernetes</h3><p>Force replace, delete and then re-create the resource. <strong>Note</strong>: Will cause a service outage.</p><pre>kubectl replace --force -f ./pod.json</pre><h3>Manage Labels</h3><p>Modify labels by adding, removing, or overwriting them.</p><pre>kubectl label pods my-pod new-label=awesome                      # Add a Label<br>kubectl label pods my-pod new-label-                             # Remove a label<br>kubectl label pods my-pod new-label=new-value --overwrite        # Overwrite an existing value</pre><h3>Editing resources</h3><p>Edit any API resource in your preferred editor.</p><pre>kubectl edit svc/docker-registry                      # Edit the service named docker-registry<br>KUBE_EDITOR=&quot;nano&quot; kubectl edit svc/docker-registry   # Use an alternative editor</pre><h3>Debug Resources</h3><p>A debugging pod to troubleshoot an existing pod in Kubernete</p><pre>kubectl debug my-pod -it --image=busybox:1.28       # Create an interactive debugging session witin existing pod and immediately attach to it<br>kubectl debug node/my-node -it --image=busybox:1.28 # Create an interactive debugging session on a node and immediately attach to it</pre><h3>Running a Pod</h3><p>It’s a versatile command that can start a single instance of a container or a set of containers based.</p><pre>kubectl run -i --tty busybox --image=busybox:1.28 -- sh  # Run pod as interactive shell</pre><h3>Copying files/directories to and from containers</h3><p>Copy in a remote pod in the current namespace pod.</p><pre>kubectl cp /tmp/foo_dir my-pod:/tmp/bar_dir</pre><h3>Forwarding Ports to Kubernetes Pods</h3><p>This is useful for accessing cluster services locally without exposing them via a service or ingress. Here’s the syntax:</p><pre>kubectl port-forward &lt;pod-name&gt; &lt;local-port&gt;:&lt;pod-port&gt;</pre><h3>Viewing Resource Metrics in Kubernetes</h3><p>It provides an overview of resource consumption by nodes and/or pods within the cluster. Here’s a breakdown of its usage and syntax:</p><pre>kubectl top [node | pod | container | service] [NAME | -l label]</pre><h3>Formatting output</h3><p>To output details to your terminal window in a specific format, add the -o (or --output) flag to a supported kubectl command.</p><p>-o=custom-columns=&lt;spec&gt; : Print a table using a comma separated list of custom columns.</p><p>-o=custom-columns-file=&lt;filename&gt;: Print a table using the custom columns template in the &lt;filename&gt; file</p><p>-o=go-template=&lt;template&gt;: Print the fields defined in a <a href="https://pkg.go.dev/text/template">golang template</a></p><p>-o=go-template-file=&lt;filename&gt;: Print the fields defined by the <a href="https://pkg.go.dev/text/template">golang template</a> in the &lt;filename&gt; file</p><p>-o=json: Output a JSON formatted API object</p><p>-o=jsonpath=&lt;template&gt;: Print the fields defined in a <a href="https://kubernetes.io/docs/reference/kubectl/jsonpath">jsonpath</a> expression</p><p>-o=jsonpath-file=&lt;filename&gt;: Print the fields defined by the <a href="https://kubernetes.io/docs/reference/kubectl/jsonpath">jsonpath</a> expression in the &lt;filename&gt; file</p><p>-o=name: Print only the resource name and nothing else</p><p>-o=wide: Output in the plain-text format with any additional information, and for pods, the node name is included</p><p>-o=yaml: Output a YAML formatted API object</p><p>Examples using -o=custom-columns:</p><pre># All images running in a cluster<br>kubectl get pods -A -o=custom-columns=&#39;DATA:spec.containers[*].image&#39;<br># All images running in namespace: default, grouped by Pod<br>kubectl get pods --namespace default --output=custom-columns=&quot;NAME:.metadata.name,IMAGE:.spec.containers[*].image&quot;<br> # All images excluding &quot;registry.k8s.io/coredns:1.6.2&quot;<br>kubectl get pods -A -o=custom-columns=&#39;DATA:spec.containers[?(@.image!=&quot;registry.k8s.io/coredns:1.6.2&quot;)].image&#39;<br># All fields under metadata regardless of name<br>kubectl get pods -A -o=custom-columns=&#39;DATA:metadata.*&#39;</pre><h3>Kubectl output verbosity and debugging</h3><p>Kubectl verbosity is set using the -v or — v flags followed by an integer, indicating the log level. Kubernetes logging conventions and levels are detailed <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/logging.md">here</a>.</p><p>--v=0: Generally useful for this to <em>always</em> be visible to a cluster operator.</p><p>--v=1: A reasonable default log level if you don&#39;t want verbosity.</p><p>--v=2: Provides steady state information and key log messages for significant system changes. Recommended default log level.</p><p>--v=3: Extended information about changes.</p><p>--v=4: Debug level verbosity.</p><p>--v=5: Trace level verbosity.</p><p>--v=6: Display requested resources.</p><p>--v=7: Display HTTP request headers.</p><p>--v=8: Display HTTP request contents.</p><p>--v=9: Display HTTP request contents without truncation of contents.</p><p><strong><em>Linux Commands and tricks for DevOps tasks </em></strong><a href="https://vinodhakumara2681997.medium.com/top-linux-commands-and-tricks-for-devops-tasks-42cf93aa77e0"><strong><em>read more</em></strong></a><strong><em>.</em></strong></p><p><strong><em>Linux Commands for DevOps CheatSheet </em></strong><a href="https://vinodhakumara2681997.medium.com/cheatsheet-linux-commands-for-devops-80be32b88656"><strong><em>read more</em></strong></a></p><h3>Conclusion</h3><p>Mastering these key kubectl commands equips you to manage Kubernetes clusters efficiently, essential for seamless application deployment, scaling, and ensuring optimal performance. Explore Kubernetes documentation and practice in a test environment to build confidence in managing production clusters. Happy Kubernetting!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a414b0bcbbfa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Essential Kubernetes concepts explained in simple terms]]></title>
            <link>https://medium.com/@jigarshah088/essential-kubernetes-concepts-explained-in-simple-terms-27ecccee2b73?source=rss-9d5567af57e0------2</link>
            <guid isPermaLink="false">https://medium.com/p/27ecccee2b73</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[jigar shah]]></dc:creator>
            <pubDate>Sat, 01 Jun 2024 08:07:13 GMT</pubDate>
            <atom:updated>2024-06-01T08:18:52.120Z</atom:updated>
            <content:encoded><![CDATA[<p>Kubernetes has become a top choice for managing containerized applications, but it’s known for its steep learning curve.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*st212Uab7zA8pvUmy0ZU5w.jpeg" /></figure><p>This article aims to simplify the process by explaining 5 key Kubernetes concepts, making it easier for newcomers to grasp the essentials.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Z_S4YxPI0UU19van.png" /></figure><ul><li>1: Why do we need Container Orchestration?</li><li>2: What is Container Orchestration?</li><li>3: What is Kubernetes?</li><li>4: What are the most important Kubernetes concepts?</li><li>4.1: What is a Cluster?</li><li>4.2: Let’s Deploy a Microservice</li><li>4.3: What is a Pod?</li><li>4.4: What is a ReplicaSet?</li><li>4.5: What is a Deployment?</li><li>4.6: A Quick Review — Deployment vs Replica Set</li><li>4.7: What is a Service?</li><li>5: Next Steps</li></ul><h3>1: Why do we need Container Orchestration?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/854/0*rBlnrbIGcQAxSuGc.png" /></figure><p>Most enterprises are adopting Microservices architectures.</p><p>Microservices provide the <strong>flexibility to innovate</strong>.</p><p>However, Microservices don’t come free. Instead of deploying a few applications, we are deploying hundred’s of microservices. This results in increased complexity.</p><p>Containers can help simplify your deployment and observability challenges. However, there are still challenges with respect to managing your infrastructure and deployments. Example: I want 10 instances of Microservice A container, 15 instances of Microservice B container, .. and so on for multiple microservices. In addition, I want a number of other features for my microservices. A few typical features include:</p><ul><li><strong>Auto Scaling</strong> — Scale containers based on demand</li><li><strong>Service Discovery</strong> — Help microservices find one another</li><li><strong>Load Balancer</strong> — Distribute load among multiple instances of a microservice</li><li><strong>Self Healing</strong> — Do health checks and replace failing instances</li><li><strong>Zero Downtime Deployments</strong> — Release new versions without downtime</li></ul><h3>2: What is Container Orchestration?</h3><p>Container orchestration solutions provide most technical features need by microservices architectures. You will be able to create a cluster of multiple vm instances and deploy microservices to the cluster. Container orchestration solution will manage the clusters and deployments.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*iVkdAGmNXmCXMW5K.png" /></figure><h3>3: What is Kubernetes?</h3><p>There are a number of container orchestration platforms: Docker Swarm, Mesosphere, Kubernetes among others. In the last few years, Kubernetes has emerged as the winners in the container orchestration space.</p><h3>4: What are the most important Kubernetes concepts?</h3><p>Let’s say you want to setup a microservices architecture with Kubernetes. Here’s how the workflow would look like:</p><ul><li>Step 1: Create a Kubernetes cluster with multiple nodes (or virtual machines)</li><li>Step 2: Deploy and configure your first Microservice</li><li>Step 3: Deploy and configure your second Microservice</li></ul><p>Let’s now look at each of these in depth.</p><h3>4.1: What is a Cluster?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/0*6M_Ky2d6H8RnZyNb.png" /></figure><p>A <strong>cluster</strong> is a group of virtual machines. In the cluster, there are two types of nodes:</p><ul><li><strong>Master Node(s)</strong> — Manages the cluster. You send all your deployment instructions to master node.</li><li><strong>Worker Node(s)</strong> — All microservices run on the worker nodes.</li></ul><p>Here are some of the important <strong>Master Node</strong> (Control plane) components:</p><ul><li><strong>API Server</strong> — Handles all communication for a K8S cluster (from nodes and outside)</li><li><strong>Scheduler</strong> — Decides placement of pods</li><li><strong>Control Manager</strong> — Manages deployments &amp; replicasets</li><li><strong>etcd</strong> — Distributed database storing the cluster state</li></ul><p>The job of a <strong>worker node</strong> is to run your microservices. In addition, a Kubernetes component called a Kubelet runs on each pod. Kubelet enables worker nodes to communicate with the master node(s).</p><h3>4.2: Let’s Deploy a Microservice</h3><p>Let’s say I want to deploy 5 instances of V1 of microservice A. The command to issue to create a deployment and set number of instances for it is similar to what you see below:</p><pre>**create deployment** hello-world-rest-api --image=in28min/hello-world-rest-api:0.0.1.RELEASE<br>scale deployment hello-world-rest-api --replicas=5</pre><p>This would deploy v1 of your microservice A with 5 instances to the Kubernetes cluster.</p><p>Internally, Kubernetes would create</p><ul><li>A Deployment</li><li>A ReplicaSet and</li><li>5 Pods</li></ul><p>Why does Kubernetes do this?</p><p>Let’s dig deeper.</p><h3>4.3: What is a Pod?</h3><p>A pod is the smallest deployable unit in Kubernetes. A pod represents an instance of your microservice. Each Pod is assigned an ephemeral <strong>IP address</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/796/0*SD7y0XIOpUPBYnuL.png" /></figure><p>If I have 10 instance of a Microservice A and 12 instances of Microservice B running in a Kubernetes cluster, then I would have a total of 10 + 12 = 22 pods running.</p><h3>4.4: What is a ReplicaSet?</h3><p>We deployed microservice A with 5 instances to Kubernetes cluster. This would mean that you have 5 pods running. Let’s say you kill one of the pods. Kubernetes would automatically recognize this and create a replacement pod. Kubernetes monitors the health of your pods and replace unhealthy pods. How does Kubernetes do this?</p><p>This is the job of a ReplicaSet.</p><p>A ReplicaSet ensures that a specified number of pods are always running. In the above example, a ReplicaSet ensures that 5 instances of Microservice A are always running.</p><h3>4.5: What is a Deployment?</h3><p>If a ReplicaSet ensures specific number of pods, what is the role of Deployment?</p><p>A deployment ensures that you have flexibility when you release new versions of your microservices.</p><p>A deployment represents all the versions of your microservice.</p><p>Currently we have just one version of the microservice. However, you can deploy a new version. Let’s say, I want to deploy V2 of microservice without any downtime.</p><p>That’s the job of a Deployment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/796/0*9Q4iVtbkJQ9BLiOP.png" /></figure><p>When you deploy a new version of an existing microservice, the Deployment would create a new ReplicaSet for V2 of Microservice A.</p><p>You will have:</p><ul><li>One Deployment representing the Microservice A</li><li>One ReplicaSet for V1 of Microservice A</li><li>One ReplicaSet for V2 of Microservice A</li></ul><p>Deployment uk</p><h3>4.6: A Quick Review — Deployment vs Replica Set</h3><pre>kubectl create deployment microservice1 --image=microservice1:v1</pre><p>A <strong>deployment</strong> is created for each microservice. A Deployment represents a microservice (with all its releases). A Deployment manages new releases ensuring zero downtime.</p><p>A <strong>Replica set</strong> ensures that a specific number of pods are running for a specific microservice version. Even if one of the pods is killed, replica set will launch a new one.</p><pre>kubectl set image deployment microservice1 microservice1=microservice1:v2</pre><p>When you deploy a V2 of microservice, a new ReplicaSet (V2 Replic Set) is created.</p><p>Deployment updates V1 Replica Set and V2 Replica Set based on the release strategies configured.</p><h3>4.7: What is a Service?</h3><p>In Kubernetes, each Pod has its <strong>own IP address</strong>. How do you ensure that external users are not impacted when:</p><ul><li>Either a pod fails and is replaced OR</li><li>A new version of microservice is deployed and all existing pods of old release are replaced by ones of new release</li></ul><p>Solution: Create a <strong>Service</strong>.</p><pre>expose deployment name --type=LoadBalancer --port=80</pre><p>A service expose you deployments to the outside world using a stable IP address. This ensures that your users are not impacted as pods go down and come up.</p><p>There are three types of services:</p><ul><li><strong>ClusterIP</strong>: Exposes Service on a cluster-internal IP. Use case: You want your microservice only to be available inside the cluster (Intra cluster communication).</li><li><strong>LoadBalancer</strong>: Exposes Service externally using a cloud provider’s load balancer. Use case: You want to create individual Load Balancer’s for each microservice.</li><li><strong>NodePort</strong>: Exposes Service on each Node’s IP at a static port (the NodePort). Use case: You DO not want to create an external Load Balancer for each microservice (You can create one Ingress component to load balance multiple microservices).</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=27ecccee2b73" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Difference between Azure SQL Database and Azure SQL Managed Instance]]></title>
            <link>https://medium.com/@jigarshah088/difference-between-azure-sql-database-and-azure-sql-managed-instance-6c06fb690320?source=rss-9d5567af57e0------2</link>
            <guid isPermaLink="false">https://medium.com/p/6c06fb690320</guid>
            <dc:creator><![CDATA[jigar shah]]></dc:creator>
            <pubDate>Mon, 01 Apr 2024 23:00:51 GMT</pubDate>
            <atom:updated>2024-04-01T23:00:51.051Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NrLXzyg3bP6Px0Z1c6Zvwg.jpeg" /></figure><p>Database management is important. It requires the best tools in the trade to ensure the best performance. Microsoft’s Azure ASQ Database and Azure SQL Managed Instance are databases-as-a-Service <strong>(DVaaS-PaaS)</strong>. Both services have a ton of similarities, such as their query processing, database management, and even the standard form of the SQL language. However, they also have some differences, and this new post by our <a href="https://www.devitpl.com/">DEV IT</a> engineers will help you choose the right one for your business.</p><h3>What is Azure SQL Managed Instance?</h3><p>Azure SQL Managed Instance is an intelligent and scalable service for cloud databases. It combines the broadest SQL server database engine compatibility with several benefits of being a fully managed platform. You can use it to move on-prem SQL apps and even use a few unique features to Azure SQL, such as linked servers, database mail, and service brokers.</p><h3>What is Azure SQL Database?</h3><p>An Azure SQL Database is a managed and intelligent SQL database in the cloud. It can be quickly scaled to meet the demands of your applications’ demands, is automatically available, and supports a wide range of third-party software.</p><h3>Key Difference in features</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/0*wJv7L3i4rZcE7NnP.png" /></figure><h3>When to choose Azure SQL Managed Instance?</h3><ul><li>When you want native Virtual Network (VNet) integration with all the benefits of a fully managed platform as a service (PaaSthe ).</li><li>For example, use SQL MI when application services components (e.g., App tier) are running in Azure Virtual Machine (VM) or Virtual Machine Scale Sets (VMSS) in VNet.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6c06fb690320" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>