Skip to content

Commit

Permalink
kubectl 1.9+ updated registry secret type and datakey: .dockercfg is …
Browse files Browse the repository at this point in the history
…now .dockerconfigjson, and datakey now wrapped in 'auths' element (kubernetes#7248)
  • Loading branch information
aburdenthehand authored and tehut committed Feb 20, 2018
1 parent 4b43755 commit 099b113
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,28 +70,28 @@ The output is similar to this:

apiVersion: v1
data:
.dockercfg: eyJodHRwczovL2luZGV4L ... J0QUl6RTIifX0=
.dockerconfigjson: eyJodHRwczovL2luZGV4L ... J0QUl6RTIifX0=
kind: Secret
metadata:
...
name: regsecret
...
type: kubernetes.io/dockercfg
type: kubernetes.io/dockerconfigjson

The value of the `.dockercfg` field is a base64 representation of your secret data.
The value of the `.dockerconfigjson` field is a base64 representation of your secret data.

Copy the base64 representation of the secret data into a file named `secret64`.

**Important**: Make sure there are no line breaks in your `secret64` file.

To understand what is in the `.dockercfg` field, convert the secret data to a
To understand what is in the `.dockerconfigjson` field, convert the secret data to a
readable format:

base64 -d secret64

The output is similar to this:

{"yourprivateregistry.com":{"username":"janedoe","password":"xxxxxxxxxxx","email":"[email protected]","auth":"c3R...zE2"}}
{"auths":{"yourprivateregistry.com":{"username":"janedoe","password":"xxxxxxxxxxx","email":"[email protected]","auth":"c3R...zE2"}}}

Notice that the secret data contains the authorization token from your
`config.json` file.
Expand Down

0 comments on commit 099b113

Please sign in to comment.