add postgres local pv

This commit is contained in:
2023-01-12 09:18:34 +11:00
parent cd52c8d4be
commit 2c54e240d1
3 changed files with 29 additions and 4 deletions
+25
View File
@@ -0,0 +1,25 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: postgres-local-pv
labels:
type: local
name: postgres
spec:
capacity:
storage: 20Gi
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Delete
storageClassName: local-storage
local:
path: /mnt/k8s/db-data-new-postgres-postgresql-0-pvc-79d165df-18f4-404c-ae25-8fc80ba415c6
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- server-3
+3 -3
View File
@@ -1,4 +1,6 @@
# Full configuration https://kubernetes.io/docs/reference/config-api/kubeadm-config.v1beta2/
kind: ClusterConfiguration
kubernetesVersion: v1.26.0
apiVersion: kubeadm.k8s.io/v1beta3
bootstrapTokens:
- groups:
@@ -41,9 +43,7 @@ etcd:
- https://192.168.1.111:2379
- https://192.168.1.2:2379
keyFile: /etc/etcd/etcd-key.pem
imageRepository: k8s.gcr.io
kind: ClusterConfiguration
kubernetesVersion: v1.24.1
imageRepository: registry.k8s.io
networking:
dnsDomain: cluster.local
podSubnet: 10.244.0.0/16
+1 -1
View File
@@ -129,7 +129,7 @@ sudo vim /var/lib/kubelet/kubeadm-flags.env
lsof | awk '{print $2}' | sort | uniq -c | sort -n
# too many open files
sudo /etc/sysctl.conf
sudo vim /etc/sysctl.conf
fs.inotify.max_user_instances=2048
fs.file-max = 500000