Checking Kubernetes storage status
The PowerAI Vision application requires disk storage for activities including data set storage. The disk space requirements are described using Kubernetes Persistent Volume configuration. The kubectl command can be used to examine the pv (PersistentVolume) and pvc (PersistentVolumeClaims) resources.
Using kubectl get pv and pvc commands
The kubectl get pv and kubectl get pvc commands can be used to see what PersistentVolume and PersistentVolumeClaim have been defined for the application.
Example output# /opt/powerai-vision/bin/kubectl.sh get pv
NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE
powerai-vision-data 40Gi RWX Retain Bound default/powerai-vision-data-pvc 48d
# /opt/powerai-vision/bin/kubectl.sh get pvc
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
powerai-vision-data-pvc Bound powerai-vision-data 40Gi RWX 48d
Interpreting
the outputThe above output shows information about the Persistent Volume and Persistent Volume Claim for PowerAI Vision. The application currently has a capacity claim of 40G and it is successfully "Bound". If the STATUS is not "Bound", the application does not have access to the necessary storage.
Using the kubectl describe pv command
The kubectl describe pv command is used to see detailed information about the Persistent Volume used by the application.
# /opt/powerai-vision/bin/kubectl.sh describe pv
NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE
powerai-vision-data 40Gi RWX Retain Bound default/powerai-vision-data-pvc 48d
[root@dlf01 ~]# /opt/powerai-vision/bin/kubectl.sh describe pv
Name: powerai-vision-data
Labels: assign-to=powerai-vision-data
type=local
Annotations: pv.kubernetes.io/bound-by-controller=yes
StorageClass:
Status: Bound
Claim: default/powerai-vision-data-pvc
Reclaim Policy: Retain
Access Modes: RWX
Capacity: 40Gi
Message:
Source:
Type: HostPath (bare host directory volume)
Path: /opt/powerai-vision/volume/
Events: <none>
The above output shows more details about the Persistent Volume used by the application. The Sourcesection has the critical configuration values for Type and Path. The Events section will have information about Error events if there were issues with the Persistent Volume.
Using the kubectl describe pvc command
The kubectl describe pvc command is used to see detailed information about the Persistent Volume Claim for the application.
Example output
[root@dlf01 ~]# /opt/powerai-vision/bin/kubectl.sh describe pvc
Name: powerai-vision-data-pvc
Namespace: default
StorageClass:
Status: Bound
Volume: powerai-vision-data
Labels: app=powerai-vision
chart=ibm-powerai-vision-prod-1.1.0
heritage=Tiller
release=vision
Annotations: pv.kubernetes.io/bind-completed=yes
pv.kubernetes.io/bound-by-controller=yes
Capacity: 40Gi
Access Modes: RWX
Events: <none>
Interpreting
the outputThe above output shows more details about the Persistent Volume Claim used by the application. The Volume section references the underlying Persistent Volume, and the Status should be "Bound" if it has been successfully allocated to the application. The Events section will show if there were issues with the Persistent Volume Claim.