EMOTIA / infrastructure /kubernetes /services.yaml
Manav2op's picture
Upload folder using huggingface_hub
25d0747 verified
apiVersion: v1
kind: Service
metadata:
name: emotia-backend-service
namespace: emotia
labels:
app: emotia-backend
spec:
selector:
app: emotia-backend
ports:
- name: http
port: 8000
targetPort: 8000
protocol: TCP
- name: websocket
port: 8080
targetPort: 8080
protocol: TCP
type: ClusterIP
---
apiVersion: v1
kind: Service
metadata:
name: emotia-frontend-service
namespace: emotia
labels:
app: emotia-frontend
spec:
selector:
app: emotia-frontend
ports:
- name: http
port: 3000
targetPort: 3000
protocol: TCP
type: ClusterIP
---
apiVersion: v1
kind: Service
metadata:
name: redis-service
namespace: emotia
labels:
app: redis
spec:
selector:
app: redis
ports:
- name: redis
port: 6379
targetPort: 6379
protocol: TCP
type: ClusterIP
---
apiVersion: v1
kind: Service
metadata:
name: prometheus-service
namespace: emotia
labels:
app: prometheus
spec:
selector:
app: prometheus
ports:
- name: http
port: 9090
targetPort: 9090
protocol: TCP
type: ClusterIP
---
apiVersion: v1
kind: Service
metadata:
name: grafana-service
namespace: emotia
labels:
app: grafana
spec:
selector:
app: grafana
ports:
- name: http
port: 3000
targetPort: 3000
protocol: TCP
type: ClusterIP
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: emotia-ingress
namespace: emotia
annotations:
nginx.ingress.kubernetes.io/ssl-redirect: "true"
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
cert-manager.io/cluster-issuer: "letsencrypt-prod"
nginx.ingress.kubernetes.io/rate-limit: "100"
nginx.ingress.kubernetes.io/rate-limit-window: "1m"
spec:
ingressClassName: nginx
tls:
- hosts:
- emotia.example.com
- api.emotia.example.com
secretName: emotia-tls
rules:
- host: emotia.example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: emotia-frontend-service
port:
number: 3000
- host: api.emotia.example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: emotia-backend-service
port:
number: 8000