Skip to content

Instantly share code, notes, and snippets.

@tsuri
Created September 1, 2016 04:12
Show Gist options
  • Save tsuri/f7daf26cce90922104fcb428989a966b to your computer and use it in GitHub Desktop.
Save tsuri/f7daf26cce90922104fcb428989a966b to your computer and use it in GitHub Desktop.
deployment w/ persistent volumes
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: frontend
spec:
  replicas: 2
  template:
    metadata:
      labels:
        name: nginx
        run: frontend
    spec:
      volumes:
      - name: nginx-auth-basic
        secret:
          secretName: nginx-auth-basic
      - name: secret-volume
        secret:
          secretName: nginxsecret
      - name: nginx-persistent-storage
        gcePersistentDisk:
          pdName: alexandria
          fsType: ext4
          readOnly: true
      containers:
      - name: frontend
        image: us.gcr.io/iodine-cluster/frontend:latest
        ports:
        - containerPort: 80
        - containerPort: 443
        volumeMounts:
        - mountPath: /usr/share/nginx/html
          name: nginx-persistent-storage
        - mountPath: /etc/nginx/ssl
          name: secret-volume
        - mountPath: /etc/secrets
          name: nginx-auth-basic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment