Author: Editorial Team
-
Reversing the linked list in place (without using extra space)
The goal is to reverse the linked list such that: Approach 1: Reversing a Singly Linked List (SLL) Logic Given a singly linked list like this: We need to reverse it to: Steps to Reverse Initialize three pointers: Traverse the list: Once the loop completes, prev will point to the new head. Java Code to…
-
Finding the Middle Node of a Linked List in Java
In this tutorial, we will explore different approaches to find the middle node of a linked list in Java. This is a common coding interview question, and understanding its logic is essential for working with linked lists. Approach 1: Using Slow and Fast Pointers (Tortoise and Hare Algorithm) Logic This is the most common and…
-
Introduction to Helm
What is Helm? Helm is a package manager for Kubernetes that helps developers and DevOps teams manage, deploy, and scale Kubernetes applications efficiently. It simplifies the handling of Kubernetes manifest files by packaging related configurations into a reusable and shareable format known as Charts. In a microservices architecture, managing numerous Kubernetes manifests for different services…
-
Updating the Image in a Kubernetes Deployment
When managing applications in Kubernetes, you may need to update the container image in a deployment to apply new changes or fixes. This tutorial covers different methods to update the image in a Kubernetes deployment. Update the Image Using kubectl set image Kubernetes provides a simple way to update the image of a running deployment…
-
Priority Queue pattern
The priority queue pattern enables a workload to process high-priority tasks more quickly than lower-priority tasks. This pattern uses messages sent to one or more queues and is useful in applications that offer different service level guarantees to individual clients. Context and problem Workloads often need to manage and process tasks with varying levels of…
-
Create Environment Variables inside Kubernetes cluster using ConfigMap
Introduction In this tutorial we’ll create environment variables inside Kubernetes cluster using ConfigMap. Create a Kubernetes ConfigMap Create a file named configmap.yaml: Apply the ConfigMap: Modify HelloWorldController to Use Environment Variables Read the hello world message from environment variables in your controller: Note: The APP_MESSAGE:Default Hello syntax ensures that if the environment variable is missing,…
-
Deploying Spring Boot application in Kubernetes in local
Introduction In this tutorial, we’ll create a simple Hello World application and deploy in Kubernetes cluster. In localhost, we are using Docker Desktop and have enabled Kubernetes. This is a single node cluster. Creating the application Create a Spring Boot application. Following is the pom.xml: Create the HelloWorldController: Create the Docker file In the root…
-
Kafka Producer in Spring Boot
In this tutorial, we’ll create a Kafka producer in Spring Boot. Dependency To work with Kafka in Spring Boot, add the following dependency: Configuration Add the following configuration in the properties file, application.properties: Explaination: 2. Key Serializer 3. Value Serializer Implementation Following is the Following is the important piece of code to send event: Note:…
-
Introduction to Kafka Consumer CLI
Introduction In this tutorial, you will learn how to use the Apache Kafka Console Consumer to read messages from a Kafka topic using the Apache Kafka command-line interface (CLI). Introduction to Kafka Console Consumer Kafka Console Consumer is a built-in tool provided by Apache Kafka that allows you to read messages from a specified Kafka…
-
Sending Messages to a Kafka Topic Using the CLI
The kafka-console-producer.sh script is a built-in Kafka command-line tool used to send messages to a Kafka topic. It connects to the Kafka cluster via the specified bootstrap servers and allows users to input messages interactively. This tool is useful for testing Kafka producers and debugging message flows. Before proceeding with this lesson, ensure that your…
