Kubernetes events are automatically created when other resources have state changes, errors or other messages that should be broadcasted to the system. These events (logs) are very helpful for debugging issues in a Kubernetes cluster. In this note i will show how to get events from a specific Node in the Kubernetes cluster using the […]
Blog
Kubectl: Get Pods on Node
A Pod is a group of one or more containers with shared storage, network and lifecycle and is the basic deployable unit in Kubernetes. Each Pod is scheduled on the same Node, and remains there until termination or deletion. In this note i will show how to get Pods running on a specific Node using […]
Linux: Find Files by Name & Grep Contents
The Linux find command can be used for searching files and directories and performing subsequent operations on them. If you use the find command to recursively search for some files and then pipe the result to the grep command, by doing this you will actually parse the file paths/names but not their contents. This short […]
Jenkins: List All Jobs – Groovy Script
The easiest way to get a list of all Jenkins jobs is by executing an appropriate Groovy script using a Jenkins script console feature. This note shows two examples of Groovy scripts for listing the Jenkins jobs. The first script simply prints the list of all Jenkins jobs while the second one additionally lets you […]
Umount: Force – Target | Device is Busy
An umount command is used to unmount a device/partition by specifying the path to the directory where it has been mounted. Sometimes, when you run the umount command you may receive the “target is busy” or “device is busy” errors indicating that there is some process that is using the mounted filesystem or the remote […]
IP2Host: Get Hostname from IP – Command Line
A reverse name resolution zone file is used to translate an IP address in a particular namespace into a fully qualified domain name (FQDN). If this file has been configured on a name server, it becomes possible to find a hostname from an IP address. This note shows how to get a hostname from an […]
Kubectl: Set Default Namespace – Kubernetes
Out of the box, there is a Namespace called ‘default‘ in a Kubernetes cluster. By default, the kubectl command interacts with this ‘default‘ Namespace, but it can be changed to any other Namespace. In this note i will show how to set the default Namespace in Kubernetes.
Screen: Rename Session
A named screen session can be started by using the screen -S <sessionName> command. If you start a simple screen session, by default, it will be named as something like 55355.pts-0.hostname. No matter how the screen session has been started, it can be easily renamed at any time. This short note shows how to rename […]
What Active Directory Groups Am I In?
If your computer is running in a corporate environment, one day you may wonder which Active Directory (AD) groups your current user is a member of. The easiest way to see what AD groups i am a member of is by executing the appropriate commands from a command prompt (CMD or PowerShell) and this short […]
Find Out Text File Line Endings – LF or CLRF
A newline (also known as a line ending, end of line (EOL) or line break) is a character used to represent the end of a line of text and the beginning of a new line. Text files created on DOS/Windows machines have different line endings than files created on Unix/Linux. This note shows how to […]