Files
school-dev-k8s/practice/4.saving-configurations/3.configmap/deployment-with-configmap.yaml
T
2021-09-27 19:24:22 +03:00

41 lines
739 B
YAML

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-deployment
spec:
replicas: 1
selector:
matchLabels:
app: my-app
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
type: RollingUpdate
template:
metadata:
labels:
app: my-app
spec:
containers:
- image: nginx:1.12
name: nginx
ports:
- containerPort: 80
resources:
requests:
cpu: 10m
memory: 100Mi
limits:
cpu: 100m
memory: 100Mi
volumeMounts:
- name: config
mountPath: /etc/nginx/conf.d/
volumes:
- name: config
configMap:
name: my-configmap
...