Skip to content

Commit

Permalink
Add guide section on production advice, esp. CPU.
Browse files Browse the repository at this point in the history
  • Loading branch information
timoreimann authored and traefiker committed Sep 12, 2017
1 parent 63b5819 commit 5305a16
Showing 1 changed file with 12 additions and 22 deletions.
34 changes: 12 additions & 22 deletions docs/user-guide/kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -357,13 +357,6 @@ spec:
containers:
- name: cheese
image: errm/cheese:stilton
resources:
requests:
cpu: 100m
memory: 50Mi
limits:
cpu: 100m
memory: 50Mi
ports:
- containerPort: 80
---
Expand All @@ -390,13 +383,6 @@ spec:
containers:
- name: cheese
image: errm/cheese:cheddar
resources:
requests:
cpu: 100m
memory: 50Mi
limits:
cpu: 100m
memory: 50Mi
ports:
- containerPort: 80
---
Expand All @@ -423,13 +409,6 @@ spec:
containers:
- name: cheese
image: errm/cheese:wensleydale
resources:
requests:
cpu: 100m
memory: 50Mi
limits:
cpu: 100m
memory: 50Mi
ports:
- containerPort: 80
```
Expand Down Expand Up @@ -716,4 +695,15 @@ By default if the annotation is not set at all Træfik will include the ingress.
If the annotation is set to anything other than traefik or a blank string Træfik will ignore it.


![](https://i.giphy.com/ujUdrdpX7Ok5W.gif)
## Production advice

### Resource limitations

The examples shown deliberately do not specify any [resource limitations](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/) as there is no one size fits all.

In a production environment, however, it is important to set proper bounds, especially with regards to CPU:

- too strict and Traefik will be throttled while serving requests (as Kubernetes imposes hard quotas)
- too loose and Traefik may waste resources not available for other containers

When in doubt, you should measure your resource needs, and adjust requests and limits accordingly.

0 comments on commit 5305a16

Please sign in to comment.