Viewing Usage Quotas

Page last updated:

This topic describes how to review your VM resource usage and quotas in Enterprise Pivotal Container Service (Enterprise PKS) using the Enterprise PKS API.

Your Enterprise PKS administrator might set maximum VM memory and vCPU count limits on your VM instances. This quota limitation is based on the total allocated size of the VM instances you create, not their actual utilization.

By using the PKS API, you can determine the size limitations that your administrator has assigned to you and your current usage.

Warning: This feature is a beta component and is intended for evaluation and test purposes only. Do not use this feature in a production environment. Product support and future availability are not guaranteed for beta components.

Set up Your API Access Token

The Enterprise PKS Quota and Resource API commands in this topic use an access token environment variable.

  1. To export your access token into an environment variable, run the following command:

    pks login -a PKS-API -u USER-ID -p 'PASSWORD' -k; \
    export YOUR_ACCESS_TOKEN=$(bosh int ~/.pks/creds.yml --path /access_token)
    

    Where:

    • PKS-API is the FQDN of your PKS API endpoint. For example, api.pks.example.com.
    • USER-ID is your Enterprise PKS user ID.
    • PASSWORD is your Enterprise PKS password.
    • YOUR_ACCESS_TOKEN is the name of your access token environment variable.

    For example:

    $ pks login -a pks.my.lab -u alana -p 'psswrdabc123...!' -k; \
    export my_token=$(bosh int ~/.pks/creds.yml --path /access_token)
    

View Quotas

The PKS API quotas command reports your resource utilization quota as JSON.

To view your resource quota, run the following command:

curl -k -H "Authorization: Bearer $YOUR-ACCESS-TOKEN" \
https://PKS-API:9021/v1beta1/quotas/USER-ID

Where:

  • YOUR-ACCESS-TOKEN is your access token environment variable.
  • PKS-API is the FQDN of your PKS API endpoint. For example, api.pks.example.com.
  • USER-ID is your Enterprise PKS user ID.

View Usage

The PKS API usages command reports your resource utilization as JSON.

To view your current allocated resource utilization, run the following command:

curl -k -H "Authorization: Bearer $YOUR-ACCESS-TOKEN" \
https://PKS-API:9021/v1beta1/usages/USER-ID

Where:

  • YOUR-ACCESS-TOKEN is your access token environment variable.
  • PKS-API is the FQDN of your PKS API endpoint. For example, api.pks.example.com.
  • USER-ID is your Enterprise PKS user ID.

Please send any feedback you have to pks-feedback@pivotal.io.