Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
rennokki committed Oct 31, 2020
1 parent 418c05c commit e3cbfaf
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
18 changes: 18 additions & 0 deletions docs/kinds/Deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,24 @@ foreach ($dep->getPods() as $pod) {
}
```

### Scaling

The Scaling API is available via a `K8sScale` resource:

```php
$scaler = $dep->scaler();

$scaler->setReplicas(3)->update(); // autoscale the Deployment to 3 replicas
```

Shorthand, you can use `scale()` directly from the Deployment

```php
$scaler = $dep->scale(3);

$pods = $dep->getPods(); // Expecting 3 pods
```

### Deployment Status

The Status API is available to be accessed for fresh instances:
Expand Down
18 changes: 18 additions & 0 deletions docs/kinds/StatefulSet.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,24 @@ foreach ($sts->getPods() as $pod) {
}
```

### Scaling

The Scaling API is available via a `K8sScale` resource:

```php
$scaler = $sts->scaler();

$scaler->setReplicas(3)->update(); // autoscale the StatefulSet to 3 replicas
```

Shorthand, you can use `scale()` directly from the StatefulSet

```php
$scaler = $sts->scale(3);

$pods = $sts->getPods(); // Expecting 3 pods
```

### StatefulSet Status

The Status API is available to be accessed for fresh instances:
Expand Down

0 comments on commit e3cbfaf

Please sign in to comment.