2023-12-14 19:34:39 +10:00
|
|
|
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
2023-12-14 19:55:32 +10:00
|
|
|
namespace: pg
|
2023-12-14 19:34:39 +10:00
|
|
|
name: postgres
|
|
|
|
labels:
|
|
|
|
app: postgres
|
|
|
|
spec:
|
2023-12-18 01:18:16 +10:00
|
|
|
externalIPs:
|
|
|
|
- 10.0.4.12
|
2023-12-14 19:34:39 +10:00
|
|
|
selector:
|
|
|
|
app: postgres
|
|
|
|
ports:
|
|
|
|
- protocol: TCP
|
|
|
|
name: postgres
|
|
|
|
port: 5432
|
|
|
|
#nodePort: 30432
|
|
|
|
#type: NodePort
|
2023-12-18 01:18:16 +10:00
|
|
|
# ---
|
|
|
|
# apiVersion: v1
|
|
|
|
# kind: Endpoints
|
|
|
|
# metadata:
|
|
|
|
# namespace: pg
|
|
|
|
# name: postgres #<------ Should match the name of Service
|
|
|
|
# subsets:
|
|
|
|
# - addresses:
|
|
|
|
# - ip: 10.0.4.12
|
|
|
|
# ports:
|
|
|
|
# - port: 5432
|