Kubernetes
read_pod_logs
Fetch logs for all the pods matching a name or label selector
Count the number of pods matching the given selector
Below are the details and signature of the activity Python module.
Type | probe |
Module | chaosk8s.pod.probes |
Name | count_pods |
Return | integer |
Usage
JSON
{
"name": "count-pods",
"type": "probe",
"provider": {
"type": "python",
"module": "chaosk8s.pod.probes",
"func": "count_pods",
"arguments": {
"label_selector": ""
}
}
}
YAML
name: count-pods
provider:
arguments:
label_selector: ''
func: count_pods
module: chaosk8s.pod.probes
type: python
type: probe
Arguments
Name | Type | Default | Required |
---|---|---|---|
label_selector | string | Yes | |
phase | string | null | No |
ns | string | “default” | No |
Signature
def count_pods(label_selector: str,
phase: str = None,
ns: str = 'default',
secrets: Dict[str, Dict[str, str]] = None) -> int:
pass