63 lines
1.2 KiB
YAML
63 lines
1.2 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: demo-nginx
|
|
namespace: demo-app
|
|
labels:
|
|
app: demo-nginx
|
|
spec:
|
|
replicas: 3
|
|
selector:
|
|
matchLabels:
|
|
app: demo-nginx
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: demo-nginx
|
|
annotations:
|
|
prometheus.io/scrape: "true"
|
|
prometheus.io/port: "80"
|
|
spec:
|
|
containers:
|
|
- name: nginx
|
|
image: docker.io/vladcrypto/demo-nginx:main-50
|
|
ports:
|
|
- containerPort: 80
|
|
name: http
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 128Mi
|
|
limits:
|
|
cpu: 200m
|
|
memory: 256Mi
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: 80
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 10
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: 80
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 5
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: demo-nginx
|
|
namespace: demo-app
|
|
labels:
|
|
app: demo-nginx
|
|
spec:
|
|
type: ClusterIP
|
|
selector:
|
|
app: demo-nginx
|
|
ports:
|
|
- port: 80
|
|
targetPort: 80
|
|
protocol: TCP
|
|
name: http
|