Showing posts with label Test Automation. Show all posts
Showing posts with label Test Automation. Show all posts

Monday, July 28, 2025

๐Ÿš€ Introducing the Universal API Testing Tool — Built to Catch What Manual Testing Misses


In today’s software-driven world, APIs are everywhere — powering everything from mobile apps to microservices. But with complexity comes risk. A single missed edge case in an API can crash systems, leak data, or block users. That’s a huge problem.

After years of working on high-scale automation and quality engineering projects, I decided to build something that tackles this challenge head-on:

๐Ÿ‘‰ A Universal API Testing Tool powered by automation, combinatorial logic, and schema intelligence.

This tool is designed not just for test engineers — but for anyone who wants to bulletproof their APIs and catch critical bugs before they reach production.


๐Ÿ” The Problem with Manual API Testing

Let’s face it: manual API testing, or even scripted testing with fixed payloads, leaves massive blind spots. Here’s what I’ve consistently seen across projects:

  • ๐Ÿ” Happy path bias: Most tests cover only expected (ideal) scenarios.

  • ❌ Boundary and edge cases are rarely tested thoroughly.

  • ๐Ÿงฑ Schema mismatches account for over 60% of integration failures.

  • ๐Ÿ”„ Complex, nested JSON responses break traditional test logic.

Even with the best intentions, manual testing only touches ~15% of real-world possibilities. The rest? They’re left to chance — and chance has a high failure rate in production.


๐Ÿ’ก Enter: The Universal API Testing Tool

This tool was created to turn a single API request + sample response into a powerful battery of intelligent, automated test cases. And it does this without relying on manually authored test scripts.

Let’s break down its four core pillars:


๐Ÿ” 1. Auto-Schema Derivation

Goal: Ensure every response conforms to an expected structure — even when you didn’t write the schema.

  • Parses sample responses and infers schema rules dynamically

  • Detects type mismatches, missing fields, and violations of constraints

  • Supports deeply nested objects, arrays, and edge data structures

  • Validates responses against actual usage, not just formal docs

๐Ÿ”ง Think of it like “JSON Schema meets runtime intelligence.”


๐Ÿงช 2. Combinatorial Test Generation

Goal: Generate hundreds of valid and invalid test cases automatically from a single endpoint.

  • Creates diverse combinations of optional/required fields

  • Performs boundary testing using real-world data types

  • Generates edge case payloads with minimal human input

  • Helps you shift-left testing without writing 100 test cases by hand

๐Ÿ“ˆ This is where real coverage is achieved — not through effort, but through automation.


๐Ÿ“œ 3. Real-Time JSON Logging

Goal: Provide debuggable, structured insights into each request/response pair.

  • Captures and logs full payloads with status codes, headers, and durations

  • Classifies errors by type: schema, performance, auth, timeout, etc.

  • Fully CI/CD compatible — ready for pipeline integration

๐Ÿงฉ Imagine instantly knowing which combination failed, why it failed, and what payload triggered it.


๐Ÿ” 4. Advanced Security Testing

Goal: Scan APIs for common and high-risk vulnerabilities without writing separate security scripts.

  • Built-in detection for:

    • XSS, SQL Injection, Command Injection

    • Path Traversal, Authentication Bypass

    • Regex-based scans for sensitive patterns (UUIDs, tokens, emails)

  • Flags anomalies early during development or staging

๐Ÿ›ก️ You don’t need a separate security audit to find the obvious vulnerabilities anymore.


⚙️ How It Works (Under the Hood)

  • Developed in Python, using robust schema libraries and custom validation logic

  • Accepts a simple cURL command or Postman export as input

  • Automatically generates:

    • Schema validators

    • Test payloads

    • Execution reports

  • Debug mode shows complete request/response cycles for every test case


๐Ÿ“ˆ What You Can Expect

