Files
k3s-cluster/workloads/school-games-prod/school-games-prod.yaml
T
mcimpoesu fd7c529255 Initial commit: imcu.ro HA k3s cluster manifests
- 3-node HA cluster (k3s v1.36.3+k3s1, embedded etcd) on Hetzner
- Netbird VPN mesh (wt0) for all cluster traffic
- Longhorn distributed storage (2 replicas, /var/lib/longhorn/)
- Traefik ingress (3 replicas, LoadBalancer on all node IPs)
- cert-manager with Let's Encrypt (auto-renewing TLS)
- Gitea (git + container registry) with SQLite on Longhorn
- 4 migrated workloads: wolsey, school-games (3 variants), randomly
- All HelmCharts and workload manifests as YAML
- deploy.sh for one-shot cluster setup
2026-08-16 21:35:21 +03:00

97 lines
2.0 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: school-games
name: school-games
namespace: games
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app: school-games
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
labels:
app: school-games
spec:
containers:
- env:
- name: PORT
value: '3000'
image: gitea.imcu.ro/homeschool/school-games:20260112T132336
imagePullPolicy: IfNotPresent
name: school-games
ports:
- containerPort: 3000
protocol: TCP
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
imagePullSecrets:
- name: gitea-registry
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
---
apiVersion: v1
kind: Service
metadata:
name: school-games-service
namespace: games
spec:
clusterIP: 10.43.115.23
clusterIPs:
- 10.43.115.23
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
ipFamilyPolicy: SingleStack
ports:
- port: 80
protocol: TCP
targetPort: 3000
selector:
app: school-games
sessionAffinity: None
type: ClusterIP
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: school-games-ingress
namespace: games
spec:
ingressClassName: traefik
rules:
- host: school.imcu.ro
http:
paths:
- backend:
service:
name: school-games-service
port:
number: 80
path: /games
pathType: Prefix
- backend:
service:
name: school-games-service
port:
number: 80
path: /
pathType: Exact
tls:
- hosts:
- school.imcu.ro
secretName: school-imcu-ro-tls