From f7fa236d3bd9294b1ed7aa3beea10500c305f0eb Mon Sep 17 00:00:00 2001 From: Administrator Date: Tue, 17 Jan 2023 09:56:55 +0000 Subject: [PATCH] add stateless app 2048 --- Applications/app_2048.yaml | 66 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 Applications/app_2048.yaml 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