Skip to content

Commit

Permalink
feat(k8s): update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
bene2k1 committed Jan 30, 2025
1 parent 7a21933 commit 9933eb6
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions pages/kubernetes/how-to/monitor-data-plane-with-cockpit.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
meta:
title: How to monitor your Kubernetes Kapsule data plane with Cockpit
title: How to monitor your Kubernetes Kapsule cluster with Cockpit using Promtail
description: This page explains how to integrate Kubernetes container logs with Scaleway Cockpit using Promtail
content:
h1: How to monitor your Kubernetes Kapsule data plane with Cockpit
h1: How to monitor your Kubernetes Kapsule cluster with Cockpit using Promtail
paragraph: This page explains how to integrate Kubernetes container logs with Scaleway Cockpit using Promtail
categories:
- iot-hub
Expand Down Expand Up @@ -53,8 +53,9 @@ The system leverages **Promtail** (a lightweight log collector) running on your
1. **Promtail** can collect logs from:
- **Container stdout/stderr** (pods)
- **systemd journal** (e.g., `kubelet.service`)
2. **Log data** is transmitted to **Cockpit** (Loki).
3. **Cockpit** stores and indexes these logs.
2. The app automatically creates a custom datasource called `kubernetes-logs` and a Cockpit token with push logs permission.
3. **Log data** is transmitted to **Cockpit** (Loki).
4. **Cockpit** stores and indexes these logs.

## Step-by-step: Enabling container logs in Cockpit

Expand All @@ -74,7 +75,7 @@ You can use Scaleway’s **[Easy Deploy](/kubernetes/how-to/enable-easy-deploy/)
cockpit_promtail_scrape_config_journal: "kubelet.service,kube-proxy.service"
```
</Message>
### Example Promtail configuration
Below is a simplified snippet of the configuration that Easy Deploy generates by default:
```yaml
Expand Down Expand Up @@ -104,13 +105,15 @@ extraVolumes:

Once Promtail is running:

1. Go to **Cockpit**, then **Kubernetes Cluster Pod Logs** (or open your own Grafana connected to Cockpit).
2. **Filter** by:
1. Go to the **Cockpit** section of the Scaleway console, then click **Open dashboards**.
2. Log into Grafana using your [Cockpit credentials](/cockpit/how-to/retrieve-grafana-credentials/).
3. In Grafana's menu, go to dashboards and select **Kubernetes Cluster Pod Log**.
4. **Filter** by:
- `Datasource` which is automatically created upon deployment, and visible in the Cockpit console
- `Cluster Name` ( e.g. `my-kapsule-cluster`)
- `namespace`, `pod`, or `container` labels to isolate specific workloads
- **Time range** to limit how far back in history you want to query
3. **Analyze** logs in real-time or historical mode to troubleshoot issues, watch for errors, or track performance.
5. **Analyze** logs in real-time or historical mode to troubleshoot issues, watch for errors, or track performance.

## Usage and pricing

Expand Down

0 comments on commit 9933eb6

Please sign in to comment.