Container Images Test
In Kubernetes, container images are used to package applications and their dependencies into portable units that can be consistently deployed and run across different environments. Kubernetes orchestrates these containers, managing their deployment, scaling, and networking. A container image, created from a Dockerfile or similar, includes the application code, runtime, libraries, and configurations needed. Kubernetes pulls these images from a container registry and runs them in pods, ensuring isolated and scalable application instances. This setup provides a robust way to manage complex applications, ensuring they run smoothly and efficiently in a cloud-native environment.
The Container Images test continuously monitors the images, and reports the number of images in use and how many out of which are not mapped to any container. It also reveals how much disk space is used by images mapped to containers and not mapped to containers. These metrics allow the administrator to take informed decision on deleting or archiving the images in case they are pressed for disk capacity,
Target of the test : A Kubernetes Worker Node
Agent deploying the test : A remote agent
Outputs of the test : One set of results for the target Kubernetes Worker node being monitored
Parameter |
Description |
---|---|
Test Period |
How often should the test be executed. |
Host |
The IP address of the host for which this test is to be configured. |
Port |
Specify the port at which the specified Host listens. By default, this is 6443. |
Use Sudo |
By default, the eG agent does not require any special permissions to parse and read messages from the log file to be monitored. This is why, the Use Sudo parameter is set to No by default. In some highly-secure Unix environments however, the eG agentinstall user may not have the permission to read the log file to be monitored. In such environments, you will have to follow the steps below to ensure that the test is able to read the log file and report metrics: Edit the SUDOERS file on the target host and append an entry of the following format to it: <eG_agent_install_user> ALL=(ALL) NOPASSWD: <Log_file_with_path> For instance, if the eG agent install user is eguser, and the log file to be monitored is /usr/bin/logs/procs.log, then the entry in the SUDOERS file should be: eguser ALL=(ALL) NOPASSWD: /usr/bin/logs/procs.log Finally, save the file. Then, when configuring this test using the eG admin interface, set the Use Sudo parameter to Yes. Once this is done, then every time the test runs, it will check whether the eG agent install user has the necessary permissions to read the log file. If the user does not have the permissions, then the test runs the sudo command to change the permissions of the user, so that the eG agent is able to read from the log file. |
DD Frequency |
Refers to the frequency with which detailed diagnosis measures are to be generated for this test. The default is 3:1. This indicates that, by default, detailed measures will be generated every third time this test runs, and also every time the test detects a problem. You can modify this frequency, if you so desire. Also, if you intend to disable the detailed diagnosis capability for this test, you can do so by specifying none against DD frequency. |
Detailed Diagnosis |
To make diagnosis more efficient and accurate, the eG Enterprise embeds an optional detailed diagnostic capability. With this capability, the eG agents can be configured to run detailed, more elaborate tests as and when specific problems are detected. To enable the detailed diagnosis capability of this test for a particular server, choose the On option. To disable the capability, click on the Off option. The option to selectively enable/disable the detailed diagnosis capability will be available only if the following conditions are fulfilled:
|
Measurement |
Description |
Measurement Unit |
Interpretation |
---|---|---|---|
Total Images |
Indicates the total number of images currently available. |
Number |
If the number of images is very high there is high chance that some of them are not being used. |
Images mapped to container |
Indicates the number of images which are being mapped to container and are actively used. |
Number |
If there is a small number of images that are actually mapped to containers, out of total images, there may be an opportunity of optimization. |
Images not mapped to container |
Indicates the number of images which are not mapped to any container and so are not being actively used. |
Number |
If there is a large number of images that are not mapped to containers, out of total images, there may be an opportunity of optimization. |
Disk space used by images mapped to containers |
Indicates the total disk space occupied by images which are mapped to containers and are in use. |
MB |
This is the actual disk space needed to run the application. |
Disk space used by images not mapped to any container |
Indicates the total disk space occupied by images which are not mapped to containers and are not in active use. |
MB |
This disk space can be cleared if required without affecting the application. |
The detailed diagnosis of the Images mapped to container measure reveals the Name of the image, ID of the image and Container to which this image belongs to.
Figure 1 : The detailed diagnosis of the Images mapped to container measure
The detailed diagnosis of the Images not mapped to container measure reveals the Name of the image, ID of the image and Container to which this image belongs to.
Figure 2 : The detailed diagnosis of the Images not mapped to container measure