<p>I have a secret of type <code>kubernetes.io/dockerconfigjson</code>:</p>

<pre><code>$ kubectl describe secrets dockerjson

Name:         dockerjson
Namespace:    my-prd
Labels:       &lt;none&gt;
Annotations:  &lt;none&gt;

Type:  kubernetes.io/dockerconfigjson

Data
====
.dockerconfigjson:  1335 bytes
</code></pre>

<p>When I try to mount this secret into a container - I cannot find a <code>config.json</code>:</p>

<pre><code>- name: dump
  image: kaniko-executor:debug
  imagePullPolicy: Always
  command: ["/busybox/find", "/", "-name", "config.json"]
  volumeMounts:
  - name: docker-config
    mountPath: /foobar
volumes:
- name: docker-config
  secret:
    secretName: dockerjson
      defaultMode: 256
</code></pre>

<p>which only prints:</p>

<pre><code>/kaniko/.docker/config.json
</code></pre>

<p>Is this supported at all or am I doing something wrong?</p>

<p>Am using OpenShift 3.9 - which should be Kubernetes 1.9.</p>

<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: kaniko
spec:
  containers:
  - name: kaniko
    image: gcr.io/kaniko-project/executor:debug-v0.9.0
    command:
    - /busybox/cat
    resources:
      limits:
        cpu: 2
        memory: 2Gi
      requests:
        cpu: 0.5
        memory: 500Mi
    tty: true
    volumeMounts:
      - name: docker-config
        mountPath: /kaniko/.docker/
  volumes:
    - name: docker-config
      secret:
        secretName: dockerjson
        items:
          - key: .dockerconfigjson
            path: config.json
</code></pre>
