apiVersion: v1
kind: Pod
metadata:
  name: kaniko
spec:
  containers:
    - name: kaniko
      image: gcr.io/kaniko-project/executor:latest
      args:
        - "--dockerfile=/workspace/dockerfile"
        - "--context=dir:///workspace/"
        - "--destination=jianhe6/kaniko:0.1"
      volumeMounts:
        - name: kaniko-secret
          mountPath: /kaniko/.docker
        - name: dockerfile
          mountPath: /workspace/
        - name: build-source
          mountPath: /workspace/build
  restartPolicy: Never
  volumes:
    - name: kaniko-secret
      secret:
        secretName: regcred
        items:
          - key: .dockerconfigjson
            path: config.json
    - name: dockerfile
      configMap:
        name: dockerfile
    - name: build-source
      hostPath:
        # directory location on host
        path: /foo