skolplattformen-backup/k8s/api-service.yaml

52 lines
1.1 KiB
YAML

apiVersion: v1
kind: Service
metadata:
name: skolplattformen-api
namespace: skolplattformen
spec:
ports:
- port: 9000
type: LoadBalancer
selector:
app: skolplattformen-api
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: skolplattformen-api
namespace: skolplattformen
spec:
selector:
matchLabels:
app: skolplattformen-api
template:
metadata:
labels:
app: skolplattformen-api
spec:
containers:
- name: skolplattformen-api
image: irony/skolplattformen-api
ports:
- containerPort: 9000
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: skolplattformen-api-ingress
namespace: skolplattformen
annotations:
kubernetes.io/ingress.class: "nginx"
cert-manager.io/cluster-issuer: "letsencrypt-prod"
spec:
tls:
- hosts:
- skolplattformen-api.snowflake.cash
secretName: skolplattformen-api-prod-tls
rules:
- host: skolplattformen-api.snowflake.cash
http:
paths:
- backend:
serviceName: skolplattformen-api
servicePort: 8000