-
Notifications
You must be signed in to change notification settings - Fork 44
/
deployment.yaml
46 lines (46 loc) · 895 Bytes
/
deployment.yaml
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
apiVersion: apps/v1
kind: Deployment
metadata:
name: postgresql
spec:
selector:
matchLabels:
app: postgresql
template:
metadata:
labels:
app: postgresql
spec:
containers:
- name: postgresql
image: registry.redhat.io/rhel9/postgresql-15
resources:
requests:
memory: "128Mi"
cpu: "200m"
limits:
memory: "512Mi"
cpu: "500m"
ports:
- containerPort: 5432
env:
- name: POSTGRESQL_USER
value: spring
- name: POSTGRESQL_PASSWORD
value: spring123
- name: POSTGRESQL_DATABASE
value: sampledb
---
apiVersion: v1
kind: Service
metadata:
name: postgresql
labels:
app: postgresql
spec:
type: ClusterIP
selector:
app: postgresql
ports:
- port: 5432
name: tcp