apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx
spec:
  replicas: 1
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx:alpine
        ports:
        - containerPort: 80
        volumeMounts:
        - name: nginx-conf
          mountPath: /etc/nginx/conf.d
        - name: app-code
          mountPath: /var/www
      volumes:
      - name: nginx-conf
        configMap:
          name: nginx-config
      - name: app-code
        hostPath:
          path: /path/on/host/to/your/code
