Uploaded image for project: 'Product Technical Learning'
  1. Product Technical Learning
  2. PTL-13397

ch03s01: incorrectly states that OpenShift does not use the VOLUME instruction

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False
    • 3
    • en-US (English)

      Please fill in the following information:


       
      Issue description

      Section "Declare Volumes" states:

      OpenShift does not use the VOLUME instruction. When you deploy container images, the cluster does not attach any volumes to the application by default.

      This is not true. If an image declares any volumes in its metadata, OpenShift attaches an EmptyDir type volume in the location specified by the VOLUME directive.

      $ skopeo inspect --config docker://registry.access.redhat.com/rhscl/mysql-56-rhel7:latest | jq .config.Volumes
      {
        "/var/lib/mysql/data": {}
      }
      
      $ oc new-app --name=withvolume registry.access.redhat.com/rhscl/mysql-56-rhel7:latest
      --> Found container image 63d6bb ...
      
      $ oc set volumes deploy/withvolume
       withvolume
        empty directory as withvolume-volume-1
          mounted at /var/lib/mysql/data

              gregab@p0f.net Grega Bremec
              gregab@p0f.net Grega Bremec
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: