apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: statefulset-nginx
spec:
  replicas: 3
  serviceName: statefulset-nginx-service
  podManagementPolicy: Parallel
  selector:
    matchLabels:
      app: my-nginx-pods-label
  template:
    metadata:
      name: my-nginx-pod
      labels:
        app: my-nginx-pods-label
    spec:
      containers:
      - name: nginx
        image: nginx:latest
        ports:
        - containerPort: 80
