Managing the capacity of your Kubernetes infrastructure
As a Kubernetes Technology Specialist, you can use BMC Helix Continuous Optimization to configure, administer, and manage the capacity of your Kubernetes infrastructure.
As the flow diagram illustrates, the data source (Kubernetes ETL) collects data from the Kubernetes infrastructure elements. The collected data is processed by the Data Processing engine in , and then displayed on the user interface. You can use the product features to review, analyze, and manage the capacity of your Kubernetes infrastructure providers and consumers.
BMC Helix Continuous Optimization enables you to collect and manage data for the Kubernetes infrastructure elements:
- Providers are infrastructure elements with the physical resources, such as CPU, memory, storage, and that provides these resources to a Consumer. For example, clusters, namespaces, and nodes.
- Consumers are logical or virtual infrastructure elements that consume or use the resources from a Provider. For example, deployments or controllers, pod workloads, and containers.
The following sections describe how you can achieve these goals:
About Kubernetes Pods and Pod Workloads
In Kubernetes, pods are ephemeral. When a pod is created, it is assigned a unique ID and scheduled to nodes where it remains until it is terminated, according to the restart policy. Each time a pod migrates to a new host or it is restarted, the pod is replaced by a new pod with a different ID.
A Pod Workload is an aggregate representation of all ephemeral pod instances over a longer period. It is a set of pod instances that are running on the same controller, allowing you to follow a pod through its entire life cycle. By using the Moviri Integrator for BMC Helix Capacity Optimization – k8s (Kubernetes) Prometheus ETL, BMC Helix Continuous Optimization provides continuous data of the Pod Workloads. The continuous data enables an administrator to perform advanced analysis, use modeling techniques to predict the IT resource requirements, and to analyze the utilization trends.
For each Pod Workload instance, BMC Helix Continuous Optimization provides the following metrics:
- Capacity-relevant metrics for the pod workloads that are consuming the average, the highest, and the lowest resources within the pod workload. For example, CPU Utilization, Memory Utilization.
- Capacity-relevant metrics for a unique combination of each container and image that are consuming the average, the highest, and the lowest resources within the pod workload. For example, CPU Utilization, Memory Utilization.
Managing the capacity of Kubernetes infrastructure providers
You can analyze and manage the capacity of your Kubernetes infrastructure providers by using the Kubernetes view. For the infrastructure data to be available in the view, the Administrator must first set up the data source to collect data.
Task 1. Collect data and install the views
As an Administrator, use the following Moviri ETL to collect data for your Kubernetes provider:
After data collection starts, data is loaded daily and Indicators are available in the Workspace tab.
As an Administrator, you must install the Kubernetes views and grant the necessary permissions to Kubernetes Technology Specialists to access these views.
Task 2. Analyze the collected data
To get a high-level view of the infrastructure usage and health, use the out-of-the-box Kubernetes-view.
The following common use cases are described here:
Understand the usage and health of your Kubernetes providers
Monitor the resources in the clusters, nodes, and namespaces for a high-level understanding of their usage and health.
You can drill down into a specific component for detailed analysis. For details, see Kubernetes-view.
Understand the resource capacity, request, and utilization trend of your Kubernetes providers
Review and analyze the metrics on the Capacity tab of a provider in the Kubernetes view. The utilization of resources (CPU, Memory) is also reported as a percentage of the total requested resources with respect to the total capacity of the resource.
Use the metrics help you understand the total capacity of the provider and the minimum resources that you can request. For details, see Clusters page and Nodes page in the Kubernetes-view section.
Determine and analyze the requested quota and limit of each resource for the namespaces
Review and analyze the relevant metrics on the Namespaces page in the Kubernetes view to determine the available limit of the CPU, Memory, and Pod resources with respect to the allocated quota of each resource. You can also view the requested metrics for CPU and memory and confirm that the quota for a namespace is exhausted. The metrics help you determine how to control the resources in use.
Analyze the available resources for persistent volumes
Review the details of persistent volumes configured for each Kubernetes cluster in the Storage tab. For example, you can analyze the total number of persistent volumes for a cluster and the percentage of storage allocated with respect to capacity.
Evaluate the spare capacity of Kubernetes clusters
Review the estimate of additional pods that can be added to a cluster in the Clusters > Capacity page of the Kubernetes view. This estimate is based on a typical Pod configuration, which is automatically computed. By using this estimate, you can identify clusters that have residual or spare capacity and determine the deployment of new pod workloads in a Kubernetes cluster to use resources optimally.
Identify the providers that are at risk of saturation or already saturated
Use the Recommendations-page-in-the-Kubernetes-view to get a quick view of the Kubernetes infrastructure providers that have exhausted or exhausting resources (CPU, memory, storage). The page also provides out-of-the-box recommendations to help you take appropriate action on these elements to resolve the issue.
Managing the capacity of Kubernetes infrastructure consumers
You can analyze and manage the capacity of your Kubernetes infrastructure consumers by using the Kubernetes view. For the data to be available in the view, the Administrator must first configure data collection.
Task 1. Collect data and install the views
As an Administrator, you can use the following Moviri ETL module to collect data for your Kubernetes consumers:
After data collection starts, data is loaded daily and Indicators are available in the Workspace.
As an Administrator, you must install the Kubernetes view and grant the necessary permissions to Kubernetes Technology Specialists to access these views.
Task 2. Analyze the collected data
Use the Kubernetes views to analyze the imported data of Pod Workloads and Controllers. The Kubernetes views display the metrics collected by the ETL.
The following common use cases are described here:
Analyze the available resources with respect to the request and limit
Review the details on the Controllers page to identify and analyze the utilization metrics of the controllers at a higher granularity. For example, the percentage of CPU and memory utilization of a controller with respect to the requested resources and the limit available.
Review the absolute resource utilization for a controller
Review and analyze the absolute usage, request, and limit of resources (CPU, memory) for a controller and the utilization percentage with respect to the request and limit. You can view the metrics on the CPU and Memory tabs and take action for the resources that are nearing the consumption limit.
Identify the pod workloads that are at risk of saturation or already saturated
Use the Pod details links on the Namespaces and Nodes tab to identify the pod workloads that are at risk of saturation or already saturated.
You can drill down to a specific pod workload for detailed analysis.
Analyze the pod status and resource utilization
Review the details on the Pods tab to analyze the number of pods in a cluster, the pod status, and the CPU and memory usage with respect to the request and limit.
Identify containers that are at risk of saturation or already saturated
Use the Recommendations-page-in-the-Kubernetes-view to identify Kubernetes containers that are at risk of saturation or already saturated. The page also provides out-of-the-box recommendations to help you take appropriate action on these elements to resolve the issue.
Identify overallocated containers
Use the Recommendations-page-in-the-Kubernetes-view to identify Kubernetes containers that are overallocated. The page also provides out-of-the-box recommendations to help you take appropriate action on these elements to resolve the issue.
Performing advanced analysis
The earlier sections explained how you can use the out-of-the-box capacity Kubernetes views to manage your environment. These Kubernetes views help you analyze your Kubernetes infrastructure by using a predefined set of metrics.
To perform advanced analysis on the imported Kubernetes data, such as identifying specific performance issues, trends, and bottlenecks, you can use Analysis. For more information, see Analyzing-domain-data.
Managing the future demand
By using the analysis charts, you can analyze the data of your existing capacity. To predict and plan your IT resource needs, use Models. For more information, see Modeling-capacity-usage.