apiVersion: apps/v1
kind: Deployment
metadata:
  name: alpine-deployment
spec:
  selector:
    matchLabels:
      app: alpine
  replicas: 4
  template:
    metadata:
      labels:
        app: alpine
    spec:
      containers:
      - name: alpine
        image: docker.io/library/alpine:latest
        imagePullPolicy: IfNotPresent
        command:
          - "/usr/bin/nc"
          - "-lk"
          - "-p"
          - "5001"
          - "-e"
          - "hostname"
        env:
          - name: MY_NODE_NAME
            valueFrom:
              fieldRef:
                fieldPath: spec.nodeName
