1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/admin-limit-operations.adoc
2024-10-31 17:42:50 +00:00

75 lines
2.3 KiB
Plaintext

// Module included in the following assemblies:
//
// ../scalability_and_performance/compute-resource-quotas.adoc
:_mod-docs-content-type: PROCEDURE
[id="admin-limit-operations_{context}"]
= Limit range operations
== Creating a limit range
Shown here is an example procedure to follow for creating a limit range.
.Procedure
. Create the object:
+
[source,terminal]
----
$ oc create -f <limit_range_file> -n <project>
----
== View the limit
You can view any limit ranges that are defined in a project by navigating in the web console to the `Quota` page for the project. You can also use the CLI to view limit range details by performing the following steps:
.Procedure
. Get the list of limit range objects that are defined in the project. For example, a project called `demoproject`:
+
[source,terminal]
----
$ oc get limits -n demoproject
----
+
.Example Output
+
[source,terminal]
----
NAME AGE
resource-limits 6d
----
. Describe the limit range. For example, for a limit range called `resource-limits`:
+
[source,terminal]
----
$ oc describe limits resource-limits -n demoproject
----
+
.Example Output
+
[source,terminal]
----
Name: resource-limits
Namespace: demoproject
Type Resource Min Max Default Request Default Limit Max Limit/Request Ratio
---- -------- --- --- --------------- ------------- -----------------------
Pod cpu 200m 2 - - -
Pod memory 6Mi 1Gi - - -
Container cpu 100m 2 200m 300m 10
Container memory 4Mi 1Gi 100Mi 200Mi -
openshift.io/Image storage - 1Gi - - -
openshift.io/ImageStream openshift.io/image - 12 - - -
openshift.io/ImageStream openshift.io/image-tags - 10 - - -
----
== Deleting a limit range
To remove a limit range, run the following command:
+
[source,terminal]
----
$ oc delete limits <limit_name>
----
S