Link Search Menu Expand Document

Verify pod status

Table of contents

  1. Scenario
  2. Check all pods are in Running state
  3. Count all pods with a label

Scenario

You can also use PowerfulSeal to just assert things about your cluster.

Check all pods are in Running state

scenarios:
- name: Verify there only running pods
  steps:
  - podAction:
      matches:
        - namespace: "*"
      filters:
        # pods not running
        - property:
            name: state
            value: Running
            negative: true
        - randomSample:
            size: 1
      actions:
        - checkPodCount:
            count: 0

Count all pods with a label

scenarios:
- name: Count pods with a specific label
  steps:
  - podAction:
      matches:
        - labels:
            namespace: "*"
            selector: important=true
      actions:
        - checkPodCount:
            count: 78

© 2020 Bloomberg Finance L.P.