Newer
Older
KubernetesApplication / DemoApplication / deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: demo-deployment
  labels:
    app: demo
spec:
  replicas: 1
  selector:
    matchLabels:
      app: demo
  template:
    metadata:
      labels:
        app: demo
    spec:
      containers:
      - name: nginx
        image: nginx:1.14.2
        resources:
          limits:
            memory: 20Mi
            cpu: ".2"
        ports:
        - containerPort: 80
        volumeMounts:
          - name: demo-volume
            mountPath: /usr/share/nginx/html/demo/index.html
            subPath: index.html
      volumes:
      - name: demo-volume
        configMap:
          name: demo-config