- URL:https://<root>/system/volumes/create(POST only)
- Required Capability: Default administrator role | Security and infrastructure
- Version Introduced:11.2
Description
The create operation is used to create PersistentVolumeClaim (PVC) volumes that can be used by GIS service deployments to provide additional resources to its pods, increasing performance. When creating these volumes, administrators will need to define the name of the volume and the properties in the spec JSON object. For more information on the configurable properties and their accepted values, see the Spec properties section below.
After a volume is created, it needs to be applied to a GIS service deployment to provide its pods with the additional resources. Administrators will need to update a GIS service's deployment to include the volume's ID (returned by the Volumes resource). For more information, see the Edit Deployment documentation.
Local volumes
At 11.2, the create operation can be used to create local PVC volumes. These PVC volumes bind to a local PersistentVolume (PV) that has been provisioned and is ready on a specific cluster, or on certain nodes in a cluster.
Tip:
You can use node affinity to ensure that the PV is only created on specific nodes in the cluster. The following example demonstrates a sample PV that includes node affinity:
Note:
For organizations that run ArcGIS Enterprise on Kubernetes from a cloud environment, node pool labels can be used instead of node names.
apiVersion: v1
kind: PersistentVolume
metadata:
name: local-pv
spec:
capacity:
storage: 100Gi
volumeMode: Filesystem
accessModes:
- ReadOnlyMany
persistentVolumeReclaimPolicy: Delete
storageClassName: local-storage
local:
path: /data/esridata
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- node 1
- node 2
- node 3
Local PVC volumes are persistent, existing even after a GIS service's pods are destroyed. These volumes are ideal for services like geocoding services, which can use local volumes to access the data they need for their locators.
Local PVC volumes are not useful in cases where services, such as raster analytics, need to perform large analysis jobs that require data to be loaded to a temporary space for processing. For those cases, administrators should consider creating PVC templates for ephemeral volumes.
Request parameters
Parameter | Details |
---|---|
volumeJson | The JSON object that specifies the volume's configuration information. The name property and spec JSON object will need to be updated. All other information should not be modified. Example
|
f | The response format. The default format is html. Values: html | json | pjson |
Spec properties
Note:
The following table outlines some of the configurable properties that can be included in the spec JSON object, specifically those that apply to the PVC volumes ArcGIS Enterprise on Kubernetes supports. However, the spec JSON object is open to support other properties that are unspecified in this documentation. Prior to creating PVC volumes, reference the Kubernetes documentation on volumes for more detailed information, additional spec properties, and any potential updates made to those areas.
Property | Details |
---|---|
accesModes | Specifies how the volume can be mounted. This property accepts the following values:
|
resources | Specifies the amount of storage the pods can request from the volume. |
storageClassName | Reflects the name of a defined StorageClass that the PVC volume is connection to. |
volumeMode | Specifies the volume type. This property accepts the following values:
|
volumeName | Specifies the name of the associated PV that the PVC will refer and bind to. |
labels | Lists labels that match with the associated PV's labels. |
Example usage
The following is a sample POST request for the create operation:
POST /context/admin/system/volumes/create HTTP/1.1
Host: organization.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []
volumeJson={
"name": "volumes-test",
"type": "PVC",
"spec": {
"storageClassName": "arcgis-storage-default",
"resources": {"requests": {"storage": "16Gi"}},
"accessModes": ["ReadWriteOnce"],
"volumeMode": "Filesystem",
"volumeName": "example-name",
"labels": {
"label1": "value1",
"label2": "value2"
}
},
"revision": 1
}&f=pjson&token= WCLZFEEO_UQsdmhWDjgxnr_MDsWufTE27Ad_uqMYiFIiiLHpOFjep2gY5nRLb582nbBlzJ5epocEcSv9yniX-VZIO3y5OO7UeHBKgvByFpyuaTZCbL5UJK_RmQ7dfmP6XSXCGPPY3bPz3hID3xFfuUFW1wnspXLO-C_Zygb_hwN7Pt5nry0AKxXIG27xuHGWNgwYcU2eXpHgmc5LQrAInvf9Gh7zpqoNBg8mOKEDNCPX4edSHjdrDlD-9la7Oya4
JSON Response example
{"status": "success"}