Skip to content

Instantly share code, notes, and snippets.

@j-griffith
Created September 14, 2018 16:20
Show Gist options
  • Select an option

  • Save j-griffith/00cea2e6659b23fe493944db8c3f39d8 to your computer and use it in GitHub Desktop.

Select an option

Save j-griffith/00cea2e6659b23fe493944db8c3f39d8 to your computer and use it in GitHub Desktop.
# cirros-image.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: "cirros-pvc"
labels:
app: containerized-data-importer
annotations:
cdi.kubevirt.io/storage.import.endpoint: "http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-i386-disk.img" # Required. Format: (http||s3)://www.myUrl.com/path/of/data
cdi.kubevirt.io/storage.import.secretName: "" # Optional. The name of the secret containing credentials for the data source
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
➜ containerized-data-importer git:(master) cluster/kubectl.sh create -f cirros-image.yaml
➜ containerized-data-importer git:(master) cluster/kubectl.sh get pv
NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE
local-pv-182992f7 37Gi RWO Delete Available local 18m
local-pv-25a396e8 37Gi RWO Delete Available local 18m
local-pv-3fb65ef2 37Gi RWO Delete Available local 18m
local-pv-964ac8d4 37Gi RWO Delete Available local 18m
local-pv-9c37251f 37Gi RWO Delete Available local 18m
local-pv-acd3a4a1 37Gi RWO Delete Available local 18m
local-pv-b4c5344d 37Gi RWO Delete Available local 18m
local-pv-be0c22f3 37Gi RWO Delete Bound default/cirros-pvc local 18m
local-pv-e824538e 37Gi RWO Delete Available local 18m
local-pv-f44cc0e9 37Gi RWO Delete Available local 18m
➜ containerized-data-importer git:(master) cluster/kubectl.sh get pvc
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
cirros-pvc Bound local-pv-be0c22f3 37Gi RWO local 1m
➜ containerized-data-importer git:(master)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment