kind: StatefulSet apiVersion: apps/v1 metadata: name: test-app-1 spec: serviceName: "test-service-1" replicas: 5 selector: matchLabels: app: test-app-1 template: metadata: labels: app: test-app-1 role: test-app-2 spec: containers: - name: my-frontend image: busybox volumeMounts: - mountPath: "/shared" name: my-shared-volume command: [ '/bin/sh', '-c', 'while true; do date -Iseconds >> /shared/$HOSTNAME; sleep 1; done' ] volumes: - name: my-shared-volume persistentVolumeClaim: claimName: vast-pvc-1