π Kubectl: Force Delete Namespace Stuck In Terminating
Sometimes a deletion of a Namespace in Kubernetes gets hung up and the
Such Namespaces get stuck in a Terminating state but can be manually deleted using a Kubernetes API.
This note shows how to force delete the Terminating Namespaces in Kubernetes using the
π Continue Reading
Sometimes a deletion of a Namespace in Kubernetes gets hung up and the
kubectl delete namespace
command never completes.Such Namespaces get stuck in a Terminating state but can be manually deleted using a Kubernetes API.
This note shows how to force delete the Terminating Namespaces in Kubernetes using the
kubectl
command. π Continue Reading
ShellHacks
Kubectl: Force Delete Namespace Stuck In Terminating - ShellHacks
How to force delete a Kubernetes Namespace that is stuck in a "Terminating" state using the `kubectl` command.
π 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
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
π Continue Reading
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. π Continue Reading
ShellHacks
Kubectl: Run Pod With Command & Exec Into - ShellHacks
How to run a Pod with a `kubectl run` command and how to log into a running Pod and start an interactive `bash` or `sh` session using a `kubectl exec` command.
π 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.
π Continue Reading
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.
π Continue Reading
ShellHacks
Restart X Server - Ubuntu Linux - ShellHacks
How to restart an X server (GUI) from a command line and unfreeze a hanged system on Ubuntu, Linux Mint, etc.
π Helm Upgrade: Update Chart Values β Example
When you upgrade a Helm chart in a Kubernetes cluster you can also customize parameters of the chart to configure a release.
The Helm chart parameters customization is carried out by updating Ρhart values.
This note shows how to update a Helm chart with new values using a
π Continue Reading
When you upgrade a Helm chart in a Kubernetes cluster you can also customize parameters of the chart to configure a release.
The Helm chart parameters customization is carried out by updating Ρhart values.
This note shows how to update a Helm chart with new values using a
helm upgrade
command. π Continue Reading
ShellHacks
Helm Upgrade: Update Chart Values - Example - ShellHacks
How to update a Helm chart with new values using a `helm upgrade` command with examples.
π Helm: Dry Run & Template Debug
Helm uses a packaging format called charts (a collection of Kubernetes resource files).
This note shows how to
It also shows how to lint and render Helm chart YAMLs locally (without sending them to a Kubernetes API server).
π Continue Reading
Helm uses a packaging format called charts (a collection of Kubernetes resource files).
This note shows how to
--dry-run
and --debug
Helm chart templates with examples.It also shows how to lint and render Helm chart YAMLs locally (without sending them to a Kubernetes API server).
π Continue Reading
ShellHacks
Helm: Dry Run & Template Debug - ShellHacks
Examples of how to `--dry-run` and `--debug` Helm chart templates and how to lint and render YAMLs locally (without connecting to a Kubernetes API server).
π Vi/Vim: Dark Background β Change Color Scheme
If you use
For example, dark-blue comments on a black background in
By default,
If you use the dark background in your terminal, you need to change the
This short note shows how to fix colors on the dark background in
π Continue Reading
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
. π Continue Reading
ShellHacks
Vi/Vim: Dark Background - Change Color Scheme - ShellHacks
How to `set background=dark` in Vi/Vim to change a color scheme on the dark background and make a text readable.
π 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
This note shows how to get the events using the
π Continue Reading
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. π Continue Reading
ShellHacks
Kubectl: Get Events & Sort By Time - ShellHacks
How to get events in a Kubernetes cluster and sort them by time using a `kubectl` command.
π 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.
π Continue Reading
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.
π Continue Reading
ShellHacks
OOM Killer Doesn't Work Properly [SOLVED] - ShellHacks
How to fix an OOM Killer if it doesn't work properly and doesn't save a system from freezing when it gets critically low on memory.
π VLC: Change Preferred Audio Language Order
VLC Media Player can play video files with multiple audio tracks.
The audio track can be selected in "Audio" → "Audio Track" menu.
If you watch some series with a default language that doesn't suit you, you would have to manually change the audio track for each episode, that may be a bit annoying.
Luckily, in VLC we can change the default audio language order to a preferred one and in this short note i will show how to do this.
π Continue Reading
VLC Media Player can play video files with multiple audio tracks.
The audio track can be selected in "Audio" → "Audio Track" menu.
If you watch some series with a default language that doesn't suit you, you would have to manually change the audio track for each episode, that may be a bit annoying.
Luckily, in VLC we can change the default audio language order to a preferred one and in this short note i will show how to do this.
π Continue Reading
ShellHacks
VLC: Change Preferred Audio Language Order - ShellHacks
How to change the preferred audio language order in VLC by default.
π Raspberry Pi: Wake from Sleep β Command
While using a Raspberry Pi (RPi) connected to a monitor or TV over HDMI, you may notice that the screen will be automatically put to sleep after a certain amount of time of inactivity.
To wake the RPi up it is usually enough just to move a mouse or press some key button.
But this can be more challenging if you can't use the mouse or keyboard to unblank the screen, e.g. you are connected remotely over SSH and it seem the only thing you can do is to reboot the RPi.
Lucky there is a way to wake the RPi and unblank the screen from a terminal by changing display power management and screen saver settings.
π Continue Reading
While using a Raspberry Pi (RPi) connected to a monitor or TV over HDMI, you may notice that the screen will be automatically put to sleep after a certain amount of time of inactivity.
To wake the RPi up it is usually enough just to move a mouse or press some key button.
But this can be more challenging if you can't use the mouse or keyboard to unblank the screen, e.g. you are connected remotely over SSH and it seem the only thing you can do is to reboot the RPi.
Lucky there is a way to wake the RPi and unblank the screen from a terminal by changing display power management and screen saver settings.
π Continue Reading
ShellHacks
Raspberry Pi: Wake from Sleep - Command - ShellHacks
How to wake Raspberry Pi (RPi) from sleep and unblank a screen from a terminal over SSH by changing display power management and screen saver settings.
π MikroTik: Default IP, Login & Password
To get access to any of MikroTik routers you need to know an IP address of the router and credentials, i.e. a username and password.
All the MikroTik routers are pre-configured with the default IP address as well as with the the default username and password.
π Continue Reading
To get access to any of MikroTik routers you need to know an IP address of the router and credentials, i.e. a username and password.
All the MikroTik routers are pre-configured with the default IP address as well as with the the default username and password.
π Continue Reading
ShellHacks
MikroTik: Default IP, Login & Password - ShellHacks
This note contains information about the default MikroTik router IP, login/password and how to connect to a management interface.
π Kubectl: Get Pod Containers
According to best practices you should always try to have one container per Pod, and this is the most common Kubernetes use case.
However, a Pod can contain multiple containers and the primary reason for this is to support helper applications that assist a primary application.
Typical examples of helper applications are data pullers, data pushers and proxies.
This short note shows how to get Pod containers using a
π Continue Reading
According to best practices you should always try to have one container per Pod, and this is the most common Kubernetes use case.
However, a Pod can contain multiple containers and the primary reason for this is to support helper applications that assist a primary application.
Typical examples of helper applications are data pullers, data pushers and proxies.
This short note shows how to get Pod containers using a
kubectl
command, and also how to get logs and log into the particular container running inside the Pod. π Continue Reading
ShellHacks
Kubectl: Get Pod Containers - ShellHacks
How to get Pod containers (list names and details) and how to get logs or log into the particular container running inside the Pod.
π Copy as Path: Get Full Path of File on Windows
An absolute path, also known as a full path, on Windows systems represents the complete details needed to locate a file or folder, starting from a drive letter (e.g.
Once you have located the desired file or folder in a File Explorer, there is a simple way to get the full path and copy it to a clipboard.
This short note shows how to unlock a "Copy as path" Windows feature to get the full path to the file or folder quickly and easily.
π Continue Reading
An absolute path, also known as a full path, on Windows systems represents the complete details needed to locate a file or folder, starting from a drive letter (e.g.
C:\
), including all sub-folders and ending with the file or folder name.Once you have located the desired file or folder in a File Explorer, there is a simple way to get the full path and copy it to a clipboard.
This short note shows how to unlock a "Copy as path" Windows feature to get the full path to the file or folder quickly and easily.
π Continue Reading
ShellHacks
Copy as Path: Get Full Path of File on Windows - ShellHacks
Quick and easy way of getting a file or folder full path on Windows and coping it to a clipboard by using a hidden "Copy as path" feature.
π Windows: Uninstalled Programs History
In Windows you can easily get a list of installed apps with the installation dates through a "Programs and Features" (press β Win + R to start the "Run" dialog and type in
To get a history of uninstalled programs is a bit more challenging, but is still possible using an "Event Viewer".
In the "Event Viewer" we can list the changes made by an
Additionally, we can filter out that list by the event ID
Below you will find how to check the uninstalled programs history in Windows and how to find out who has uninstalled a program and when.
π Continue Reading
In Windows you can easily get a list of installed apps with the installation dates through a "Programs and Features" (press β Win + R to start the "Run" dialog and type in
appwiz.cpl
and click "OK").To get a history of uninstalled programs is a bit more challenging, but is still possible using an "Event Viewer".
In the "Event Viewer" we can list the changes made by an
MsiInstaller
- the tool that Windows uses for any installations and uninstallations of applications.Additionally, we can filter out that list by the event ID
1034
, that exactly corresponds to the program uninstallation events.Below you will find how to check the uninstalled programs history in Windows and how to find out who has uninstalled a program and when.
π Continue Reading
ShellHacks
Windows: Uninstalled Programs History - ShellHacks
How to check the uninstalled programs history in Windows and find out who has uninstalled a program and when.
π Reset MikroTik Router
A MikroTik router reset, hard reset, factory reset and configuration reset are all synonyms for resetting the device to its original defaults.
If you reset your MikroTik router, you'll clear its configuration and return it to the original state it was in when you purchased it.
For example, if you forget a password to the MikroTik router, you might reset it to factory settings so it returns to the default password it originally came with.
Below you will find a short instructions of how to reset your MikroTik router.
π Continue Reading
A MikroTik router reset, hard reset, factory reset and configuration reset are all synonyms for resetting the device to its original defaults.
If you reset your MikroTik router, you'll clear its configuration and return it to the original state it was in when you purchased it.
For example, if you forget a password to the MikroTik router, you might reset it to factory settings so it returns to the default password it originally came with.
Below you will find a short instructions of how to reset your MikroTik router.
π Continue Reading
ShellHacks
Reset MikroTik Router - ShellHacks
How to reset a MikroTik router (hard reset, factory reset, configuration reset) and return it to the original (default) state.
π Connect To MikroTik Router For a First Time
MikroTik routers are very powerful, flexible and are widely used in all kinds of environments from a simple home to a large enterprise network.
For ones who are not familiar with networking and with the MikroTik routers particularly, it might be a bit challenging to connect to the new MikroTik router for the first time and access its management interface for the initial configuration.
From this article you will find out how to connect to the new MikroTik router for the first time using a direct connection via an Ethernet cable, connection over WiFi or through an ISP's (internet service provider) router.
π Continue Reading
MikroTik routers are very powerful, flexible and are widely used in all kinds of environments from a simple home to a large enterprise network.
For ones who are not familiar with networking and with the MikroTik routers particularly, it might be a bit challenging to connect to the new MikroTik router for the first time and access its management interface for the initial configuration.
From this article you will find out how to connect to the new MikroTik router for the first time using a direct connection via an Ethernet cable, connection over WiFi or through an ISP's (internet service provider) router.
π Continue Reading
ShellHacks
Connect To MikroTik Router For a First Time - ShellHacks
How to how to connect to a new MikroTik router for a first time using a direct connection via an Ethernet cable, over WiFi or through an ISP router.
π [SOLVED] The Container Name Is Already In Use By Container
While starting a Docker container, you may sometimes receive "the container name is already in use by container" error.
The complete error looks like as follows:
ERROR: for <containerName> Cannot create container for service <serviceName>: Conflict. The container name "<containerName>" is already in use by container "<containerID>". You have to remove (or rename) that container to be able to reuse that name.
This short note shows how to fix "the container name is already in use by container" error.
π Continue Reading
While starting a Docker container, you may sometimes receive "the container name is already in use by container" error.
The complete error looks like as follows:
ERROR: for <containerName> Cannot create container for service <serviceName>: Conflict. The container name "<containerName>" is already in use by container "<containerID>". You have to remove (or rename) that container to be able to reuse that name.
This short note shows how to fix "the container name is already in use by container" error.
π Continue Reading
ShellHacks
[SOLVED] The Container Name Is Already In Use By Container - ShellHacks
How to fix "the container name is already in use by container" error while starting a Docker container.
π1
π MikroTik: Clear Terminal Screen
When you're working in a command line interface you may sometimes have a desire to empty a terminal screen from messages and keyboard input.
Depending on an operating system there should be a command that can erase the contents of your terminal and display a prompt only (for example a
Although a MikroTik RouterOS is based on Linux, there is no a command to clear the screen.
Nevertheless the terminal screen in the MikroTik RouterOS can be cleared using a keyboard shortcut.
π Continue Reading
When you're working in a command line interface you may sometimes have a desire to empty a terminal screen from messages and keyboard input.
Depending on an operating system there should be a command that can erase the contents of your terminal and display a prompt only (for example a
clear
command in Linux or a cls
command in Windows).Although a MikroTik RouterOS is based on Linux, there is no a command to clear the screen.
Nevertheless the terminal screen in the MikroTik RouterOS can be cleared using a keyboard shortcut.
π Continue Reading
ShellHacks
MikroTik: Clear Terminal Screen - ShellHacks
How to clear a screen in a MikroTik RouterOS terminal using a keyboard shortcut.
π Kustomize: Change Image, Tag or Registry
Kustomize is a tool for customizing Kubernetes configurations.
Like for secrets, in Kustomize, there is a custom directive that allows to easily override names, tags and change registries (repositories) of container images (e.g. Docker images).
This short note shows how to change the image name, tag or registry using Kustomize.
π Continue Reading
Kustomize is a tool for customizing Kubernetes configurations.
Like for secrets, in Kustomize, there is a custom directive that allows to easily override names, tags and change registries (repositories) of container images (e.g. Docker images).
This short note shows how to change the image name, tag or registry using Kustomize.
π Continue Reading
ShellHacks
Kustomize: Change Image, Tag or Registry - ShellHacks
How to easily change (override) a container image name, tag or registry (repository) using Kustomize.
π Kubectl: Dry Run β Client | Server β Command Examples
A
With the
The dry-run mode is useful to see what will the
This short note shows different examples of how to run the
π Continue Reading
A
kubectl
command can be used to create, delete or updated resources on a Kubernetes cluster.With the
--dry-run=(client|server)
flag, the kubectl
command can be used to only preview an object, without really submitting it to the Kubernetes cluster.The dry-run mode is useful to see what will the
kubectl
command do without actually changing anything.This short note shows different examples of how to run the
kubectl
command in the dry-run mode. π Continue Reading
ShellHacks
Kubectl: Dry Run - Client | Server - Command Examples - ShellHacks
The examples of how to run a `kubectl` command in a dry-run mode to see what it will do, without actually changing anything on a Kubernetes cluster.