/var/lib/postgresql/data exists but is not empty
% kubectl logs db The files belonging to this database system will be owned by user "postgres". This user must also own the server process. The database cluster will be initialized with locale "en_US.utf8". The default database encoding has accordingly been set to "UTF8". The default text search configuration will be set to "english". Data page checksums are disabled. initdb: directory "/var/lib/postgresql/data" exists but is not empty It contains a lost+found directory, perhaps due to it being a mount point. Using a mount point directly as the data directory is not recommended. Create a subdirectory under the mount point.
# db-pod.yaml volumeMounts: - mountPath: /var/lib/postgresql/data name: db-data subPath: postgres #Add subPath
% kubectl delete pod db % kubectl get pod % kubectl create -f db-pod.yaml #Don't use kubectl apply -f db-pod.yaml
username : postgres ...... #port (1) #postgresql (5) #docker (30)
Portainer server for...... #portainer (2) #k8s (10)
kubectl scale --repl...... #kubectl (6) #kops (6) #k8s (10) #scaleout (1)