48 lines
1.1 KiB
YAML
48 lines
1.1 KiB
YAML
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: example-app
|
|
namespace: example-app
|
|
labels:
|
|
app.kubernetes.io/name: example-app
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: example-app
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: example-app
|
|
spec:
|
|
containers:
|
|
- name: example-app
|
|
image: nginx:1.27-alpine
|
|
ports:
|
|
- name: http
|
|
containerPort: 80
|
|
protocol: TCP
|
|
envFrom:
|
|
- configMapRef:
|
|
name: example-app-config
|
|
resources:
|
|
requests:
|
|
cpu: 50m
|
|
memory: 64Mi
|
|
limits:
|
|
cpu: 200m
|
|
memory: 128Mi
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: http
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: http
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|