-
Notifications
You must be signed in to change notification settings - Fork 82
/
Copy pathpostgres.yml
47 lines (47 loc) · 921 Bytes
/
postgres.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
apiVersion: apps/v1
kind: Deployment
metadata:
name: course-postgres
labels:
db: course-postgres
spec:
selector:
matchLabels:
db: course-postgres
template:
metadata:
labels:
db: course-postgres
spec:
containers:
- name: course-postgres
image: postgres:17.4
env:
- name: POSTGRES_USER
value: user
- name: POSTGRES_PASSWORD
value: pwd
- name: POSTGRES_DB
value: course_db
resources:
requests:
cpu: 100m
memory: 60Mi
limits:
cpu: 200m
memory: 120Mi
---
apiVersion: v1
kind: Service
metadata:
name: course-postgres
labels:
db: course-postgres
spec:
type: ClusterIP
selector:
db: course-postgres
ports:
- protocol: TCP
port: 5432
targetPort: 5432