Learn how to use the kubectl logs command to get a continuous stream of logs from the Kubernetes pods.
Also find me here:
Baeldung Author
Tapan Avasthi
Tapan Avasthi is an experienced Senior Engineer with almost a decade of experience in backend development in the software industry. They have a solid inclination to automate the tedious parts of software development and possess an opinionated view on writing elegant, clean code regardless of the technology stack. Additionally, they have ample experience working with Java and Spring ecosystems and a working knowledge of advanced DevOps concepts.
Here's what I've written (so far):
Baeldung on Java
- All
- Programming (3)
- Spring Boot (2)
- Spring (2)
- Networking (2)
- Logging (2)
- Data (2)
- Testing (1)
- Reactive (1)
- NoSQL (1)
- Java String (1)
- Java Array (1)
- Docker (1)
- DevOps (1)
Converting an int[] to HashSet in Java
Filed under Java Array
Learn multiple approaches to converting an int[] to a HashSet in Java.
Guide to Sending Post Request via cURL With Data From a File
Filed under Networking, Programming
Learn how to send data from files using cURL with the –data and –form options.
How to Post Raw Body Data With cURL
Filed under Networking, Programming
Learn how to use cURL for sending raw body data over a POST request.
Guide to Splitting a String by Whitespace in Java
Filed under Java String
Learn how to split a String by whitespace characters, such as space, tab, or newline, using multiple approaches
Enable and Disable Endpoints at Runtime With Spring Boot
Filed under Spring Boot
Learn to enable and disable endpoints at runtime in a Spring Boot application using a few popular libraries, such as Spring Cloud, Spring Actuator, and Apache’s Commons Configuration.
Guide to Resilience4j With Spring Boot
Filed under Spring Boot
Learn how to use the Resilience4j library with a simple Spring Boot application.
Guide to the Storage Engine in Apache Cassandra
Dive into the internals of the storage engine used by Apache Cassandra.
How to Change Directory in Docker
Filed under Docker
Learn how to change the directory when building a Docker image or when running a container using an image.
Guide to Check if Apache Kafka Server Is Running
Filed under Data
Learn a few strategies to determine if the Kafka server is running
Guide to Undo a git rebase
Filed under Programming
Learn about two popular techniques to undo a git rebase operation
Reading Flux Into a Single InputStream Using Spring Reactive WebClient
Learn how to read Flux into a single InputStream
Load Testing Using Postman
Filed under Testing
Learn how to use Postman collections to perform simple load testing
Monitor the Consumer Lag in Apache Kafka
Learn how to find the consumer lag on a Kafka topic.
Baeldung on Linux
- All
- Scripting (20)
- Files (9)
- File Searching (8)
- File Editing (8)
- Administration (8)
- Web (5)
- Processes (2)
- File Viewing (2)
- File Permissions (1)
Guide to the getline Function in AWK
Learn how to use the getline function in AWK to read from files and piped external commands.
Showing a Character at a Specific Position in a File in Linux
Filed under File Viewing
Learn how to show a character at a specific position in a file using command-line utilities such as head, tail, sed, awk, od, cut, and read.
How to Get the Current Date in awk
Filed under Scripting
Learn how to get the current date in awk and use it for date-time logging, data analysis, and data filtering.
How to Download Multiple Files With cURL Using Brace Syntax
Filed under Web
Learn how to download multiple files with a single curl command using brace syntax.
How to Remove the Last Occurence of a Pattern in a File
Filed under File Editing
Learn how to remove the last occurrence of a pattern in a file using command-line utilities, such as sed, awk, and tac
How to Take the Absolute Value of a Number in Awk
Filed under Files
Learn various methods of getting the absolute value of numbers in Awk.
Using Multiple Delimiters in Awk
Learn how to use multiple delimiters in Awk to separate fields in an input record using the split(), match(), and substr() functions.
Sorting Docker Images by Size Using the docker images Command
Filed under Administration
Learn to sort Docker images using the docker images command with multiple command-line utilities.
How to Increment a Number in a Matched Pattern
Filed under Scripting
Learn how to increment a number in a matched pattern using different command-line utilities, such as awk, sed, expr, bc, grep, and cut.
Assigning the Current Git Branch Name to a Variable in a Shell Script
Filed under Scripting
Learn how to get the current branch name and assign it to a variable using various git sub-commands.
How to List Files Sorted by the Number of Lines They Contain
Filed under Files
Learn how to use wc, sort, awk, find, and xargs to list the files sorted by the number of lines they contain.
Finding Directories Not Containing a Specific File in Linux
Filed under File Searching
Explore multiple approaches for finding directories not containing a specific file in Linux.
How to Redirect the Contents of a File to echo
Filed under File Viewing
Learn multiple ways to redirect the contents of a file to the echo command.
How to Run Variable Content as a Command in Bash
Filed under Scripting
Learn how to run the content of a variable as a command in Bash using command-line utilities such as eval, sed, and awk.
Generating a List of Dates in a Range in Bash
Filed under Scripting
Learn how to generate a list of dates in a range in Bash using different command-line utilities.
How to Convert a String to Hexadecimal on the Command Line in Linux
Filed under Scripting
Learn several techniques to convert a string to hexadecimal using command-line utilities in Linux.
Guide to Incremental Search in Vim
Filed under File Searching
Explore the incremental search feature in Vim along with the search highlight feature.
How to Grep From the End of a File to the Beginning
Filed under File Searching
Explore multiple approaches to searching a file from its end.
How to Store Standard Error Messages in a Linux Variable
Filed under Scripting
Learn multiple ways to store standard error text in a Linux variable.
How to Append Text at the Beginning of a File in Linux
Filed under File Editing
Learn how to append text at the beginning of a file using cat, awk, tee, and sed.
How to Use Conditional Constructs in Jenkins Pipeline
Filed under Administration
Learn to use conditional constructs such as if-else by writing a set of Jenkins pipelines primarily in the Groovy language.
Guide to Linux CLI Calendar
Filed under Administration
Learn about Linux’s cal and ncal commands to show the calendar in the terminal.
How to Match a Pattern “N” Times Using sed
Filed under File Editing, File Searching
Learn how to match a pattern “N” times using sed for single-line and multi-line inputs.
How to Split a Parameter by a Character Using awk
Explore multiple strategies for splitting a parameter (input record) by a character using awk.
Joining Lines Without Introducing a Space in Vim
Filed under File Editing
Learn multiple ways to join lines in a text file without introducing a space.
Understanding ConfigMaps and Secrets in Kubernetes
Filed under Administration
Compare the features of Secrets and ConfigMaps in Kubernetes.
How to Pass an Environment Variable in Kubernetes Deployment
Filed under Administration
Learn how to pass environment variables to Kubernetes deployment.
Understanding Labels and Annotations in Kubernetes
Filed under Administration
Learn important differences between labels and annotations in terms of structure, accessibility, and direct integration with controllers.
Understanding livenessProbe and readinessProbe in Kubernetes
Filed under Administration
Learn about the livenessProbe and readinessProbe mechanisms by configuring them for different scenarios.
Use of BEGIN and END Rules in Awk
Learn the use of awk’s BEGIN and END blocks to solve several interesting use cases, including report generation, line deduplication, sorting, data validation, and data conversion.
Guide to Multiplying Columns Using awk
Filed under Scripting
Learn how to multiply columns using awk where columns are from the same file or different files.
How to cat the Contents of Files Found Using find Into a Single File
Filed under Files
Learn several ways to cat the contents of the files (found using find) to a single destination file.
How to Embed a Shell Command Into a sed Expression
Filed under Scripting
Explore several strategies to embed a shell command into a sed expression, such as the substitution flag, command substitution, and parameter expansion.
How to Auto Delete Files Older Than N Days
Filed under File Searching
Learn how to do file cleanup activity by removing files older than N days and how to automate the process.
How to Remove an Element From an Array Completely in Bash
Filed under Scripting
Learn how to remove an element from a Bash array using positional offsets, selective copying, and utilities such as set, shift, and tac.
Guide to Converting Timestamps in a Column to a Date
Filed under Scripting
Learn how to convert timestamps in a column to a comprehensible date format
Directing the Output of wget to /dev/null in cron
Filed under Administration, Web
Learn the significance of disabling the output of the wget command in cron
Guide to Using sed to Remove Multi-Line Text Blocks
Filed under File Editing
Learn how to use GNU sed to remove multi-line text blocks in different scenarios.
Finding Duplicate Files With the Same Name
Filed under File Searching
Learn how to find files with duplicate names in any letter case using the find, ls, sed, awk, grep, and cut commands.
Check Whether a Container Is Running With docker-compose
Filed under Processes
Learn how to use the docker-compose command to check whether a container is running and how to make such checks more effective by adding a health check for the services.
Guide to Passing Bash Variables to jq
Learn how to make a jq program reusable by passing Bash variables to it.
How to Get Octal File Permissions From the Command Line
Filed under File Permissions
Learn how to get the octal permissions of files in Linux using the stat, find, sed, awk, and exa commands.
How to Get the HTTP Status of a Site Using cURL
Filed under Web
Learn how to connect to a site using cURL and retrieve the HTTP response status.
Guide to Passing Parameters to an Awk Script
Filed under Scripting
Learn how to write dynamic awk scripts by passing parameters.
How to Find All Files Containing a Specific Text Pattern
Filed under File Searching
Learn how to find all files containing a specific text pattern using Linux utilities like find, grep, and a few other alternatives.
How to grep Without Leading Whitespaces
Filed under File Searching
Learn how to use sed, awk, and shell parameter expansion to grep without leading whitespace.
Guide to Removing Trailing Newline From grep Output
Filed under Files
Learn multiple strategies to match a pattern using the grep command and remove the trailing newline from the output.
Replacing Specific Line With a String Variable in Shell
Filed under File Editing, Scripting
Learn how to use sed and awk to replace specific lines with a string variable
Guide to Downloading URLs Listed in a File Using cURL
Filed under Web
Learn a few ways to use the curl and wget commands for downloading a set of files listed in a file
How to Split a Text File Based on a Regular Expression
Filed under File Editing
Learn how to split a text file based on a regular expression with the help of a few popular text-processing utilities.
How to Replace the Nth Occurrence of a String Using sed
Filed under File Editing
Learn how to replace the nth occurrence of a pattern by using a few advanced concepts in sed.
Output Document and Headers to Stdout Using Wget
Filed under Web
Learn a few ways in which we can output the document and headers to the stdout using the wget command
Guide to Getting DST-Safe Relative Dates
Filed under Scripting
Learn how to get relative dates in a DST-safe manner.
The Conditional Variable Assignment Operator in a Makefile
Filed under Scripting
Learn the basics of using variables in a Makefile, followed by using the ?= operator for a more advanced use case
Redirect Output of a Process to a File and Standard Streams
Filed under Processes
Learn few common strategies to redirect the output of a process to a file and standard streams such as stdout and stderr simultaneously
Baeldung on Kotlin
- All
- Kotlin Collections (6)
- Kotlin Numbers (3)
- Kotlin Strings (2)
- Kotlin Dates (2)
- Kotlin Concurrency (1)
- Algorithms (1)
How to Convert Milliseconds to Minutes and Seconds in Kotlin
Filed under Kotlin Dates
Learn how to convert between units of duration in Kotlin.
Removing an Entry From a Kotlin Map While Iterating Over It
Filed under Kotlin Collections
Learn how to remove a map entry using on a condition on the key during iteration.
Count the Number of Vowels and Consonants in a Sentence in Kotlin
Filed under Kotlin Strings
Learn different ways to count the number of vowels and consonants in a sentence in Kotlin.
Find Average of All Items in a List in Kotlin
Filed under Kotlin Collections
Learn several approaches, such as loops, extension functions, and sequences, to calculate the average of all items in a Kotlin list.
Calculate Sum of the First N Natural Numbers in Kotlin
Filed under Kotlin Numbers
Learn several approaches, such as loops, extension functions, recursion, and sequences, to calculate the sum of the first N natural numbers in Kotlin.
Guide to Finding the Roots of a Quadratic Equation in Kotlin
Filed under Kotlin Numbers
Learn to solve a quadratic equation in Kotlin.
How to Check Leap Year in Kotlin
Filed under Kotlin Dates
Learn different ways to check for leap year in Kotlin.
Convert Octal Number to Decimal and Vice-Versa in Kotlin
Filed under Kotlin Numbers
Learn multiple techniques for converting decimal values to octal values and vice-versa.
Guide to Set and MutableSet in Kotlin
Filed under Kotlin Collections
Learn how to perform core operations, membership checks, and transformations using Set and MutableSet in Kotlin.
How to Check if a Number Is Part of the Fibonacci Series in Kotlin
Filed under Algorithms
Learn different ways in Kotlin to check whether a number is Fibonacci.
Guide to Base64 Encoding and Decoding Strings in Kotlin
Filed under Kotlin Strings
Learn the basics of Base64 encoding and explore a few popular ways to encode and decode strings to Base64 in Kotlin.
Guide to Comparing Arrays in Kotlin
Filed under Kotlin Collections
Learn how to do equality checks for arrays in Kotlin
Guide to Arrays in Kotlin
Filed under Kotlin Collections
Learn about Kotlin’s support for arrays
Guide to Kotlin’s yield Function
Filed under Kotlin Concurrency
Learn how the yield function works in Kotlin through examples with two use cases: building sequences and cooperative multitasking.
Remove Duplicate Values From an Array in Kotlin
Filed under Kotlin Collections
Learn how to remove duplicate values and entity objects from an array in Kotlin
Baeldung on Ops
- All
- Docker (2)
List Active Brokers in a Kafka Cluster Using Shell Commands
Filed under Docker
Explore few shell commands to get the list of active brokers in a running cluster
Guide to Setting Up Apache Kafka Using Docker
Filed under Docker
Learn how to create single-node and multi-node setups of Apache Kafka in Docker