Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an example of setting autoscaler behavior in a Fleet. #2759

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions site/content/en/docs/Advanced/scheduling-and-autoscaling.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,21 +114,42 @@ want the Cluster Autoscaler to compact your cluster by evicting game servers whe
Autoscaler to reduce the number of nodes in the cluster, then this behavior can be overridden by explicitly setting the
`"cluster-autoscaler.kubernetes.io/safe-to-evict"` annotation to `"true"` in the metadata for the game server pod, e.g.

```
```yaml
apiVersion: "agones.dev/v1"
kind: GameServer
metadata:
name: "simple-game-server"
spec:
template:
# pod metadata. Name & Namespace is overwritten
# Pod metadata. Name & Namespace is overwritten
metadata:
annotations:
cluster-autoscaler.kubernetes.io/safe-to-evict: true
spec:
containers:
- image: {{< example-image >}}
```

or if you are using a Fleet

```yaml
apiVersion: "agones.dev/v1"
kind: Fleet
metadata:
name: "simple-game-fleet"
spec:
replicas: 2
template:
spec:
template:
# Pod metadata. Name & Namespace is overwritten
metadata:
annotations:
cluster-autoscaler.kubernetes.io/safe-to-evict: true
spec:
containers:
- image: {{< example-image >}}
```
{{% /feature %}}

#### Allocation Scheduling Strategy
Expand Down