---
api_metadata:
apiVersion: "v1"
import: "k8s.io/api/core/v1"
kind: "LimitRange"
content_type: "api_reference"
description: "LimitRange sets resource usage limits for each kind of resource in a Namespace."
title: "LimitRange"
weight: 1
auto_generated: true
---
`apiVersion: v1`
`import "k8s.io/api/core/v1"`
## LimitRange {#LimitRange}
LimitRange sets resource usage limits for each kind of resource in a Namespace.
- **apiVersion**: v1
- **kind**: LimitRange
- **metadata** (}}">ObjectMeta)
Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- **spec** (}}">LimitRangeSpec)
Spec defines the limits enforced. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
## LimitRangeSpec {#LimitRangeSpec}
LimitRangeSpec defines a min/max usage limit for resources that match on kind.
- **limits** ([]LimitRangeItem), required
Limits is the list of LimitRangeItem objects that are enforced.
*LimitRangeItem defines a min/max usage limit for any resource that matches on kind.*
- **limits.type** (string), required
Type of resource that this limit applies to.
- **limits.default** (map[string]}}">Quantity)
Default resource requirement limit value by resource name if resource limit is omitted.
- **limits.defaultRequest** (map[string]}}">Quantity)
DefaultRequest is the default resource requirement request value by resource name if resource request is omitted.
- **limits.max** (map[string]}}">Quantity)
Max usage constraints on this kind by resource name.
- **limits.maxLimitRequestRatio** (map[string]}}">Quantity)
MaxLimitRequestRatio if specified, the named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value; this represents the max burst for the named resource.
- **limits.min** (map[string]}}">Quantity)
Min usage constraints on this kind by resource name.
## LimitRangeList {#LimitRangeList}
LimitRangeList is a list of LimitRange items.
- **apiVersion**: v1
- **kind**: LimitRangeList
- **metadata** (}}">ListMeta)
Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- **items** ([]}}">LimitRange), required
Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
## Operations {#Operations}
### `get` read the specified LimitRange
#### HTTP Request
GET /api/v1/namespaces/{namespace}/limitranges/{name}
#### Parameters
- **name** (*in path*): string, required
name of the LimitRange
- **namespace** (*in path*): string, required
}}">namespace
- **pretty** (*in query*): string
}}">pretty
#### Response
200 (}}">LimitRange): OK
401: Unauthorized
### `list` list or watch objects of kind LimitRange
#### HTTP Request
GET /api/v1/namespaces/{namespace}/limitranges
#### Parameters
- **namespace** (*in path*): string, required
}}">namespace
- **allowWatchBookmarks** (*in query*): boolean
}}">allowWatchBookmarks
- **continue** (*in query*): string
}}">continue
- **fieldSelector** (*in query*): string
}}">fieldSelector
- **labelSelector** (*in query*): string
}}">labelSelector
- **limit** (*in query*): integer
}}">limit
- **pretty** (*in query*): string
}}">pretty
- **resourceVersion** (*in query*): string
}}">resourceVersion
- **resourceVersionMatch** (*in query*): string
}}">resourceVersionMatch
- **timeoutSeconds** (*in query*): integer
}}">timeoutSeconds
- **watch** (*in query*): boolean
}}">watch
#### Response
200 (}}">LimitRangeList): OK
401: Unauthorized
### `list` list or watch objects of kind LimitRange
#### HTTP Request
GET /api/v1/limitranges
#### Parameters
- **allowWatchBookmarks** (*in query*): boolean
}}">allowWatchBookmarks
- **continue** (*in query*): string
}}">continue
- **fieldSelector** (*in query*): string
}}">fieldSelector
- **labelSelector** (*in query*): string
}}">labelSelector
- **limit** (*in query*): integer
}}">limit
- **pretty** (*in query*): string
}}">pretty
- **resourceVersion** (*in query*): string
}}">resourceVersion
- **resourceVersionMatch** (*in query*): string
}}">resourceVersionMatch
- **timeoutSeconds** (*in query*): integer
}}">timeoutSeconds
- **watch** (*in query*): boolean
}}">watch
#### Response
200 (}}">LimitRangeList): OK
401: Unauthorized
### `create` create a LimitRange
#### HTTP Request
POST /api/v1/namespaces/{namespace}/limitranges
#### Parameters
- **namespace** (*in path*): string, required
}}">namespace
- **body**: }}">LimitRange, required
- **dryRun** (*in query*): string
}}">dryRun
- **fieldManager** (*in query*): string
}}">fieldManager
- **fieldValidation** (*in query*): string
}}">fieldValidation
- **pretty** (*in query*): string
}}">pretty
#### Response
200 (}}">LimitRange): OK
201 (}}">LimitRange): Created
202 (}}">LimitRange): Accepted
401: Unauthorized
### `update` replace the specified LimitRange
#### HTTP Request
PUT /api/v1/namespaces/{namespace}/limitranges/{name}
#### Parameters
- **name** (*in path*): string, required
name of the LimitRange
- **namespace** (*in path*): string, required
}}">namespace
- **body**: }}">LimitRange, required
- **dryRun** (*in query*): string
}}">dryRun
- **fieldManager** (*in query*): string
}}">fieldManager
- **fieldValidation** (*in query*): string
}}">fieldValidation
- **pretty** (*in query*): string
}}">pretty
#### Response
200 (}}">LimitRange): OK
201 (}}">LimitRange): Created
401: Unauthorized
### `patch` partially update the specified LimitRange
#### HTTP Request
PATCH /api/v1/namespaces/{namespace}/limitranges/{name}
#### Parameters
- **name** (*in path*): string, required
name of the LimitRange
- **namespace** (*in path*): string, required
}}">namespace
- **body**: }}">Patch, required
- **dryRun** (*in query*): string
}}">dryRun
- **fieldManager** (*in query*): string
}}">fieldManager
- **fieldValidation** (*in query*): string
}}">fieldValidation
- **force** (*in query*): boolean
}}">force
- **pretty** (*in query*): string
}}">pretty
#### Response
200 (}}">LimitRange): OK
201 (}}">LimitRange): Created
401: Unauthorized
### `delete` delete a LimitRange
#### HTTP Request
DELETE /api/v1/namespaces/{namespace}/limitranges/{name}
#### Parameters
- **name** (*in path*): string, required
name of the LimitRange
- **namespace** (*in path*): string, required
}}">namespace
- **body**: }}">DeleteOptions
- **dryRun** (*in query*): string
}}">dryRun
- **gracePeriodSeconds** (*in query*): integer
}}">gracePeriodSeconds
- **pretty** (*in query*): string
}}">pretty
- **propagationPolicy** (*in query*): string
}}">propagationPolicy
#### Response
200 (}}">Status): OK
202 (}}">Status): Accepted
401: Unauthorized
### `deletecollection` delete collection of LimitRange
#### HTTP Request
DELETE /api/v1/namespaces/{namespace}/limitranges
#### Parameters
- **namespace** (*in path*): string, required
}}">namespace
- **body**: }}">DeleteOptions
- **continue** (*in query*): string
}}">continue
- **dryRun** (*in query*): string
}}">dryRun
- **fieldSelector** (*in query*): string
}}">fieldSelector
- **gracePeriodSeconds** (*in query*): integer
}}">gracePeriodSeconds
- **labelSelector** (*in query*): string
}}">labelSelector
- **limit** (*in query*): integer
}}">limit
- **pretty** (*in query*): string
}}">pretty
- **propagationPolicy** (*in query*): string
}}">propagationPolicy
- **resourceVersion** (*in query*): string
}}">resourceVersion
- **resourceVersionMatch** (*in query*): string
}}">resourceVersionMatch
- **timeoutSeconds** (*in query*): integer
}}">timeoutSeconds
#### Response
200 (}}">Status): OK
401: Unauthorized