Python: How to create docker-registry type secret using python client

Created on 9 Apr 2019  路  2Comments  路  Source: kubernetes-client/python

The example at https://github.com/kubernetes-client/python/blob/master/examples/notebooks/create_secret.ipynb shows how to create generic secrets...

How to create a docker-registry type secret?

Most helpful comment

@tomplus Thanks. That works :)

I was wondering if there is any straight way to create docker-registry type secret through python client.

All 2 comments

This type of secret is a secret with one field named .dockerconfigjson and value {"auths":{"yourprivateregistry.com":{"username": "janedoe","password": "xxxxxxxxxxx","email": "[email protected]","auth": "c3R...zE2"}}}. auth is base64 encoded and the whole value is encoded too.
More information: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#inspecting-the-secret-regcred

@tomplus Thanks. That works :)

I was wondering if there is any straight way to create docker-registry type secret through python client.

Was this page helpful?
0 / 5 - 0 ratings