apiVersion: apps/v1
kind: Deployment
metadata:
  name: env-deployment
  labels:
    app: nginx
spec:
  replicas: 1
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx:1.13.12
        ports:
        - containerPort: 80
        env:
          - name: nodename
            valueFrom:
              fieldRef:
                fieldPath: spec.nodeName
          - name: podname
            valueFrom:
              fieldRef:
                fieldPath: metadata.name
          - name: podIp
            valueFrom:
              fieldRef:
                fieldPath: status.podIP
             
