Storage Cheat Sheet
Storage Types in DevOps
- Block Storage – Used for databases, VMs, containers (e.g., EBS, Cinder)
- File Storage – Used for shared access & persistence (e.g., NFS, EFS)
- Object Storage – Used for backups, logs, and media (e.g., S3, MinIO)
Disk Management (Linux)
AWS S3
Azure Blob Storage
Upload a file to Azure Blob
az storage blob upload --container-name mycontainer --file file.txt --name file.txt
Download a file from Azure Blob
az storage blob download --container-name mycontainer --name file.txt --file file.txt
Google Cloud Storage (GCS)
Linux Storage Monitoring
Linux Backup
AWS Backup
Azure Backup
YAML Configurations:
Persistent Volume (PV)
apiVersion: v1
kind: PersistentVolume
metadata:
name: my-pv
spec:
capacity:
storage: 10Gi
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
hostPath:
path: "/mnt/data"
Persistent Volume Claim (PVC)
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: my-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
Pod with Persistent Volume
apiVersion: v1
kind: Pod
metadata:
name: storage-pod
spec:
containers:
- name: app
image: nginx
volumeMounts:
- mountPath: "/usr/share/nginx/html"
name: storage-volume
volumes:
- name: storage-volume
persistentVolumeClaim:
claimName: my-pvc
Terraform Configurations:
- AWS S3 Bucket
provider "aws" {
region = "us-east-1"
}
resource "aws_s3_bucket" "devops_bucket" {
bucket = "devops-backup-bucket"
acl = "private"
}
output "bucket_name" {
value = aws_s3_bucket.devops_bucket.id
}
- Azure Storage Account