content_image/752717.jpg
6. Create the pod: 

7. Verify that the pod is running: 

8. Verify that the quota Used  counter is correct: 

resources: limits: nvidia.com/gpu: 1 

# oc create -f gpu-pod.yaml 

# oc get pods 

## Example output 

<img src='content_image/752717.jpg'>

# oc describe quota gpu-quota -n nvidia 

## Example output 

Name: gpu-quota Namespace: nvidia Resource Used Hard -------- ---- ---- requests.nvidia.com/gpu 1 1 

9. Attempt to create a second GPU pod in the nvidia  namespace. This is technically available on the node because it has 2 GPUs: 

# oc create -f gpu-pod.yaml 

## Example output 

Error from server (Forbidden): error when creating "gpu-pod.yaml": pods "gpu-pod-f7z2w" is forbidden: exceeded quota: gpu-quota, requested: requests.nvidia.com/gpu=1, used: requests.nvidia.com/gpu=1, limited: requests.nvidia.com/gpu=1 

This Forbidden  error message is expected because you have a quota of 1 GPU and this pod tried to allocate a second GPU, which exceeds its quota. 

## 4.1.7. Viewing a quota 

You can view usage statistics related to any hard limits defined in a project’s quota by navigating in the web console to the project’s Quota  page. 

You can also use the CLI to view quota details. 

## Procedure 

