mirror of
https://github.com/Noratrieb/vps.git
synced 2026-01-16 17:45:14 +01:00
More
This commit is contained in:
parent
1b8879c684
commit
4be274f187
12 changed files with 270 additions and 12 deletions
65
kube/apps/hugo-chat-db.yaml
Normal file
65
kube/apps/hugo-chat-db.yaml
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
# https://www.containiq.com/post/deploy-postgres-on-kubernetes
|
||||
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: hugo-chat-db-config
|
||||
data:
|
||||
POSTGRES_PASSWORD: huGO123.corsBOSS
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: hugo-chat-db-volume-claim
|
||||
spec:
|
||||
storageClassName: local-storage
|
||||
resources:
|
||||
requests:
|
||||
storage: 100Mi
|
||||
volumeMode: Filesystem
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: hugo-chat-db
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: hugo-chat-db
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: hugo-chat-db
|
||||
spec:
|
||||
containers:
|
||||
- name: hugo-chat-db
|
||||
image: docker.io/postgres:latest
|
||||
resources:
|
||||
limits:
|
||||
memory: "256Mi"
|
||||
cpu: "500m"
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: hugo-chat-db-config
|
||||
volumeMounts:
|
||||
- mountPath: /var/lib/postgresql/data
|
||||
name: postgredb
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
volumes:
|
||||
- name: postgredb
|
||||
persistentVolumeClaim:
|
||||
claimName: hugo-chat-db-volume-claim
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: hugo-chat-db-service
|
||||
spec:
|
||||
selector:
|
||||
app: hugo-chat-db
|
||||
ports:
|
||||
- port: 5432
|
||||
targetPort: 5432
|
||||
Loading…
Add table
Add a link
Reference in a new issue