apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app.kubernetes.io/name: sample-app
  name: sample-app
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: sample-app
  template:
    metadata:
      labels:
        app.kubernetes.io/name: sample-app
    spec:
      containers:
      - image: quay.io/mpeters/sample-app:latest
        imagePullPolicy: Always
        name: sample-app
        ports:
        - containerPort: 8080
        env:
        - name: NODE_IP
          valueFrom:
            fieldRef:
              fieldPath: status.hostIP
        - name: POD_IP
          valueFrom:
            fieldRef:
              fieldPath: status.podIP

