add stateless app 2048
This commit is contained in:
parent
d233d85f48
commit
f7fa236d3b
1 changed files with 66 additions and 0 deletions
66
Applications/app_2048.yaml
Normal file
66
Applications/app_2048.yaml
Normal file
|
|
@ -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
|
||||
Loading…
Add table
Reference in a new issue