Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

After creating the Cinder storage class you then need to pass in the ID of a cinder volume to create a persistient volume

cinder create --display_name pv0001 50G - take note of the ID and then ...

apiVersion: "v1"
kind: "PersistentVolume"
metadata:
  name: "pv0001"
spec:
  capacity:
    storage: "50Gi"
  accessModes:
    - "ReadWriteOnce"
  cinder:
    fsType: "ext3"
    volumeID: "<<volume id>>"

Then, you can make volume claims using the same id:

cat > nginx-cinder.yaml << END
apiVersion: v1
kind: Pod
metadata:
  name: aws-web
spec:
  containers:
    - name: web
      image: nginx
      ports:
        - name: web
          containerPort: 80
          hostPort: 8081
          protocol: TCP
      volumeMounts:
        - name: html-volume
          mountPath: "/usr/share/nginx/html"
  volumes:
    - name: html-volume
      cinder:
        # Enter the volume ID below
        volumeID: <<volume id>>
        fsType: ext4
END