Custom node condition in Kubernetes

Sun 30 August 2020 by admin

When you go through node object in k8s you can see that there is a field called Conditions:

$ kubectl describe node kind-control-plane
  Type              Status  LastHeartbeatTime                 LastTransitionTime                Reason                       Message
  ----              ------  -----------------                 ------------------                ------                       -------
  MemoryPressure    False   Sun, 30 Aug 2020 10:54:31 +0200   Sun, 30 Aug 2020 10:53:23 +0200   KubeletHasSufficientMemory   kubelet has ...
read more

ICMP Echo permissions

Sun 23 August 2020 by admin

Network ping tool, one of the most widely used tool to debug network problem. It's mainly using ICMP protocol, due to specific security requirements to send/receive ICMP ECHO packets regular user is not allowed to use it. How can dealt with it on linux box ?

  • the easiest way ...
read more

gRPCurl - curl for gRPC

Sun 26 July 2020 by admin

In previous blog post How kubernetes is interacting with docker ? I was writing about dockershim with golang gRPC example code to get list of docker images. This example was trivial but writing code to get it wasn't trival, is there any generic tool to make such requests ? In HTTP ...

read more

CNI - the Container Network Interface

Sat 04 July 2020 by admin

CNI is simple interface based on environment variables and JSON config. Both environment variables and JSON config are processed by CNI plugin started by container management system like Kubernetes. CNI plugin is responsible for connecting container namespace into selected network, second responsibility for CNI is to provide IP address it ...

read more

Docker and Kubernetes at network layer

Sun 21 June 2020 by admin

I wrote some posts about how kubernetes is interacting with docker at CRI level, but what about networking ? Docker has developed it's own solution called CNM to maintain network, to interact with it just use commands under docker network. How it looks like in k8s multi node environment:

# docker ...
read more

dropwatch - discover where network packets are dropped

Sat 30 May 2020 by admin

Let's imagine situation where you experience network problem with dropping packets and you've no idea where the problem is located. So first of all prepare environment:

# iptables -A OUTPUT -p icmp -j DROP
# ping -c 3 -W 1
PING (8 ...
read more

mkubectx - single command across all your selected kubernetes contexts

Sun 10 May 2020 by admin

Pause - most popular container in k8s environment

Sat 02 May 2020 by admin

Probably the most popular container in kubernetes environment. Container image is really small:

$ docker images | grep -i pause                          3.2                 80d28bedfe5d        2 months ago        683kB

Codebase is also small pause. According to source code it is responsible for doing pretty... nothing, except of dealing ...

read more

How to change default k8s container runtime to containerd ?

Sun 26 April 2020 by admin

Default kubelet container runtime configuration use docker as CRI. Containerd has another implementation of CRI, it should fullfill the same requirements as docker so ie. it's responsible to maintain container images. Containerd extends its functionality by using plugins, one of them is cri. To interact with containerd we can ...

read more

How kubernetes is interacting with docker ?

Sun 19 April 2020 by admin

In a few words Container Runtime Interface is the answer to this questions. But we are going a little bit deeper. First of all what is CRI ? CRI is one of the most mature interface in kubernetes, it's a bridge between kubelet and container runtime. k8-diagram. Creating such interfaces in ...

read more