Generated project
This commit is contained in:
40
kubernetes.yaml
Normal file
40
kubernetes.yaml
Normal file
@@ -0,0 +1,40 @@
|
||||
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
|
Reference in New Issue
Block a user