kubernetes storage 101

Storage concepts from k8 documentation
k8 simple node anatomy
sample list of supported volume types
apiVersion: apps/v1
kind: Deployment
metadata:
name: test-deployment-1
spec:
replicas: 1
selector:
matchLabels:
role: test1
template:
metadata:
labels:
role: test1
spec:
volumes:
- name: existing-pvc
gcePersistentDisk:
pdName: nfs-test-disk1
fsType: ext4
containers:
- name: test-container
image: gcr.io/google_containers/volume-nfs:0.8
volumeMounts:
- mountPath: /data
name: existing-pvc
Persistent Volume (PV) — Persistent Volume Claim (PVC)
allowVolumeExpansion: true
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
annotations:
storageclass.kubernetes.io/is-default-class: "true"
creationTimestamp: "2020-03-24T03:19:07Z"
labels:
addonmanager.kubernetes.io/mode: EnsureExists
kubernetes.io/cluster-service: "true"
name: standard
resourceVersion: "270"
selfLink: /apis/storage.k8s.io/v1/storageclasses/standard
uid: 2822ba7c-f5ef-40ac-9f2d-487ec56ceb19
parameters:
type: pd-standard
provisioner: kubernetes.io/gce-pd
reclaimPolicy: Delete
volumeBindingMode: Immediate
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: faster
provisioner: kubernetes.io/gce-pd
parameters:
type: pd-ssd
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pvc1
spec:
storageClassName: faster
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 30Gi
apiVersion: apps/v1
kind: Deployment
metadata:
name: test-client-1
spec:
replicas: 1
selector:
matchLabels:
role: client-1
template:
metadata:
labels:
role: client-1
spec:
volumes:
- name: client-1-v
persistentVolumeClaim:
claimName: pvc1
containers:
- name: test-container
image: debian
command: ["sh", "-c", "tail -f /dev/null"]
volumeMounts:
- mountPath: /data
name: client-1-v

--

--

--

Listener and reader

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

How to Move Microsoft Access to the Cloud

ETL vs ELT: Considering the Advancement of Data Warehouses

5 mistakes that beginner software developers face when learning to code.

The Software Manager Minimum

Decluttering Taints, Tolerations and Node Affinity

Separating integration tests from unit tests

PARTITIONS IN SPARK

The Benefits of Hiring A Full Stack Developer For MVP Development

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Programmer

Programmer

Listener and reader

More from Medium

Introduction to Openshift Operators

How to: Find ownerReferences of Kubernetes workloads

Use a label to determine whether to forward logs or not with Fluentd daemonset in K8s

Prometheus installation in Google Kubernetes Engine