The tool is in developer preview stage — meaning results will vary based on use case — but here’s what early adopters and dev teams can expect:

  • ⏱️ Save 70–80% of manual testing time

  • ๐Ÿž Catch 2–3x more bugs by testing combinations humans often miss

  • ⚡ Reduce integration testing time from days to hours

  • ๐Ÿ”’ Get built-in security scans with every API run — no extra work required


๐Ÿงฐ Try It Yourself

๐Ÿ”— GitHub Repository

๐Ÿ‘‰ github.com/nsharmapunjab/frameworks_and_tools/tree/main/apitester


๐Ÿ’ฌ Your Turn: What’s Your Biggest API Testing Challenge?

I’m actively working on v2 of this tool — with plugin support, OpenAPI integration, and enhanced reporting. But I want to build what developers and testers actually need.

So tell me:

➡️ What’s the most frustrating part of API testing in your projects?

Drop a comment or DM me. I’d love to learn from your use cases.


๐Ÿ‘‹ Work With Me

Need help building test automation frameworks, prepping for QA interviews, or implementing CI/CD quality gates?

๐Ÿ“ž Book a 1:1 consultation: ๐Ÿ‘‰ topmate.io/nitin_sharma53


Thanks for reading — and if you found this useful, share it with your dev or QA team. Let’s raise the bar for API quality, together.

#APITesting #AutomationEngineering #QualityAssurance #DevOps #OpenSource #TestAutomation #PythonTools #API #SDET #NitinSharmaTools

Saturday, July 5, 2025

The Complete Guide to LLM Parameters: Mastering AI Model Configuration


Large Language Models (LLMs) have revolutionized how we interact with AI, but their true power lies in understanding and fine-tuning their parameters. Whether you're a developer integrating AI into your applications or a researcher pushing the boundaries of what's possible, mastering these parameters is crucial for achieving optimal results.

Understanding Parameter Categories

Before diving into specific parameters, it's essential to understand that LLM configuration involves three distinct categories:

  • Parameters: Control the model's behavior during inference
  • Hyperparameters: Define the model's architecture and training process
  • Configuration Settings: Manage practical aspects of model deployment

Core Sampling Parameters

Temperature: The Creativity Controller

Temperature is perhaps the most influential parameter in shaping model output. Operating on a scale from 0.0 to 1.0+ (though values above 1.0 are possible), it fundamentally alters how the model selects its next token.

python
# Low temperature example
response = model.generate(prompt, temperature=0.1)
# Output: Highly deterministic, focused responses

# High temperature example  
response = model.generate(prompt, temperature=1.5)
# Output: Creative, unpredictable, potentially chaotic responses

Technical Implementation: Temperature scales the logits before applying softmax, effectively flattening or sharpening the probability distribution. A temperature of 0.1 makes the model nearly deterministic, while 2.0 creates a much flatter distribution where less likely tokens have higher selection probability.

Best Practices:

  • Code generation: 0.1-0.3
  • Creative writing: 0.7-1.2
  • Analytical tasks: 0.2-0.5

Top-P (Nucleus Sampling): Dynamic Vocabulary Control

Top-P sampling represents a more sophisticated approach to controlling model output than traditional top-k sampling. Instead of selecting from a fixed number of tokens, it dynamically adjusts the candidate pool based on cumulative probability.

python
# Top-P implementation concept
def nucleus_sampling(logits, top_p=0.95):
    sorted_logits = torch.sort(logits, descending=True)
    cumulative_probs = torch.cumsum(F.softmax(sorted_logits, dim=-1), dim=-1)
    
    # Remove tokens with cumulative probability above threshold
    sorted_indices_to_remove = cumulative_probs > top_p
    sorted_indices_to_remove[..., 1:] = sorted_indices_to_remove[..., :-1].clone()
    sorted_indices_to_remove[..., 0] = 0
    
    return apply_mask(logits, sorted_indices_to_remove)

