Kubernetes simplifies container management by automating operational tasks and providing built-in commands for deploying applications, rolling out updates, scaling applications to meet changing demands, monitoring performance, and streamlining the overall application management process.
When you scan for a Kubernetes instance, you must consider the following prerequisites.
kubectl is the primary tool for interacting with Kubernetes clusters. It is used for managing cluster resources, executing commands against clusters, and accessing cluster configurations. Without kubectl, the control evaluation cannot perform necessary checks on the Kubernetes environment.
Pre-requisites:
For more information related to installation and configuration of kubectl, refer to the following links
Note: The kubectl utility successfully detects Kubernetes execution only when it is installed and has the necessary permissions.
A kubectl configuration file is referred to as a kubeconfig file, is a YAML-formatted file used by the kubectl command-line utility to configure access to Kubernetes clusters. This file contains authentication credentials, cluster information, context settings, and other configuration details necessary for kubectl to communicate with Kubernetes clusters.
Note: You can verify the kubeconfig file currently in use to ensure that it can be used for subsequent execution.
When the kubectl file is configured, the kubectl file must be present in one of the following locations:
Note: Kubernetes execution is successfully detected only when the kubeconfig file is present in any one of the above specified locations.
Scan Prerequisites Validation Script for Kubernetes
You must run the script. Execute the script kubernetes_scan_privilege_check.sh, Host Verification Script, with the root or sudo user.
This script helps validate all the prerequisites required to run the Kubernetes scan for policy compliance. Once the script is executed, it shows whether prerequisites are matched or misconfigured. You must continue to execute and fix the error until the message - All the prerequisite steps are satisfying to scan Kubernetes is displayed.