@@ -370,37 +370,35 @@ For container-level isolation, if a Container's writable layer and logs usage ex
370370
371371# # Extended Resources
372372
373- Kubernetes version 1.8 introduces Extended Resources. Extended Resources are
374- fully-qualified resource names outside the `kubernetes.io` domain. Extended
375- Resources allow cluster operators to advertise new node-level resources that
376- would be otherwise unknown to the system. Extended Resource quantities must be
377- integers and cannot be overcommitted.
373+ Extended Resources are fully-qualified resource names outside the
374+ ` kubernetes.io` domain. They allow cluster operators to advertise and users to
375+ consume the non-Kubernetes-built-in resources.
378376
379- Users can consume Extended Resources in Pod specs just like CPU and memory.
380- The scheduler takes care of the resource accounting so that no more than the
381- available amount is simultaneously allocated to Pods.
377+ There are two steps required to use Extended Resources. First, the cluster
378+ operator must advertise an Extended Resource. Second, users must request the
379+ Extended Resource in Pods.
382380
383- The API server restricts quantities of Extended Resources to whole numbers.
384- Examples of _valid_ quantities are `3`, `3000m` and `3Ki`. Examples of
385- _invalid_ quantities are `0.5` and `1500m`.
381+ # ## Managing extended resources
386382
387- **Note:** Extended Resources replace Opaque Integer Resources.
388- Users can use any domain name prefix other than "`kubernetes.io`" which is reserved.
389- {: .note}
383+ # ### Node-level extended resources
384+
385+ Node-level extended resources are tied to nodes.
390386
391- There are two steps required to use Extended Resources. First, the
392- cluster operator must advertise a per-node Extended Resource on one or more
393- nodes. Second, users must request the Extended Resource in Pods.
387+ # #### Device plugin managed resources
388+ See [Device
389+ Plugin](https://kubernetes.io/docs/concepts/cluster-administration/device-plugins/)
390+ for how to advertise device plugin managed resources on each node.
394391
395- To advertise a new Extended Resource, the cluster operator should
392+ # #### Other resources
393+ To advertise a new node-level extended resource, the cluster operator can
396394submit a `PATCH` HTTP request to the API server to specify the available
397395quantity in the `status.capacity` for a node in the cluster. After this
398396operation, the node's `status.capacity` will include a new resource. The
399397` status.allocatable` field is updated automatically with the new resource
400- asynchronously by the kubelet. Note that because the scheduler uses the
401- node `status.allocatable` value when evaluating Pod fitness, there may
402- be a short delay between patching the node capacity with a new resource and the
403- first pod that requests the resource to be scheduled on that node.
398+ asynchronously by the kubelet. Note that because the scheduler uses the node
399+ ` status.allocatable` value when evaluating Pod fitness, there may be a short
400+ delay between patching the node capacity with a new resource and the first pod
401+ that requests the resource to be scheduled on that node.
404402
405403**Example:**
406404
@@ -421,21 +419,72 @@ JSON-Pointer. For more details, see
421419[IETF RFC 6901, section 3](https://tools.ietf.org/html/rfc6901#section-3).
422420{: .note}
423421
422+ # ### Cluster-level extended resources
423+
424+ Cluster-level extended resources are not tied to nodes. They are usually managed
425+ by scheduler extenders, which handle the resource comsumption, quota and so on.
426+
427+ You can specify the extended resources that are handled by scheduler extenders
428+ in [scheduler policy
429+ configuration](https://github.com/kubernetes/kubernetes/blob/release-1.10/pkg/scheduler/api/v1/types.go#L31).
430+
431+ **Example:**
432+
433+ The following configuration for a scheduler policy indicates that the
434+ cluster-level extended resource "example.com/foo" is handled by scheduler
435+ extender.
436+ - The scheduler sends a pod to the scheduler extender only if the pod requests
437+ " example.com/foo" .
438+ - The `ignoredByScheduler` field specifies that the scheduler does not check
439+ the "example.com/foo" resource in its `PodFitsResources` predicate.
440+
441+ ` ` ` json
442+ {
443+ "kind": "Policy",
444+ "apiVersion": "v1",
445+ "extenders": [
446+ {
447+ "urlPrefix":"<extender-endpoint>",
448+ "bindVerb": "bind",
449+ "ManagedResources": [
450+ {
451+ "name": "example.com/foo",
452+ "ignoredByScheduler": true
453+ }
454+ ]
455+ }
456+ ]
457+ }
458+ ` ` `
459+
460+ # ## Consuming extended resources
461+
462+ Users can consume Extended Resources in Pod specs just like CPU and memory.
463+ The scheduler takes care of the resource accounting so that no more than the
464+ available amount is simultaneously allocated to Pods.
465+
466+ The API server restricts quantities of Extended Resources to whole numbers.
467+ Examples of _valid_ quantities are `3`, `3000m` and `3Ki`. Examples of
468+ _invalid_ quantities are `0.5` and `1500m`.
469+
470+ **Note:** Extended Resources replace Opaque Integer Resources.
471+ Users can use any domain name prefix other than "`kubernetes.io`" which is reserved.
472+ {: .note}
473+
424474To consume an Extended Resource in a Pod, include the resource name as a key
425475in the `spec.containers[].resources.limits` map in the container spec.
426476
427477**Note:** Extended resources cannot be overcommitted, so request and limit
428478must be equal if both are present in a container spec.
429479{: .note}
430480
431- The Pod is scheduled only if all of the resource requests are
432- satisfied, including cpu, memory and any Extended Resources. The Pod will
433- remain in the `PENDING` state as long as the resource request cannot be met by
434- any node.
481+ A Pod is scheduled only if all of the resource requests are satisfied, including
482+ CPU, memory and any Extended Resources. The Pod remains in the `PENDING` state
483+ as long as the resource request cannot be satisfied.
435484
436485**Example:**
437486
438- The Pod below requests 2 cpus and 1 "example.com/foo" (an extended resource.)
487+ The Pod below requests 2 CPUs and 1 "example.com/foo" (an extended resource).
439488
440489` ` ` yaml
441490apiVersion: v1
0 commit comments