Key Advantages:

  • Maintains quality while preserving diversity
  • Adapts to context complexity automatically
  • Reduces likelihood of generating nonsensical text

Top-K: Fixed Vocabulary Limiting

Top-K sampling restricts the model to considering only the K most probable tokens at each step. While simpler than Top-P, it provides consistent behavior across different contexts.

Performance Considerations:

  • Lower computational overhead than Top-P
  • More predictable behavior for debugging
  • Less adaptive to context complexity

Repetition Control Mechanisms

Repetition Penalty: Combating Redundancy

Repetition penalty addresses one of the most common issues in text generation: the model's tendency to repeat phrases or enter loops. The penalty is applied exponentially to previously generated tokens.

python
# Repetition penalty formula
penalized_score = original_score / (penalty_factor ** repetition_count)

Implementation Strategy:

  • Values between 1.0-1.2: Subtle discouragement
  • Values between 1.2-1.5: Moderate repetition control
  • Values above 1.5: Aggressive anti-repetition (may harm coherence)

Frequency and Presence Penalties: Advanced Repetition Control

These parameters offer more nuanced control over repetition:

  • Frequency Penalty: Scales with how often a token appears
  • Presence Penalty: Binary penalty for any token that has appeared
python
# Frequency penalty calculation
frequency_penalty = frequency_penalty_coefficient * token_frequency

# Presence penalty calculation  
presence_penalty = presence_penalty_coefficient * (1 if token_used else 0)

Memory and Context Management

Context Window: The Memory Bottleneck

The context window defines how much conversation history the model can access. This hyperparameter is typically fixed during model training but critically impacts performance.

Current Landscape:

  • GPT-3.5: 4,096 tokens
  • GPT-4: 8,192-32,768 tokens
  • Claude-2: 100,000+ tokens
  • Some specialized models: 1M+ tokens

Optimization Strategies:

  • Implement sliding window approaches for long conversations
  • Use summarization techniques to compress context
  • Prioritize recent context over distant history

Token Limits: Controlling Response Length

Max tokens settings prevent runaway generation and manage computational costs. However, setting this too low can result in truncated responses.

python
# Dynamic token limiting based on context
def calculate_max_tokens(context_length, target_response_ratio=0.3):
    available_tokens = context_window - context_length
    return min(available_tokens, int(context_window * target_response_ratio))

Advanced Configuration Techniques

System Prompts: Behavioral Programming

System prompts act as persistent instructions that shape the model's behavior throughout the conversation. They're particularly powerful for:

  • Defining consistent personas
  • Establishing output formats
  • Setting behavioral constraints
python
system_prompt = """You are a senior software engineer with expertise in Python and machine learning. 
Always provide code examples with your explanations and consider performance implications."""

Role-Based Conversations: Structured Interactions

Defining user and assistant roles helps maintain conversation structure and can improve model performance in specific domains.

Seed Values: Reproducible Randomness

Setting seed values ensures reproducible outputs, crucial for debugging and A/B testing implementations.

python
# Reproducible generation
torch.manual_seed(42)
response = model.generate(prompt, temperature=0.8, seed=42)

Practical Implementation Guidelines

Parameter Tuning Workflow

  1. Start with defaults: Begin with recommended values (temperature=0.7, top_p=0.95)
  2. Adjust for use case: Modify based on whether you need creativity or precision
  3. Test systematically: Use consistent prompts to evaluate changes
  4. Monitor quality metrics: Track relevance, coherence, and diversity
  5. Iterate based on results: Make incremental adjustments

Common Pitfalls and Solutions

High Temperature + Low Top-P: Can create incoherent outputs

  • Solution: Balance both parameters or use temperature OR top-p, not both aggressively

Excessive Repetition Penalty: May harm natural language flow

  • Solution: Start with 1.1-1.2 and increase gradually

Context Window Overflow: Leads to truncated conversations

  • Solution: Implement context management strategies early

Performance Optimization

Computational Considerations

