Files
website/kubernetes.yaml
start.vaadin.com 7e577093a5 Generated project
2024-05-27 21:00:34 +00:00

41 lines
784 B
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: website
namespace: default
spec:
replicas: 2
selector:
matchLabels:
app: website
template:
metadata:
labels:
app: website
spec:
containers:
- name: website
image: website:latest
imagePullPolicy: Never
ports:
- containerPort: 8080
resources:
limits:
memory: 512Mi
cpu: '1'
---
apiVersion: v1
kind: Service
metadata:
name: website-balancer
spec:
selector:
app: website
ports:
- protocol: TCP
port: 8000 # The port to expose to the outside
targetPort: 8080 # The port the application is running on in the pods
type: LoadBalancer
sessionAffinity: ClientIP