SlideShare une entreprise Scribd logo
1  sur  22
Télécharger pour lire hors ligne
Persistent Storage
w/ Kubernetes & OpenShift
© 2015
Mark Turansky - mturansk@redhat.com
Red Hat and Kube
Stuff we’ve built
● Storage
● Secrets
● Quotas
● Limit Ranges
● Deployments
● … and more
Stuff we contribute to
● lots of API server
● Networking
● Auth & Authz
● Security contexts
● Scalability
● … and more
OpenShift and Kube
Stuff we add around Kube
● Automatic Builds & Deployments
● Application Templates
● STI (Source-to-image) builder
● Tons of RH approved/tested images
● Red Hat’s standard of excellence and support for
open source technology
Managing compute != managing storage
Pets vs. Cattle
Pets
● Have names and identity
● You care about them
● You nurse them back to
health when sick
Cattle
● Have numbers
● Are just like other cattle
● You don’t care about them
● You get a new ones
Persistent Storage
Goals
● Allow admins to describe storage
● Allow users to request storage
● No tight coupling to any disk, server, network,
or storage device
Two API objects
PersistentVolume (PV)
PersistentVolumeClaim (PVC)
PersistentVolume
● A PV is a real piece of networked storage in the cluster
provisioned by an administrator.
● PVs are resources like nodes are resources
● Long lifecycle independent of any pod
Persistent Volume
apiVersion: v1
kind: PersistentVolume
metadata:
name: pv0003
spec:
capacity:
storage: 5Gi
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Recycle
nfs:
path: /tmp
server: 172.17.0.2
Persistent Volume Claim
● A request for storage by a user
● Allows specific resource requests (e.g, size, access modes)
● Used like a claim check
Persistent Volume Claim
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: myclaim
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 3Gi
Storage Lifecycle
● Provisioning
● Binding
● Using
● Releasing
● Reclaiming
Provisioning
● Dynamic
● Scripted
● Manual
Binding
● Claims matched to volumes
● Always more, never less
● Claim can be unbound indefinitely
Using a claim check
kind: Pod
apiVersion: v1
metadata:
name: mypod
labels:
name: frontendhttp
spec:
containers:
- name: myfrontend
image: nginx
ports:
- containerPort: 80
name: "http-server"
volumeMounts:
- mountPath: "/var/www/html"
name: mypd
volumes:
- name: mypd
persistentVolumeClaim:
claimName: myclaim
* Claims and Pods must be
in the same namespace!
Re-use your claim
$ oc delete pod mypod
● Deleting a pod does not delete your claim
● Re-use your claim in another pod
Releasing
$ oc delete pvc myclaim
● Delete your claim to release your storage
● Volume is “released” but not available for another claim
● Recycling policy can scrub the volume to clean previous
claimant’s data
Reclaiming
● Reclaim policy per volume
● Scrubbing is configurable (PR #9870)
● Delete/Recreate via dynamic provisioning
● PVs are “Retain” by default and can be manually reclaimed
Types of persistent volumes
● GCEPersistentDisk
● AWSElasticBlockStore
● NFS
● Glusterfs
● iSCSI
● RBD (Ceph block device)
● HostPath (for testing)
● Fiber Channel
● Cephfs
● Cinder & Manila
Demo!
Wordpress + MySQL
Both require persistent storage
https://github.com/openshift/origin/tree/master/examples/wordpress
Roadmap
● Robust security between pods, volumes, and containers
● Scalable storage and nominal services
● Dynamic provisioning
https://github.com/openshift/origin
Red Hat & Project Atomic
swag and raffles and smart people
Booth #310
github: markturansky
irc: markturansky
#openshift-dev
#google-containers

Contenu connexe

Tendances

Tendances (20)

Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
 
Docker introduction & benefits
Docker introduction & benefitsDocker introduction & benefits
Docker introduction & benefits
 
Introduction to helm
Introduction to helmIntroduction to helm
Introduction to helm
 
An Introduction to Kubernetes
An Introduction to KubernetesAn Introduction to Kubernetes
An Introduction to Kubernetes
 
Red Hat OpenShift on Bare Metal and Containerized Storage
Red Hat OpenShift on Bare Metal and Containerized StorageRed Hat OpenShift on Bare Metal and Containerized Storage
Red Hat OpenShift on Bare Metal and Containerized Storage
 
Deep dive into Kubernetes Networking
Deep dive into Kubernetes NetworkingDeep dive into Kubernetes Networking
Deep dive into Kubernetes Networking
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
OpenShift Virtualization - VM and OS Image Lifecycle
OpenShift Virtualization - VM and OS Image LifecycleOpenShift Virtualization - VM and OS Image Lifecycle
OpenShift Virtualization - VM and OS Image Lifecycle
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
Kubernetes - introduction
Kubernetes - introductionKubernetes - introduction
Kubernetes - introduction
 
An intro to Kubernetes operators
An intro to Kubernetes operatorsAn intro to Kubernetes operators
An intro to Kubernetes operators
 
Kubernetes Workshop
Kubernetes WorkshopKubernetes Workshop
Kubernetes Workshop
 
Docker Swarm for Beginner
Docker Swarm for BeginnerDocker Swarm for Beginner
Docker Swarm for Beginner
 
01. Kubernetes-PPT.pptx
01. Kubernetes-PPT.pptx01. Kubernetes-PPT.pptx
01. Kubernetes-PPT.pptx
 
Kubernetes Networking
Kubernetes NetworkingKubernetes Networking
Kubernetes Networking
 
Docker Swarm 0.2.0
Docker Swarm 0.2.0Docker Swarm 0.2.0
Docker Swarm 0.2.0
 
Kubernetes - A Comprehensive Overview
Kubernetes - A Comprehensive OverviewKubernetes - A Comprehensive Overview
Kubernetes - A Comprehensive Overview
 
Scaling Microservices with Kubernetes
Scaling Microservices with KubernetesScaling Microservices with Kubernetes
Scaling Microservices with Kubernetes
 
Kubernetes Application Deployment with Helm - A beginner Guide!
Kubernetes Application Deployment with Helm - A beginner Guide!Kubernetes Application Deployment with Helm - A beginner Guide!
Kubernetes Application Deployment with Helm - A beginner Guide!
 
(발표자료) CentOS EOL에 따른 대응 OS 검토 및 적용 방안.pdf
(발표자료) CentOS EOL에 따른 대응 OS 검토 및 적용 방안.pdf(발표자료) CentOS EOL에 따른 대응 OS 검토 및 적용 방안.pdf
(발표자료) CentOS EOL에 따른 대응 OS 검토 및 적용 방안.pdf
 

En vedette

En vedette (20)

Stateful Containers: Flocker on CoreOS
Stateful Containers: Flocker on CoreOSStateful Containers: Flocker on CoreOS
Stateful Containers: Flocker on CoreOS
 
Docker Meetup - Melbourne 2015 - Kubernetes Deep Dive
Docker Meetup - Melbourne 2015 - Kubernetes Deep DiveDocker Meetup - Melbourne 2015 - Kubernetes Deep Dive
Docker Meetup - Melbourne 2015 - Kubernetes Deep Dive
 
How OpenShift SDN helps to automate
How OpenShift SDN helps to automateHow OpenShift SDN helps to automate
How OpenShift SDN helps to automate
 
Build a PaaS with OpenShift Origin
Build a PaaS with OpenShift OriginBuild a PaaS with OpenShift Origin
Build a PaaS with OpenShift Origin
 
OpenShift Enterprise 3.1 vs kubernetes
OpenShift Enterprise 3.1 vs kubernetesOpenShift Enterprise 3.1 vs kubernetes
OpenShift Enterprise 3.1 vs kubernetes
 
Telecommunications organizations trust Red Hat
Telecommunications organizations trust Red HatTelecommunications organizations trust Red Hat
Telecommunications organizations trust Red Hat
 
Red Hat OpenShift Enterprise 2 Launch Webcast Slides Dec 3, 2013
Red Hat OpenShift Enterprise 2 Launch Webcast Slides Dec 3, 2013Red Hat OpenShift Enterprise 2 Launch Webcast Slides Dec 3, 2013
Red Hat OpenShift Enterprise 2 Launch Webcast Slides Dec 3, 2013
 
Scaling docker with kubernetes
Scaling docker with kubernetesScaling docker with kubernetes
Scaling docker with kubernetes
 
Using OpenShift PaaS
Using OpenShift PaaSUsing OpenShift PaaS
Using OpenShift PaaS
 
Chicago Microservices Integration Talk
Chicago Microservices Integration TalkChicago Microservices Integration Talk
Chicago Microservices Integration Talk
 
Camel Desing Patterns Learned Through Blood, Sweat, and Tears
Camel Desing Patterns Learned Through Blood, Sweat, and TearsCamel Desing Patterns Learned Through Blood, Sweat, and Tears
Camel Desing Patterns Learned Through Blood, Sweat, and Tears
 
Mastering xPaaS - get down and dirty in the OpenShift Cloud (part I)
Mastering xPaaS - get down and dirty in the OpenShift Cloud (part I)Mastering xPaaS - get down and dirty in the OpenShift Cloud (part I)
Mastering xPaaS - get down and dirty in the OpenShift Cloud (part I)
 
Building Domain-specific PaaS with OpenShift Origin: The TRESOR Healthcare P...
 Building Domain-specific PaaS with OpenShift Origin: The TRESOR Healthcare P... Building Domain-specific PaaS with OpenShift Origin: The TRESOR Healthcare P...
Building Domain-specific PaaS with OpenShift Origin: The TRESOR Healthcare P...
 
Persistent, Portable Storage for Docker Containers and Microservices
Persistent, Portable Storage  for Docker Containers and MicroservicesPersistent, Portable Storage  for Docker Containers and Microservices
Persistent, Portable Storage for Docker Containers and Microservices
 
OpenShift Enterprise
OpenShift EnterpriseOpenShift Enterprise
OpenShift Enterprise
 
KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...
KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...
KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...
 
OpenShift PaaS Anywhere (Infrastructure.Next Ghent 2014-02-24) Diane Mueller
OpenShift PaaS Anywhere (Infrastructure.Next Ghent 2014-02-24) Diane Mueller OpenShift PaaS Anywhere (Infrastructure.Next Ghent 2014-02-24) Diane Mueller
OpenShift PaaS Anywhere (Infrastructure.Next Ghent 2014-02-24) Diane Mueller
 
Cluster management with Kubernetes
Cluster management with KubernetesCluster management with Kubernetes
Cluster management with Kubernetes
 
Automated Image Builds in OpenShift and Kubernetes
Automated Image Builds in OpenShift and KubernetesAutomated Image Builds in OpenShift and Kubernetes
Automated Image Builds in OpenShift and Kubernetes
 
Developing Microservices with Apache Camel
Developing Microservices with Apache CamelDeveloping Microservices with Apache Camel
Developing Microservices with Apache Camel
 

Similaire à Persistent Storage with Containers with Kubernetes & OpenShift

Deep dive into OpenStack storage, Sean Cohen, Red Hat
Deep dive into OpenStack storage, Sean Cohen, Red HatDeep dive into OpenStack storage, Sean Cohen, Red Hat
Deep dive into OpenStack storage, Sean Cohen, Red Hat
Sean Cohen
 
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
QAware GmbH
 

Similaire à Persistent Storage with Containers with Kubernetes & OpenShift (20)

Kubernetes #4 volume & stateful set
Kubernetes #4   volume & stateful setKubernetes #4   volume & stateful set
Kubernetes #4 volume & stateful set
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
Edge Side APIs: Fast and Reliable Hypermedia APIs
Edge Side APIs: Fast and Reliable Hypermedia APIsEdge Side APIs: Fast and Reliable Hypermedia APIs
Edge Side APIs: Fast and Reliable Hypermedia APIs
 
apidays LIVE Paris 2021 - Edge Side APIs by Kevin Dunglas, Les Tilleuls
apidays LIVE Paris 2021 - Edge Side APIs by Kevin Dunglas, Les Tilleulsapidays LIVE Paris 2021 - Edge Side APIs by Kevin Dunglas, Les Tilleuls
apidays LIVE Paris 2021 - Edge Side APIs by Kevin Dunglas, Les Tilleuls
 
Kubernetes basics and hands on exercise
Kubernetes basics and hands on exerciseKubernetes basics and hands on exercise
Kubernetes basics and hands on exercise
 
Alexander Torosh "Projects scaling with Amazon Web Services"
Alexander Torosh "Projects scaling with Amazon Web Services"Alexander Torosh "Projects scaling with Amazon Web Services"
Alexander Torosh "Projects scaling with Amazon Web Services"
 
Kubernetes Intro
Kubernetes IntroKubernetes Intro
Kubernetes Intro
 
Autopilot : Securing Cloud Native Storage
Autopilot : Securing Cloud Native StorageAutopilot : Securing Cloud Native Storage
Autopilot : Securing Cloud Native Storage
 
Kube con china_2019_7 missing factors for your production-quality 12-factor apps
Kube con china_2019_7 missing factors for your production-quality 12-factor appsKube con china_2019_7 missing factors for your production-quality 12-factor apps
Kube con china_2019_7 missing factors for your production-quality 12-factor apps
 
K8s best practices from the field!
K8s best practices from the field!K8s best practices from the field!
K8s best practices from the field!
 
Gluster Contenarized Storage for Cloud Applications
Gluster Contenarized Storage for Cloud ApplicationsGluster Contenarized Storage for Cloud Applications
Gluster Contenarized Storage for Cloud Applications
 
Gluster Containerized Storage for Cloud Applications
Gluster Containerized Storage for Cloud ApplicationsGluster Containerized Storage for Cloud Applications
Gluster Containerized Storage for Cloud Applications
 
Private Cloud with Open Stack, Docker
Private Cloud with Open Stack, DockerPrivate Cloud with Open Stack, Docker
Private Cloud with Open Stack, Docker
 
Openstack days sv building highly available services using kubernetes (preso)
Openstack days sv   building highly available services using kubernetes (preso)Openstack days sv   building highly available services using kubernetes (preso)
Openstack days sv building highly available services using kubernetes (preso)
 
Kubernetes on AWS
Kubernetes on AWSKubernetes on AWS
Kubernetes on AWS
 
Kubernetes on AWS
Kubernetes on AWSKubernetes on AWS
Kubernetes on AWS
 
DTW18 - code08 - Everything You Need To Know About Storage with Kubernetes
DTW18 - code08 - Everything You Need To Know About Storage with KubernetesDTW18 - code08 - Everything You Need To Know About Storage with Kubernetes
DTW18 - code08 - Everything You Need To Know About Storage with Kubernetes
 
Deep dive into OpenStack storage, Sean Cohen, Red Hat
Deep dive into OpenStack storage, Sean Cohen, Red HatDeep dive into OpenStack storage, Sean Cohen, Red Hat
Deep dive into OpenStack storage, Sean Cohen, Red Hat
 
Deep Dive into Openstack Storage, Sean Cohen, Red Hat
Deep Dive into Openstack Storage, Sean Cohen, Red HatDeep Dive into Openstack Storage, Sean Cohen, Red Hat
Deep Dive into Openstack Storage, Sean Cohen, Red Hat
 
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
 

Dernier

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Dernier (20)

Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 

Persistent Storage with Containers with Kubernetes & OpenShift

  • 1. Persistent Storage w/ Kubernetes & OpenShift © 2015 Mark Turansky - mturansk@redhat.com
  • 2. Red Hat and Kube Stuff we’ve built ● Storage ● Secrets ● Quotas ● Limit Ranges ● Deployments ● … and more Stuff we contribute to ● lots of API server ● Networking ● Auth & Authz ● Security contexts ● Scalability ● … and more
  • 3. OpenShift and Kube Stuff we add around Kube ● Automatic Builds & Deployments ● Application Templates ● STI (Source-to-image) builder ● Tons of RH approved/tested images ● Red Hat’s standard of excellence and support for open source technology
  • 4. Managing compute != managing storage
  • 5. Pets vs. Cattle Pets ● Have names and identity ● You care about them ● You nurse them back to health when sick Cattle ● Have numbers ● Are just like other cattle ● You don’t care about them ● You get a new ones
  • 6. Persistent Storage Goals ● Allow admins to describe storage ● Allow users to request storage ● No tight coupling to any disk, server, network, or storage device
  • 7. Two API objects PersistentVolume (PV) PersistentVolumeClaim (PVC)
  • 8. PersistentVolume ● A PV is a real piece of networked storage in the cluster provisioned by an administrator. ● PVs are resources like nodes are resources ● Long lifecycle independent of any pod
  • 9. Persistent Volume apiVersion: v1 kind: PersistentVolume metadata: name: pv0003 spec: capacity: storage: 5Gi accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Recycle nfs: path: /tmp server: 172.17.0.2
  • 10. Persistent Volume Claim ● A request for storage by a user ● Allows specific resource requests (e.g, size, access modes) ● Used like a claim check
  • 11. Persistent Volume Claim kind: PersistentVolumeClaim apiVersion: v1 metadata: name: myclaim spec: accessModes: - ReadWriteOnce resources: requests: storage: 3Gi
  • 12. Storage Lifecycle ● Provisioning ● Binding ● Using ● Releasing ● Reclaiming
  • 14. Binding ● Claims matched to volumes ● Always more, never less ● Claim can be unbound indefinitely
  • 15. Using a claim check kind: Pod apiVersion: v1 metadata: name: mypod labels: name: frontendhttp spec: containers: - name: myfrontend image: nginx ports: - containerPort: 80 name: "http-server" volumeMounts: - mountPath: "/var/www/html" name: mypd volumes: - name: mypd persistentVolumeClaim: claimName: myclaim * Claims and Pods must be in the same namespace!
  • 16. Re-use your claim $ oc delete pod mypod ● Deleting a pod does not delete your claim ● Re-use your claim in another pod
  • 17. Releasing $ oc delete pvc myclaim ● Delete your claim to release your storage ● Volume is “released” but not available for another claim ● Recycling policy can scrub the volume to clean previous claimant’s data
  • 18. Reclaiming ● Reclaim policy per volume ● Scrubbing is configurable (PR #9870) ● Delete/Recreate via dynamic provisioning ● PVs are “Retain” by default and can be manually reclaimed
  • 19. Types of persistent volumes ● GCEPersistentDisk ● AWSElasticBlockStore ● NFS ● Glusterfs ● iSCSI ● RBD (Ceph block device) ● HostPath (for testing) ● Fiber Channel ● Cephfs ● Cinder & Manila
  • 20. Demo! Wordpress + MySQL Both require persistent storage https://github.com/openshift/origin/tree/master/examples/wordpress
  • 21. Roadmap ● Robust security between pods, volumes, and containers ● Scalable storage and nominal services ● Dynamic provisioning
  • 22. https://github.com/openshift/origin Red Hat & Project Atomic swag and raffles and smart people Booth #310 github: markturansky irc: markturansky #openshift-dev #google-containers