Kubernets: Health-Check & Port-Forwarding

HEALTH-CHECK

One of the features advanced and most important of Kubernetes is the health-check which allows you to control the integrity services.

It is an additional layer that adds to the standard controls that guarantee that the application processes are always running ( livenessProbe ), the application integrity controls ( ReadinessProbe )

The benefits of health-check are:

  • It’s customizable for any container
  • It uses the same application logic (for example, loading a web page or DB pings).
  • The livenessProbe determines if the application is working correctly. if not the application is restarted.
  • The ReadinessProbe describes when the container is ready to satisfy the user’s requests (it means the service is running)

The configuration of the health -check is done by adding the livenessProbe and ReadinessProbe items to the POD configuration yaml file (see figure 1)

Figure 1

PORT-FORWARDING

Port forwarding authorizes the service (configured at the POD level) to communicate both with other PODs and with the outside world. Without Port Forwarding, the service is totally isolated.

The simplest example is a website. As long as port-forwarding is not started, the pages of the site are not available to users.

In our example ( some-mysql ), after POD has started, the command to enable application port-forwarding on port 8000 is:

kubectl port forward some-mysql 8000: 8000

An article is available on the website www.gable.it that explores the networking issue of Container environments. To read it click here.

In a future article, we will talk about load balancers that help networking management.

See you Soon

 

Lascia un commento

Il tuo indirizzo email non sarĂ  pubblicato. I campi obbligatori sono contrassegnati *