Skip to content

Latest commit

 

History

History
44 lines (33 loc) · 742 Bytes

README.md

File metadata and controls

44 lines (33 loc) · 742 Bytes

Kubernetes Local Persistent Volume: DON'T use hostPath!

YouTube Tutorial

Postgress

kubectl port-forward database-postgresql-0 5432
psql --host localhost \
    --port 5432 \
    --username postgres \
    --password
CREATE DATABASE test_hostpath;
\l

Drain Nodes

kubectl get nodes
kubectl drain <node-name> \
    --delete-emptydir-data \
    --ignore-daemonsets

Prepare Disks

ssh -i ~/Downloads/devops.pem [email protected]
lsblk
sudo mkfs -t xfs /dev/nvme1n1
sudo lsblk -o +UUID

sudo mkdir \
-p /mnt/ssd-disks/<UUID>

sudo mount \
/dev/nvme1n1 \
/mnt/ssd-disks/<UUID>


sudo vi /etc/fstab
UUID=<UUID>  /mnt/ssd-disks/<UUID>  xfs  defaults,nofail  0  2