diff --git a/Applications/app_2048.yaml b/Applications/app_2048.yaml new file mode 100644 index 0000000..58cca6c --- /dev/null +++ b/Applications/app_2048.yaml @@ -0,0 +1,66 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: game-2048 + labels: + app: game-2048 +spec: + replicas: 2 + selector: + matchLabels: + app: game-2048 + template: + metadata: + labels: + app: game-2048 + spec: + containers: + - image: alexwhen/docker-2048 # 2048 image + name: game-2048 + ports: + - name: web + containerPort: 80 + +--- +apiVersion: v1 +kind: Service +metadata: + name: game-2048 +spec: + selector: + app: game-2048 + ports: + - port: 80 + targetPort: web + +--- +apiVersion: traefik.containo.us/v1alpha1 +kind: IngressRoute +metadata: + name: game-2048 +spec: + entryPoints: # We listen to requests coming from ports 80 and 443 + - web + - websecure + routes: + - match: Host(`2048.k8sldc.openevents.fr`) + kind: Rule + services: + - name: game-2048 # Requests will be forwarded to this service + port: 80 + tls: + secretName: 2048.k8sldc.openevents.fr + +--- +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: 2048.k8sldc.openevents.fr +spec: + dnsNames: + - 2048.k8sldc.openevents.fr + secretName: 2048.k8sldc.openevents.fr + issuerRef: + name: selfsigned # Use the issuer created previously + kind: ClusterIssuer \ No newline at end of file