Kubernetes
action Statefulset

# scale_statefulset

Scale a statefulset up or down

Run it now
View details

Type | action
Module | chaosk8s.statefulset.actions
Name | scale_statefulset
Return | None

Usage

JSON

    {
      "name": "scale-statefulset",
      "type": "action",
      "provider": {
        "type": "python",
        "module": "chaosk8s.statefulset.actions",
        "func": "scale_statefulset",
        "arguments": {
          "name": "",
          "replicas": 0
        }
      }
    }

YAML

    name: scale-statefulset
    provider:
      arguments:
        name: ""
        replicas: 0
      func: scale_statefulset
      module: chaosk8s.statefulset.actions
      type: python
    type: action

Arguments

Name | Type | Default | Required | Title | Description
--- | --- | --- | --- | --- | ---
ns | string | ”default” | Yes | Namespace |
name | string |  | Yes | Name | Statefulset name to scale
replicas | integer |  | Yes | Desired Quantity | Scale to this number of replicas

The `name` is the name of the statefulset.

Signature

    def scale_statefulset(name: str,
                          replicas: int,
                          ns: str = 'default',
                          secrets: Dict[str, Dict[str, str]] = None):
        pass

## Related starters

- Kubernetes
  action Statefulset

  ## `create_statefulset`

  Create a statefulset
- Kubernetes
  action Statefulset

  ## `remove_statefulset`

  Remove a statefulset
- Kubernetes
  action Node

  ## `cordon_node`

  Cordon nodes matching the given label or name, so that no pods are scheduled on them any longer