OOM Killer Doesn’t Work Properly [SOLVED]

An out-of-memory (OOM) killer is a mechanism of the Linux kernel that is supposed to terminate (kill) high memory consuming processes if a system is critically low on memory.

Unfortunately, the OOM killer doesn’t always work properly.

It often starts too late, when the system is already out of memory, so it doesn’t have enough memory for itself, that leads to the frozen system.

This note shows how to call the OOM killer earlier, before the system gets into an unresponsive state. (more…)

Kubectl: Get Events & Sort By Time

Kubernetes events are automatically created when 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.

Unfortunately, a kubectl get events command, by default, returns an unsorted list of the events that is not easy to search through.

This note shows how to get the events using the kubectl command and sort them by time. (more…)

Vi/Vim: Dark Background – Change Color Scheme

If you use vi/vim text editor in a terminal with a dark background it may be hard to read some text due to improperly configured color scheme.

For example, dark-blue comments on a black background in vi/vim make them almost unreadable.

By default, vi/vim is configured to work with a light background, i.e. has a set background=light setting.

If you use the dark background in your terminal, you need to change the background setting in vi/vim, that will lead to adjustment of a color scheme to the dark background and make the text readable.

This short note shows how to fix colors on the dark background in vi/vim. (more…)

Restart X Server – Ubuntu Linux

While working on a Linux systems like Ubuntu, Linux Mint, etc., through a graphical user interface (GUI) it may happen that some application will hang the GUI and freeze a system.

To unfreeze the system without rebooting a machine we can restart an X server (also known as X11, or just X) that is the default GUI environment on most Linux distributions.

This note shows how to restart the X server from a command line and unfreeze the system. (more…)

Kubectl: Run Pod With Command & Exec Into

Unless for very specific reasons, you should never run a Pod with a long-running application on its own, but use a Deployment for this.

Nevertheless, if you want to quickly run some container image on Kubernetes resources, you can use a kubectl run command.

For example, i often need to run the Pod on a Kubernetes cluster that starts a container from a wbitt/network-multitool image for container/network testing and troubleshooting.

This note shows how to run the Pod with the kubectl run command and how to log into the running Pod and start an interactive bash or sh session using the kubectl exec command. (more…)

Helm: Get Values

When you install a Helm chart into a Kubernetes cluster you can pass custom values to configure the release.

Comparing versions of Helm values and reviewing old releases is a good practice for keeping track of changes.

Below you will find how to get values of a Helm chart release using a helm get values command. (more…)