infctl-cli/vagrant/dev/ubuntu/k8s/nginx-test/deployment.yaml

28 lines
554 B
YAML
Raw Normal View History

apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-with-storage
namespace: default
spec:
selector:
matchLabels:
app: nginx-storage
replicas: 1
template:
metadata:
labels:
app: nginx-storage
spec:
containers:
- name: nginx
image: nginx:stable
ports:
- containerPort: 80
volumeMounts:
- name: nginx-data
mountPath: /usr/share/nginx/html
volumes:
- name: nginx-data
persistentVolumeClaim:
claimName: nginx-data-pvc