Different parameter combinations have varying computational costs:

  • Temperature scaling: Minimal overhead
  • Top-P sampling: Moderate overhead (sorting required)
  • Top-K sampling: Low overhead (simple truncation)
  • Repetition penalties: Moderate overhead (history tracking)

Memory Management

python
# Efficient context management
class ContextManager:
    def __init__(self, max_tokens=4096):
        self.max_tokens = max_tokens
        self.context_buffer = []
    
    def add_message(self, message):
        self.context_buffer.append(message)
        self._trim_context()
    
    def _trim_context(self):
        total_tokens = sum(len(msg.split()) for msg in self.context_buffer)
        while total_tokens > self.max_tokens and len(self.context_buffer) > 1:
            self.context_buffer.pop(0)
            total_tokens = sum(len(msg.split()) for msg in self.context_buffer)

Future Considerations

As LLM technology evolves, new parameters and techniques continue to emerge:

  • Adaptive sampling: Dynamic parameter adjustment based on context
  • Multi-modal parameters: Handling text, image, and audio inputs
  • Fine-tuning parameters: Model customization for specific domains
  • Efficiency parameters: Balancing quality with computational cost


Conclusion

Mastering LLM parameters is both an art and a science. While understanding the technical mechanics is crucial, the real skill lies in knowing when and how to adjust these parameters for specific use cases. The key is systematic experimentation combined with a deep understanding of your application's requirements.

Remember that optimal parameter settings are highly dependent on your specific use case, target audience, and quality requirements. Start with established defaults, understand the impact of each parameter, and iterate based on empirical results.

The future of AI development lies not just in more powerful models, but in more sophisticated parameter tuning and configuration management. By mastering these fundamentals today, you're building the foundation for tomorrow's AI applications.

Wednesday, July 2, 2025

๐Ÿ” Testing an ML Model ≠ Testing Traditional Code


 Testing a Machine Learning (ML) model is very different from testing traditional software because:

  • The output is probabilistic, not deterministic.

  • The behavior depends on data patterns, not just logic.

To test an ML model effectively, you need a multi-layered strategy combining functionaldata-driven, and performance-based testing.


✅ 1. Unit Testing the ML Pipeline (Code-Level)

๐Ÿ” What to Test:

  • Data preprocessing methods (normalization, encoding)

  • Feature extraction logic

  • Model loading and inference function

๐Ÿ’ก Example:

Monday, June 30, 2025

๐Ÿ•ต️‍♂️ SVG vs Shadow DOM in Selenium: A Tester’s Guide with Real-World Examples


Have you ever clicked an element in Selenium, only to watch nothing happen—again and again? Welcome to the world of SVGs and Shadow DOMs, where traditional locators fail and frustration often begins.

In this post, we’ll demystify these tricky elements, explain how to work with them in Selenium (Java), and walk through real-world examples that every automation engineer should know.


๐Ÿงฉ What Are SVG and Shadow DOM?

Monday, June 16, 2025

Generative AI in Software Testing



Generative AI (GenAI) is poised to fundamentally transform the software development lifecycle (SDLC)—especially in software testing. As applications grow in complexity and release cycles shorten, traditional testing methods fall short. GenAI offers a game-changing solution: dynamically generating test cases, identifying risks, and optimizing testing with minimal human input.

Key benefits include:

  • Faster test execution

  • Enhanced coverage

  • Cost reduction

  • Improved defect detection

Despite challenges like data quality, integration, and skill gaps, the future of software testing is inseparably linked to GenAI, paving the way toward autonomous and hyper-personalized testing.


๐Ÿš€ Main Themes & Tools You Can Use


1. The Critical Need for GenAI in Modern Software Testing

