• / company
    • about us
      • / about us

        The partner of choice for data & product engineering to drive business growth & deliver an impact within your organization
    • product engineering
      • / product engineering
        We specialize in Software Product Engineering, transforming your concepts into impactful products.
    • technology
      • / technology
        250+ specialists skilled in software, BI, integration, offering end-to-end services from research to ongoing maintenance.
    • methodology
      • / methodology
        We specialize in software product engineering, transforming your concepts into impactful products.
    • careers
      • / careers
        Our team needs one more awesome person, like you. Let’s grow together! Why not give it a try?
    • do good
      • / do good
        We’re a team devoted to making the world better with small acts. We get involved and always stand for kindness.
    • events
      • / events
        LLMs in Action: Transforming How We Work, Communicate, and Innovate
    • blog
      • / blog
        Why Every Developer Should Care About AI Plugins, And What You Might Be Missing
        mindit chats with Andreea Moldovan: “At mindit.io people really put effort into making it happen.”
    • contact us
      • / contact us
        We would love to hear from you! We have offices and teams in Romania and Switzerland. How can we make your business thrive?
  • / get in touch

Kubernetes 101 – Volumes

Introduction

Q:What is a Volume

A: A directory with data accessible to all containers in a pod.

Kubernetes supports many types of volumes.

Persistent Volumes

Ephemeral Volumes

Projected Volumes

etc.

A pod can use any number of volume types simultaneously.
Persistent Volume (PV)

This is a storage element in a cluster, defined manually by an administrator or dynamically defined by a storage class.

A PV has its own lifecycle, separate from the lifecycle of Kubernetes pods.

apiVersion: v1

kind: PersistentVolume

metadata:

name: pv-volume

spec:

storageClassName: manual

capacity:

storage: 10Gi

accessModes:

– ReadWriteOnce

hostPath:

path: “/mnt/data”
Persistent Volume Claim (PVC)

This one defines a storage request.

Let’s say we have an application running on a container that needs a certain type of storage: 3 Gi of storage and needs to read and write data.

apiVersion: v1

kind: PersistentVolumeClaim

metadata:

name: pv-claim

spec:

storageClassName: manual

accessModes: – ReadWriteOnce

resources:

requests:

storage: 3Gi
Usage

Let’s put them all together!

The pod running the application doesn’t need to know the exact PV it’s accessing.

It only needs to specify what type of access it needs, how much storage, and what type of storage.

apiVersion: v1

kind: Pod

metadata:

name: pv-pod

spec:

volumes:

– name: pv-storage

persistentVolumeClaim:

claimName: pv-claim

containers:

– name: pv-container

image: nginx

volumeMounts:

– mountPath: “/usr/share/nginx/html”

name: pv-storage
Follow the Kubernetes 101 series on mindit.io.
Check out new-spike.net for other articles on Kubernetes and much more!

Distribute:

/turn your vision into reality

The best way to start a long-term collaboration is with a Pilot project. Let’s talk.