forked from kubernetes/website
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kubectl 1.9+ updated registry secret type and datakey: .dockercfg is …
…now .dockerconfigjson, and datakey now wrapped in 'auths' element (kubernetes#7248)
- Loading branch information
1 parent
4b43755
commit 099b113
Showing
1 changed file
with
5 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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. | ||
|