Smart Learning/Kubernetes Learning Journey/Storage and Persistent Volumes

Gce PV Example / Deployment

TrackKubernetes Learning Journey
Current SectionStorage and Persistent Volumes
Progress37 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