Skip to content

Latest commit

 

History

History
75 lines (63 loc) · 2.34 KB

admin-limit-operations.adoc

File metadata and controls

75 lines (63 loc) · 2.34 KB

Limit range operations

Creating a limit range

Shown here is an example procedure to follow for creating a limit range.

Procedure
  1. Create the object:

    $ 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
  1. Get the list of limit range objects that are defined in the project. For example, a project called demoproject:

    $ oc get limits -n demoproject
    Example Output
    NAME              AGE
    resource-limits   6d
  2. Describe the limit range. For example, for a limit range called resource-limits:

    $ oc describe limits resource-limits -n demoproject
    Example Output
    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:

+

$ oc delete limits <limit_name>

S