111 lines
2.3 KiB
YAML
111 lines
2.3 KiB
YAML
# =============================================
|
|
# Service — PostgreSQL (ClusterIP)
|
|
# Internal DNS name "postgres" used by the API
|
|
# to reach the database. Not exposed publicly.
|
|
# =============================================
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: postgres
|
|
namespace: taskmanager
|
|
labels:
|
|
app: postgres
|
|
spec:
|
|
selector:
|
|
app: postgres
|
|
ports:
|
|
- name: postgres
|
|
port: 5432
|
|
targetPort: 5432
|
|
type: ClusterIP
|
|
|
|
---
|
|
# =============================================
|
|
# Service — Redis (ClusterIP)
|
|
# Internal DNS name "redis" used by the API.
|
|
# Not exposed publicly.
|
|
# =============================================
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: redis
|
|
namespace: taskmanager
|
|
labels:
|
|
app: redis
|
|
spec:
|
|
selector:
|
|
app: redis
|
|
ports:
|
|
- name: redis
|
|
port: 6379
|
|
targetPort: 6379
|
|
type: ClusterIP
|
|
|
|
---
|
|
# =============================================
|
|
# Service — Task Manager API (ClusterIP)
|
|
# Internal DNS name "taskmanager-api" reachable
|
|
# by the Nginx frontend reverse proxy.
|
|
# =============================================
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: taskmanager-api
|
|
namespace: taskmanager
|
|
labels:
|
|
app: taskmanager-api
|
|
spec:
|
|
selector:
|
|
app: taskmanager-api
|
|
ports:
|
|
- name: http
|
|
port: 3000
|
|
targetPort: 3000
|
|
type: ClusterIP
|
|
|
|
---
|
|
# =============================================
|
|
# Service — Nginx Frontend (NodePort)
|
|
# Exposes the UI at http://<NodeIP>:30080
|
|
# so the application is reachable from the
|
|
# host machine without an Ingress controller.
|
|
# =============================================
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: taskmanager-frontend
|
|
namespace: taskmanager
|
|
labels:
|
|
app: taskmanager-frontend
|
|
spec:
|
|
selector:
|
|
app: taskmanager-frontend
|
|
ports:
|
|
- name: http
|
|
port: 80
|
|
targetPort: 80
|
|
nodePort: 30080
|
|
type: NodePort
|
|
|
|
---
|
|
# =============================================
|
|
# Service — Adminer (NodePort)
|
|
# Exposes the database web UI at port 30081.
|
|
# =============================================
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: taskmanager-adminer
|
|
namespace: taskmanager
|
|
labels:
|
|
app: taskmanager-adminer
|
|
spec:
|
|
selector:
|
|
app: taskmanager-adminer
|
|
ports:
|
|
- name: http
|
|
port: 8080
|
|
targetPort: 8080
|
|
nodePort: 30081
|
|
type: NodePort
|