Why GenAI? Traditional testing can’t keep pace with:

  • Complex modern architectures (microservices, containers, cloud-native)

    • GenAI predicts failure points using historical data and real-time scenarios.

    • ๐Ÿ› ️ Tool ExampleDiffblue Cover — generates unit tests for Java code using AI.

  • Agile & CI/CD Release Pressure

    • According to the World Quality Report 2023, 63% of enterprises face test automation scalability issues.

    • ๐Ÿ› ️ Tool ExampleTestim by Tricentis — uses AI to accelerate test creation and maintenance.

  • Missed Edge Cases

    • GenAI ensures coverage by analyzing user behavior and generating test cases automatically.

    • ๐Ÿ› ️ Tool ExampleFunctionize — AI-powered test creation based on user journeys.

  • High Manual Effort

    • GenAI generates and updates test scripts autonomously.

    • ๐Ÿ› ️ Tool ExampleMabl — self-healing, low-code test automation platform.


2. Core Capabilities and Benefits of GenAI in Testing

Capability

Impact

Accelerated Test Execution

Speeds up releases

Enhanced Test Coverage

Covers functional, UI, and edge cases

Reduced Script Maintenance

AI auto-updates outdated tests

Cost Efficiency

Fewer resources, less manual work

Improved Defect Detection

Finds bugs early via predictive analytics


๐Ÿ› ️ Tool ReferenceAppvance IQ — uses AI to improve defect detection and test coverage.


3. Key Applications of GenAI in Software Testing

✅ Automated Test Case Generation

  • Analyzes code logic, results, and behavior to generate meaningful test cases.

  • ๐Ÿ› ️ ToolTestsigma — auto-generates and maintains tests using NLP and AI.

๐Ÿ”ง Self-Healing Test Automation

  • Automatically adapts to UI or logic changes.

  • ๐Ÿ› ️ Tools:

๐Ÿงช Test Data Generation & Management

  • Creates compliant synthetic data simulating real-world conditions.

  • ๐Ÿ› ️ Tools:

    • Tonic.ai — privacy-safe synthetic test data

    • Datomize — dynamic data masking & synthesis

๐Ÿ” Defect Prediction & Anomaly Detection

  • Identifies defect-prone areas before they affect production.

  • ๐Ÿ› ️ ToolAppvance IQ

๐Ÿ” Optimizing Regression Testing

  • Prioritizes relevant tests for code changes.

  • ๐Ÿ› ️ ToolApplitools — AI-driven visual testing and regression optimization.

✍️ NLP for Test Case Creation

  • Converts natural language into executable tests.

  • ๐Ÿ› ️ ToolTestRigor — plain English to automated test scripts.


4. Challenges in Implementing GenAI

Challenge

Description

Data Availability & Quality

Poor data → inaccurate test generation

Tool Integration

Legacy tools may lack AI support

Skill Gap

Requires upskilling QA teams in AI/ML

False Positives

Over-testing may need human review


๐Ÿ› ️ Solution Suggestion: Use platforms like Katalon Studio that offer GenAI plugins with low-code/no-code workflows to reduce technical barriers.


5. The Future of GenAI in Software Testing

๐Ÿค– Autonomous Testing

  • Self-designing, executing, and analyzing test frameworks.

  • ๐Ÿ› ️ ToolFunctionize

๐Ÿ”„ AI-Augmented DevOps

  • Integrated CI/CD with AI-based code quality checks and rollback mechanisms.

  • ๐Ÿ› ️ ToolHarness Test Intelligence — AI-powered testing orchestration in pipelines.

๐ŸŽฏ Hyper-Personalized Testing

  • Tailors tests to real user behavior and preferences.

  • ๐Ÿ› ️ ToolTestim Mobile — for AI-driven UX optimization and mobile test personalization.


๐Ÿงฉ Conclusion

Generative AI isn’t just an enhancement — it’s becoming a necessity for QA teams aiming to keep pace in a high-velocity development environment.

By combining automation, intelligence, and adaptability, GenAI can enable faster releases, fewer bugs, and more robust software.

