apiVersion: v1
kind: Pod
metadata:
  name: scratch-hadoop1
spec:
  containers:
    - name: scratch-hadoop-container
      image: 10.18.127.1:5000/scratchhadoop:v1
      volumeMounts:
      - mountPath: /home/wzy/hadoop-cluster-docker/
        name: publish-data
      command: [ "/scratchhadoop"]
      env:
        - name: NODE_NAME
          valueFrom:
            fieldRef:
              fieldPath: spec.nodeName
        - name: MY_POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        - name: MY_POD_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - name: MY_POD_IP
          valueFrom:
            fieldRef:
              fieldPath: status.podIP
        - name: MY_POD_SERVICE_ACCOUNT
          valueFrom:
            fieldRef:
              fieldPath: spec.serviceAccountName
  restartPolicy: Never
  volumes: 
  - name: publish-data
    hostPath: 
      path: /home/wzy/hadoop-cluster-docker
      type: Directory
