apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: statefulset-azuredisk1
  labels:
    k8s-app: nginx
    version: v1
spec:
  podManagementPolicy: Parallel  # OrderedReady
  serviceName: statefulset-azuredisk1
  replicas: 1
  template:
    metadata:
      labels:
        k8s-app: nginx
        version: v1
    spec:
      containers:
      - name: statefulset-azuredisk1
        image: nginx
        volumeMounts:
        - name: persistent-storage
          mountPath: /mnt/azuredisk
  updateStrategy:
    type: RollingUpdate
  selector:
    matchLabels:
      k8s-app: nginx
      version: v1    
  volumeClaimTemplates:
  - metadata:
      name: persistent-storage
      annotations:
        volume.beta.kubernetes.io/storage-class: default
    spec:
      accessModes: [ "ReadWriteOnce" ]
      resources:
        requests:
          storage: 1Gi
