Container Engine for Kubernetes Metrics
Find out about the metrics emitted by Container Engine for Kubernetes (OKE).
You can monitor the health, capacity, and performance of Kubernetes clusters managed by Container Engine for Kubernetes using metrics , alarms , and notifications.
This topic describes the metrics emitted by Container Engine for Kubernetes in the
oci_oke metric namespace.
Resources: clusters, worker nodes
Overview of the Container Engine for Kubernetes Service Metrics
Container Engine for Kubernetes metrics help you monitor Kubernetes clusters, along with node pools and individual worker nodes. You can use metrics data to diagnose and troubleshoot cluster and node pool issues.
While frequency varies by metric, default service metrics typically have a frequency of 60 seconds (that is, at least one data point posted per minute).
To view a default set of metrics charts in the Console, navigate to the cluster you're interested in, and then click Metrics. You also can use the Monitoring service to create custom queries. See Building Metric Queries.
IAM policies: To monitor resources, you must have the required type of access in a policy written by an administrator, whether you're using the Console or the REST API with an SDK, CLI, or other tool. The policy must give you access to the monitoring services as well as the resources being monitored. If you try to perform an action and get a message that you don’t have permission or are unauthorized, confirm with your administrator the type of access you have and which compartment you should work in. For more information about user authorizations for monitoring, see IAM Policies (Monitoring).
Available Metrics: oci_oke
The metrics listed in the following tables are automatically available for any Kubernetes clusters you create. You do not need to enable monitoring on the resource to get these metrics.
Container Engine for Kubernetes metrics include the following dimensions:
- The OCID of the resource to which the metric applies.
- The name of the resource to which the metric applies.
- The response code sent from the Kubernetes API server.
- The response code group, based on the response code's first digit (for example, 2xx, 3xx, 4xx, 5xx).
- The OCID of the cluster to which the metric applies.
- The OCID of the node pool to which the metric applies.
- The state of the compute instance hosting the worker node. For example, ACTIVE, CREATING, DELETING, DELETED, FAILED, UPDATING, INACTIVE.
- The condition of the worker node, as indicated by the Kubernetes API server. For example, Ready, MemoryPressure, PIDPressure, DiskPressure, NetworkUnavailable.
- The availability domain where the compute instance resides.
- The fault domain where the compute instance resides.
|Metric||Metric Display Name||Unit||Description||Dimensions|
||API Server Requests||count||Number of requests received by the Kubernetes API Server.||
||API Server Response Count||count||Number of different non-200 responses (that is, error responses) sent from the Kubernetes API server.||
||Unschedulable Pods||count||Number of pods that the Kubernetes scheduler is unable to schedule. Not available in clusters running versions of Kubernetes prior to version 1.15.x.||
||Node State||count||Number of compute nodes in different states.||
||Kubernetes Node Condition||count||
Number of worker nodes in different conditions, as indicated by the Kubernetes API server.
Using the Console
- In the Console, open the navigation menu and click Developer Services. Under Containers & Artifacts, click Kubernetes Clusters (OKE).
- Select the region you are using with Container Engine for Kubernetes.
Select the compartment containing the cluster for which you want to view metrics.
The Clusters page shows all the clusters in the compartment you selected.
- Click the name of the cluster for which you want to view metrics.
Under Resources, click Metrics.
The Metrics tab displays a chart for each metric for the cluster that is emitted by the Container Engine for Kubernetes metric namespace. To see metrics for a node pool in the cluster, display the Node Pools tab, click the name of the node pool, and display the Metrics tab. To see metrics for a worker node in the node pool, display the Nodes tab and click the View Metrics link beside the name of the worker node. For more information about the emitted metrics, see Available Metrics: oci_oke.
If you don't see the metrics data for a cluster that you expect, see the following possible causes and resolutions.
|Problem||Possible Cause||How to check||Resolution|
I know the Kubernetes API server returned some error responses but the API Server Response Count chart doesn't show them.
|The responses might have been returned outside the time period covered by the API Server Response Count chart.||Confirm the Start Time and End Time cover the period when the responses were returned.||Adjust the Start Time and End Time as necessary.|
|I know the Kubernetes API server returned some error responses but the API Server Response Count chart doesn't show them, even though the responses were returned between the Start Time and End Time.||Although the responses were returned between the Start Time and End Time, the x-axis (window of data display) might be excluding the responses.||Confirm the x-axis (window of data display) covers the period when the responses were returned.||Adjust the x-axis (window of data display) as necessary.|
|I want to see data in the charts as a continuous line over time, but the line has gaps in it.||This is expected behavior. If there is no metrics data to show in the selected interval, the data line is discontinuous.||Increase the Interval (for example, from 1 minute to 5 minutes, or from 1 minute to 1 hour).||Adjust the Interval as necessary.|