✅ Start exploring tools like Testim, Appvance IQ, Mabl, Functionize, and Applitools today to get a head start on the future of intelligent testing.


๐Ÿ’ฌ Let’s Discuss:

Have you implemented GenAI tools in your QA process? What has been your experience with tools like TestRigor, Tonic.ai, or Mabl?

๐Ÿ‘‡ Drop your thoughts or tool recommendations in the comments.


#GenAI #SoftwareTesting #Automation #AIinQA #TestAutomation #DevOps #SyntheticData #AItools #QualityEngineering

Thursday, May 12, 2022

Appium Architecture - Core Concepts

What is Appium?

It’s a NodeJS based open-source tool for automating mobile applications. It supports native, mobile web, and hybrid applications on iOS mobile, Android mobile, and Windows desktop platforms.

Using Appium, you can run automated tests on physical devices or emulators, or both.



Let’s understand the above Appium architecture diagram.

  • Appium is a client-server architecture. The Appium server communicates with the client through the HTTP JSONWire Protocol using JSON objects.
  • Once it receives the request, it creates a session and returns the session ID, which will be used for communication so that all automation actions will be performed in the context of the created session.
  • Appium uses the UIAutomator test framework to execute commands on Android devices and emulators.
  • Appium uses the XCUITest test framework to execute commands on Apple mobile devices and simulators.
  • Appium uses WinAppDriver to execute commands for Windows Desktop apps. It is bundled with Appium and does not need to be installed separately.

Appium - Android visual interaction flow

Let’s understand the interaction flow between the code and the Android device via the Appium server.

  • The client sends the request to the Appium server through the HTTP JSONWire Protocol using JSON objects.
  • Appium sends the request to UIAutomator2.
  • UIAutomator2 communicates to a real device/simulator using bootstrap.jar which acts as a TCP server.
  • bootstrap.jar executes the command on the device and sends the response back.
  • Appium server sends back the command execution response to the client.

Appium - iOS visual interaction flow

Let’s understand the interaction flow between the code and the iOS device via the Appium server.

  • The client sends the request to the Appium server through the HTTP JSONWire Protocol using JSON objects.
  • Appium sends the request to XCUITest.
  • XCUITest communicates to a real device/simulator using bootstrap.js which acts as a TCP server.
  • bootstrap.js executes the command on the device and sends the response back.
  • The Appium server sends the command execution response to the client.

Whiteboard Sessions
  • IOS flow architecture

  • Android flow architecture

  • Drivers which appium supports
    • UI Automator2 (Android)
    • Espresso (Android)
    • WinApp (Windows)
    • MAC Driver (Mac OS)
    • XCUITest (IOS above 9.3 version)
    • UI Automation (IOS below 9.3 version)
    • Tizen (for samsung)


Happy Learning :) 

Tuesday, May 3, 2022

Docker vs Kubernetes

Kubernetes and Docker are not competing technologies. In fact, they actually complement one another to get the best out of both.

Quick difference between them as below

Docker
  • Containers, isolated environment for application
  • Automated building and deploying applications - CI
  • Container platform for configuring, building and distributing containers
Kubernetes
  • Infrastructure for managing multiple containers
  • Automated scheduling and management of application containers
  • Ecosystem of managing a cluster of Docker containers


Monday, May 2, 2022

Github Actions - Basic Concepts

 What is Github Actions?


What are those workflows?



How Github Actions automate these workflows?





CI/CD with Github Actions





Happy Learning !! :) 

Sunday, May 1, 2022

Kubernetes Architecture explained

In this session, we're gonna look at two types of nodes that kubernetes operates on one is master and another one is slave and we're gonna see what is the difference between those and which role each one of them has inside of the cluster and we're going to go through the basic concepts of how kubernetes does what it does and how the cluster is self-managed and self-healing etc.

