1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "snapshotAt": "2026-10-01T12:00:00Z",
10 "asOf": "2026-10-01T12:00:30Z",
11 "maxAgeSeconds": 60,
12 "coverageComplete": True,
13 "targetNodes": ["node-1"],
14 "pods": [
15 {
16 "namespace": "app",
17 "name": "api-1",
18 "nodeName": "node-1",
19 "labels": { "app": "api" },
20 "ready": True,
21 "phase": "Running",
22 "ownerKind": "ReplicaSet",
23 "terminating": False,
24 },
25 {
26 "namespace": "app",
27 "name": "api-2",
28 "nodeName": "node-1",
29 "labels": { "app": "api" },
30 "ready": True,
31 "phase": "Running",
32 "ownerKind": "ReplicaSet",
33 "terminating": False,
34 },
35 ],
36 "budgets": [{
37 "namespace": "app",
38 "name": "api-budget",
39 "generation": 1,
40 "observedGeneration": 1,
41 "selector": { "matchLabels": { "app": "api" } },
42 "disruptionsAllowed": 1,
43 "currentHealthy": 2,
44 "desiredHealthy": 1,
45 "unhealthyPodEvictionPolicy": "IfHealthyBudget",
46 }],
47}
48
49
50run = client.actor("wheresprada/kubernetes-pdb-drain-snapshot-check").call(run_input=run_input)
51
52
53print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
54for item in client.dataset(run.default_dataset_id).iterate_items():
55 print(item)
56
57