apiVersion: v1
kind: Service
metadata:
  name: backend
  labels:
    app: django-app
spec:
  selector:
    app: django-app
  ports:
  - port: 8000
    targetPort: 8000
  type: ClusterIP

---
apiVersion: v1
kind: Service
metadata:
  name: redis
  labels:
    app: redis
spec:
  selector:
    app: redis
  ports:
  - port: 6379
    targetPort: 6379
  type: ClusterIP

---
apiVersion: v1
kind: Service
metadata:
  name: postgres
  labels:
    app: postgres
spec:
  selector:
    app: postgres
  ports:
  - port: 5432
    targetPort: 5432
  type: ClusterIP

---
apiVersion: v1
kind: Service
metadata:
  name: frontend
  labels:
    app: frontend
spec:
  selector:
    app: frontend
  ports:
  - port: 80
    targetPort: 80
  type: ClusterIP

---
apiVersion: v1
kind: Service
metadata:
  name: nginx-rtmp
  labels:
    app: nginx-rtmp
spec:
  selector:
    app: nginx-rtmp
  ports:
  - port: 1935
    targetPort: 1935
    name: rtmp
  - port: 8081
    targetPort: 80
    name: http
  type: ClusterIP