Worker Nodes:

  • 3 Node Processes
    • Container Runtime
    • Kubelet
    • Kube Proxy
  • Each node has multiple pods on it
  • 3 processes must be installed on every Node
  • Worker Nodes do the actual work
  • First process that needs to run on every node is the container runtime because application pods have containers running inside, a container runtime needs to be installed on every node.
  • Process that actually schedules those and containers underneath is kubelet which is a process of kubernetes itself unlike container runtime that has interface with both container runtime and machine (worker node itself) because at the end of the day kubelet is responsible for taking that configuration and actually running apod or starting a pod with a container inside and then assigning resources from that node to the container like CPU, RAM and storage resources.
  • Usually kubernetes cluster is made up of multiple nodes which also must have container runtime and kubelet services installed and you can have hundreds of worker nodes which will run run other pods and containers and repplicas of the existing pods like my-app and database as an example and the way communication between them works is using services which is sort of loadbalancer which basically catches the requests directed to the pod or application like database for example and then forward it to respective pod and third process that is responsible for forwarding the requests from services to pods is actually kube proxy.
  • Kube proxy must be installed on every node and kube proxy has actually intelligent forwarding logic inside that makes sure that the communication also works in a performant way with low overhead for example if an application my-app replica is making a request database instead of service just randomly forwarding the request to any replica, it will actually forward it to the replicat that is running on the same node as the pod that initiated the reuqest thus this way avoiding the network calls overhead of sending the request to another machine.
  • To summarise 3 node processes must be installed on every node in order for kubernetes cluster to function properly.


Master Nodes + Master Processes:
  • We discussed above regarding worker nodes and processes in details but another question comes in mind so, how do you interact with this cluster?
    • How to:
      • schedule pod?
      • monitor?
      • re-schedule/re-start pod?
      • join a new node?

  • Answer to above ask is all these managing processes are done Master Nodes
  • There are 4 processes that run on every master node that control the cluster state and the worker nodes as well.
    • API Server
    • Scheduler
    • Controller Manager
    • etcd - the cluster brain
  • API Server
    • When you as a user want to deploy a new application in a kubernetes cluster, you interact with the APi Server using some client, it could be a UI like kubertest dashboard, could be commandline tool like kubelet etc. API server is like cluster gateway which gets the initial request which updates into the cluster or even the queries from the cluster and it also acts as a gatekeeper for authentication to make sure only authenticated and authorised requests get through to the cluster. 
    • That means whenever you want to schedule new pods, deploy new application, create new server or any other component, you have to talk to the API server on the master node and it validates your reuqtest and if everything fine then it forward your request to other processes.
    • Also if you want to query the status os your deployment or the cluster health etc, you make a request to the API server and it gives you the response which is good for security because you have one entry point into the cluster.

  • Scheduler
    • As mentioned API server sends request to scheduler and scheduler has intelligent way to decide in which node pod has to put based on how much resources new pod needs and how much resources availables in the given nodes etc.

  • Controller Manager
    • Another crucial component because what happens when pods die on any node, there must be a way to detect that nodes died and then reschedule those pods asap.
    • Controller manager detects cluster state changes like crashing of pods for example when pods die, controller manager detects that and try to recover the cluster state asap and for that it makes a request to the scheduler to reschedule those dead pods in the same cycle what we discussed during scheduler part discussion.

  • etcd
    • etcd is the cluster brain
    • key-value store
    • Cluster changes get stored in the key value store
    • why we call it as cluster brain because all of those mechianism with scheduler and controller manager works because of this data, for example
      • How scheduler knows what resources are available on each worker node.
      • How does controller manager know that a cluster state changed in some way for example pods died or that kubelet restarted new pods upon the request of a scheduler.
      • or when you make a query request to API server about the cluster health or for example you application deployment state where as API server get all this information from so all of this information is stored in etcd cluster.
    • Actual application data is not stored in this one, only cluster state data.



Happy Learning !! :) 

My Profile

My photo
can be reached at 09916017317