Kubernetes
probe Pod

# pods_not_in_phase

Lookup a pod by `label_selector` in the namespace `ns`

Run it now
View details

Type | probe
Module | chaosk8s.pod.probes
Name | pods_not_in_phase
Return | boolean

Usage

JSON

    {
      "name": "pods-not-in-phase",
      "type": "probe",
      "provider": {
        "type": "python",
        "module": "chaosk8s.pod.probes",
        "func": "pods_not_in_phase",
        "arguments": {
          "label_selector": ""
        }
      }
    }

YAML

    name: pods-not-in-phase
    provider:
      arguments:
        label_selector: ""
      func: pods_not_in_phase
      module: chaosk8s.pod.probes
      type: python
    type: probe

Arguments

Name | Type | Default | Required | Title | Description
--- | --- | --- | --- | --- | ---
ns | string | ”default” | Yes | Namespace |
label_selector | string | null | Yes | Label Selector | Selectors to target the appropriate pods
phase | string | ”Running” | No | Pod Phase | Pod phase as defined by Kubernetes

Raises :exc:`chaoslib.exceptions.ActivityFailed` when the pod is in the given phase and should not have.

Signature

    def pods_not_in_phase(label_selector: str,
                          phase: str = 'Running',
                          ns: str = 'default',
                          secrets: Dict[str, Dict[str, str]] = None) -> bool:
        pass

## Related starters

- Kubernetes
  probe Pod

  ## `count_min_pods`

  Ensure there is a minimal required number of pods in a giving phase
- Kubernetes
  probe Pod

  ## `count_pods`

  Count the number of pods matching the given selector
- Kubernetes
  action Pod

  ## `Delete Some Pods`

  Delete a single a pod gracefully, to simulate a failing condition