text stringlengths 0 59.1k |
|---|
$ kubectl describe pvc fast0001 |
Name: fast0001 |
Namespace: default |
StorageClass: fast |
Status: Bound |
Volume: pvc-480952e7-f8e0-11e6-af8c-08002736b526 |
Labels: <none> |
Capacity: 5Gi |
Access Modes: RWO |
Events: |
<snip> |
``` |
A new persistent volume will also be created and bound to the pvc: |
```bash |
$ kubectl describe pv pvc-480952e7-f8e0-11e6-af8c-08002736b526 |
Name: pvc-480952e7-f8e0-11e6-af8c-08002736b526 |
Labels: storageos.driver=filesystem |
StorageClass: fast |
Status: Bound |
Claim: default/fast0001 |
Reclaim Policy: Delete |
Access Modes: RWO |
Capacity: 5Gi |
Message: |
Source: |
Type: StorageOS (a StorageOS Persistent Disk resource) |
VolumeName: pvc-480952e7-f8e0-11e6-af8c-08002736b526 |
Namespace: default |
FSType: ext4 |
ReadOnly: false |
No events. |
``` |
1. Create pod which uses the persistent volume claim |
Example spec: |
```yaml |
apiVersion: v1 |
kind: Pod |
metadata: |
labels: |
name: redis |
role: master |
name: test-storageos-redis-sc-pvc |
spec: |
containers: |
- name: master |
image: kubernetes/redis:v1 |
env: |
- name: MASTER |
value: "true" |
ports: |
- containerPort: 6379 |
resources: |
limits: |
cpu: "0.1" |
volumeMounts: |
- mountPath: /redis-master-data |
name: redis-data |
volumes: |
- name: redis-data |
persistentVolumeClaim: |
claimName: fast0001 |
``` |
[Download example](storageos-sc-pvcpod.yaml?raw=true) |
Create the pod: |
```bash |
$ kubectl create -f examples/volumes/storageos/storageos-sc-pvcpod.yaml |
``` |
Verify that the pod has been created: |
```bash |
$ kubectl get pods |
NAME READY STATUS RESTARTS AGE |
test-storageos-redis-sc-pvc 1/1 Running 0 44s |
``` |
<|endoftext|> |
# source: k8s_examples/_archived/volumes/storageos/storageos-pvc.yaml type: yaml |
apiVersion: v1 |
kind: PersistentVolumeClaim |
metadata: |
name: pvc0001 |
spec: |
accessModes: |
- ReadWriteOnce |
resources: |
requests: |
storage: 5Gi |
storageClassName: fast |
<|endoftext|> |
# source: k8s_examples/_archived/volumes/storageos/storageos-sc-pvc.yaml type: yaml |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.