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 […]
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.
Imagine the situation, when you are starting a Deployment of some application on a Kubernetes cluster by running, for example, the kubectl create deployment command. Then you execute the kubectl get pods command to list the Pods, but it returns “No resource found“, that means the Deployment hasn’t created any Pods. Below i will show […]
Minikube is a single-node Kubernetes cluster that can be installed on macOS, Linux and Windows. It lets you to try out Kubernetes locally on your personal computer or use it for daily development work. In this note i will show how to install Minikube & Kubectl on Windows and deploy a first “Hello Minikube” application […]
During the first attempt to start Minikube you may receive the following error: “This computer doesn’t have VT-X/AMD-v enabled“. This error may occur even if virtualization is enabled in BIOS and you don’t have any issues with creating and running the virtual machines on your computer. This note shows a fast workaround of the error: […]
While troubleshooting Kubernetes-related issues it is useful to know how to increase the verbosity level of the main debugging tool – the kubectl command. The verbosity of the kubectl command is controlled by the -v or –v flags followed by an integer from 0 to 9 that represents the log level. In this note i […]
kubectl apply command is used to manage applications by creating and updating Kubernetes resources declared in configuration files. In addition to possibly to manage resources through individual files, there is a way to apply all the YAML files in a folder. In this short note i will show how to use the kubectl apply command […]
In this note i will show how to create a Deployment from the command line using the kubectl command. Below you will find the examples of how to deploy an Nginx Docker image on a Kubernetes cluster and how to update and scale it using the kubectl command only (without YAML configs). I will also […]
Minikube is a single-node Kubernetes cluster that can be installed on macOS, Linux and Windows. By default, it starts with 2 CPUs and 2GB of memory, that may not be enough for experiments with some heavy projects. This note describes 3 easy ways to start the Minikube with more memory and CPUs.
Application logs can be retrieved from a Pod in Kubernetes using kubectl command. In this note i will show how to get logs from a running Pod (including all replicas) and a previously crashed Pod. I will also show how to tail and follow logs from a Pod using kubectl command.