with kubernetes config files
This commit is contained in:
46
frontend/deployment.yaml
Normal file
46
frontend/deployment.yaml
Normal file
@@ -0,0 +1,46 @@
|
||||
# kubernetes/frontend/deployment.yaml
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: frontend
|
||||
namespace: todo-app
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: frontend
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: frontend
|
||||
tier: web
|
||||
spec:
|
||||
containers:
|
||||
- name: frontend
|
||||
image: silvarno/todo-frontend:latest
|
||||
ports:
|
||||
- containerPort: 80
|
||||
securityContext:
|
||||
runAsNonRoot: false # nginx needs root to bind port 80
|
||||
allowPrivilegeEscalation: false
|
||||
resources:
|
||||
requests:
|
||||
memory: "64Mi"
|
||||
cpu: "50m"
|
||||
limits:
|
||||
memory: "128Mi"
|
||||
cpu: "200m"
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: frontend-service
|
||||
namespace: todo-app
|
||||
spec:
|
||||
selector:
|
||||
app: frontend
|
||||
type: NodePort
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 80
|
||||
nodePort: 31081
|
||||
Reference in New Issue
Block a user