Controller HTTP API
The controller (kubesonde-controller-manager) serves an HTTP API on port 2709. Port-forward it to reach the endpoints locally:
kubectl --namespace kubesonde-system \
port-forward deployment.apps/kubesonde-controller-manager 2709 &All endpoints send permissive CORS headers, so the browser-based frontend can read them directly.
GET /probes
Returns the recorded probe state as a JSON object. This is the payload you export and load into the UI.
curl -s localhost:2709/probes > probes.jsonThe response is an object, not a bare array. The probes live under items:
{
"items": [ { "type": "Probe", "resultingAction": "Allow", ... } ],
"errors": [ { "reason": "command terminated with exit code 1", "value": { ... } } ],
"podNetworking": { "podA": [ { "port": "80", "ip": "10.0.0.1", "protocol": "TCP" } ] },
"podConfigurationNetworking": { "podA": [ { "port": "80", "ip": "", "protocol": "TCP" } ] }
}| Top-level field | Type | Description |
|---|---|---|
items | array | The recorded probes (see the fields below). |
errors | array | Probes that failed to run, each with a reason and the offending probe under value. |
podNetworking | object | Per-pod observed open ports, keyed by pod name: { pod: [{ port, ip, protocol }] }. |
podConfigurationNetworking | object | Per-pod ports declared in the pod's configuration, same shape as podNetworking. |
Each entry in items includes (fields are omitted when empty):
| Field | Type | Description |
|---|---|---|
type | string | Probe (a connection attempt) or Information. |
expectedAction | string | The asserted outcome, if you set expected — Allow or Deny. |
resultingAction | string | The observed outcome — Allow or Deny. |
source | object | Origin endpoint (see below). |
destination | object | Destination endpoint (see below). |
destinationHostnames | string[] | Hostnames resolved for the destination. |
protocol | string | Transport protocol. |
port | string | Destination port (defaults to 80). |
forwardedPort | string | Local forwarded port, when applicable. |
timestamp | int64 | Unix timestamp of the probe. |
debugOutput | string | Raw output of the request (e.g. the HTTP code for TCP). |
Each endpoint (source / destination) may include type (Pod, Service, or Internet), name, IPAddress, namespace, labels, deploymentName, and replicaSetName.
GET /probes/status
Reports whether probing has quiesced.
curl -s localhost:2709/probes/status{
"complete": true,
"count": 228,
"window": 30000000000,
"secondsSinceLastChange": 42.5
}| Field | Type | Description |
|---|---|---|
complete | bool | true when at least one probe has been recorded and the count has been stable for window. |
count | int | Number of recorded probe items. |
window | int | Quiescence window as a duration in nanoseconds (30000000000 = 30s). |
secondsSinceLastChange | float | How long the count has been stable, or -1 if no probes have been recorded yet. |
POST /probes/clear
Clears the recorded probe state on the controller. Useful when you want to re-run a scan from a clean slate without restarting the controller.
curl -s -X POST localhost:2709/probes/clearNotes
- The controller keeps probing after
completebecomestrue; polling/probesagain later can return more data. - Only
GETis accepted on the two read endpoints; other methods return405 Method Not Allowed.
