How to monitor your Kubernetes Kapsule cluster with Cockpit
You may need certain IAM permissions to carry out some actions described on this page. This means:
- you are the Owner of the Scaleway Organization in which the actions will be carried out, or
- you are an IAM user of the Organization, with a policy granting you the necessary permission sets
- You have an account and are logged into the Scaleway console
- You have created a Kubernetes Kapsule cluster
- You have activated your observability Cockpit
- You have created a Grafana user for Cockpit
Scaleway’s observability Cockpit provides automated monitoring of your Kubernetes cluster. As Kubernetes environments grow in complexity, monitoring becomes crucial for optimal performance. Visualization of the clusters’ metrics is available in a hosted Grafana. Grafana’s rich visualizations and ease of use make it an ideal choice. Cockpit offers a hassle-free solution, providing real-time insights without extra infrastructure.
Cockpit empowers you to monitor the clusters’ control plane, nodes, managed resources and the cluster system applications.
- Detect incidents and diagnose failures in the earliest stages
- Get new insights on control plane and worker nodes usage such as CPU and memory to optimize your resource allocation
- Achieve a better understanding of your infrastructure by analyzing data on your API server, system applications and up/down scaling behavior
How to access your Cockpit Grafana dashboard
You must have activated your Cockpit. Cockpit’s free plan’s retention time is 31 days for metrics and 7 days for logs.
- Open your Cockpit in the Scaleway console.
- Click Manage Scaleway data. The Grafana interface opens in a new browser tab.
- Log into Grafana using your Cockpits’ Grafana user and password. The list of your Cockpit dashboards displays.
Note:
You must have created a Grafana user prior to login.
- Click Kubernetes Cluster Overview in the list of dashboards. A status overview of your cluster displays. This dashboard allows you to monitor multiple components of your Kubernetes cluster: control-plane, nodes, managed resources and cluster system applications.
Tip:
Select the cluster you want to display from the drop-down list at the top of the page to change the currently displayed cluster.
Monitoring of the kube-apiserver
The cluster overview dashboard offers real-time monitoring capabilities for the kube-apiserver
within your Kubernetes cluster. Serving as a crucial component on the control plane, the kube-apiserver
acts as the gateway to the Kubernetes API, allowing you to interact with the cluster.
Large clusters with numerous resources (nodes, pods, and custom resources (CRDs)) and high controller requests (e.g. argocd and velero) can cause CPU and memory spikes, leading to sluggish or unresponsive API server performance. You may also encounter errors like "EOF"
when using kubectl
.
To address this potential issue, it is crucial to monitor the CPU and RAM consumption of the apiserver closely. By doing so, you can proactively manage and reduce the load on the apiserver, thus averting performance bottlenecks.
For scenarios where you require consistent and predictable performance, along with dedicated resources for the apiserver, consider migrating it to a dedicated control plane to ensure optimal performance and stability.
How to view the Kubernetes control plane logs
- Open your Cockpit in the Scaleway console.
- Click Manage Scaleway data. The Grafana interface opens in a new browser tab.
- Log into Grafana using your Cockpits’ Grafana user and password. The list of your Cockpit dashboards displays.
- Click Kubernetes Cluster Logs in the list of dashboards. A listing of your control plane logs displays. This dashboard allows you to view the logs of multiple components of your Kubernetes cluster, such as the
controller-manager
,ccm
,kapsule-autoscaler
, and more.Note:Currently, no logs from the
kube-apiserver
are sent to your Cockpit.Tip:Select the cluster you want to display from the drop-down list at the top of the page to change the currently displayed cluster.