Gce PV Example / Deployment

TrackKubernetes Learning Journey
Current SectionPersistent Volumes
Progress253 of 271
apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-gce
spec:
  replicas: 1
  selector:
    matchLabels:
      app: nginx-gce
  template:
    metadata:
      labels:
        app: nginx-gce
    spec:
      containers:
        - name: nginx
          image: nginx
          volumeMounts:
            - name: html-volume
              mountPath: /usr/share/nginx/html
      volumes:
        - name: html-volume
          persistentVolumeClaim:
            claimName: gce-pvc