Skip to content

Commit

Permalink
Merge pull request #9708 from hakman/resource-reservation-docs
Browse files Browse the repository at this point in the history
Update example for Resources Reservation
  • Loading branch information
k8s-ci-robot authored Aug 8, 2020
2 parents 37a1fa9 + f772c55 commit 7070c3c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 166 deletions.
52 changes: 0 additions & 52 deletions docs/calico_cidr_migration/create_migration_manifest.sh

This file was deleted.

108 changes: 0 additions & 108 deletions docs/calico_cidr_migration/jobs.yaml.template

This file was deleted.

12 changes: 7 additions & 5 deletions docs/cluster_spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -647,25 +647,27 @@ For more information, see the [feature gate documentation](https://kubernetes.io

### Compute Resources Reservation

In a scenario where node has 32Gi of memory, 16 CPUs and 100Gi of ephemeral storage, resource reservation could be set as in the following example:

```yaml
spec:
kubelet:
kubeReserved:
cpu: "100m"
memory: "100Mi"
cpu: "1"
memory: "2Gi"
ephemeral-storage: "1Gi"
kubeReservedCgroup: "/kube-reserved"
kubeletCgroups: "/kube-reserved"
runtimeCgroups: "/kube-reserved"
systemReserved:
cpu: "100m"
memory: "100Mi"
cpu: "500m"
memory: "1Gi"
ephemeral-storage: "1Gi"
systemReservedCgroup: "/system-reserved"
enforceNodeAllocatable: "pods,system-reserved,kube-reserved"
```

Will result in the flag `--kube-reserved=cpu=100m,memory=100Mi,ephemeral-storage=1Gi --kube-reserved-cgroup=/kube-reserved --kubelet-cgroups=/kube-reserved --runtime-cgroups=/kube-reserved --system-reserved=cpu=100m,memory=100Mi,ephemeral-storage=1Gi --system-reserved-cgroup=/system-reserved --enforce-node-allocatable=pods,system-reserved,kube-reserved`
The above will result in the flags `--kube-reserved=cpu=1,memory=2Gi,ephemeral-storage=1Gi --kube-reserved-cgroup=/kube-reserved --kubelet-cgroups=/kube-reserved --runtime-cgroups=/kube-reserved --system-reserved=cpu=500m,memory=1Gi,ephemeral-storage=1Gi --system-reserved-cgroup=/system-reserved --enforce-node-allocatable=pods,system-reserved,kube-reserved` being added to the kubelet.

Learn more about reserving compute resources [here](https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/) and [here](https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/).

Expand Down
1 change: 0 additions & 1 deletion hack/.shellcheck_failures
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
./addons/cluster-autoscaler/cluster-autoscaler.sh
./addons/prometheus-operator/sync-repo.sh
./docs/calico_cidr_migration/create_migration_manifest.sh
./hack/common.sh
./hack/dev-build.sh
./hack/make-apimachinery.sh
Expand Down

0 comments on commit 7070c3c

Please sign in to comment.