OptionalexpiryThe duration in seconds that the returned registry credentials will be valid. If not set or 0, the credentials will not expire.
OptionalreadBy default, the registry credentials allow for read-only access. Set this query parameter to true to obtain read-write credentials.
In order to access your container registry with the Docker client or from aKubernetes cluster, you will need to configure authentication. The necessaryJSON configuration can be retrieved by sending a GET request to
/v2/registry/docker-credentials.The response will be in the format of a Dockerconfig.jsonfile. To use theconfig in your Kubernetes cluster, create a Secret with: kubectl create secret generic docr / --from-file=.dockerconfigjson=config.json / --type=kubernetes.io/dockerconfigjsonBy default, the returned credentials have read-only access to your registryand cannot be used to push images. This is appropriate for most Kubernetesclusters. To retrieve read/write credentials, suitable for use with the Dockerclient or in a CI system, read_write may be provided as query parameter. Forexample:/v2/registry/docker-credentials?read_write=trueBy default, the returned credentials will not expire. To retrieve credentialswith an expiry set, expiry_seconds may be provided as a query parameter. Forexample:/v2/registry/docker-credentials?expiry_seconds=3600will returncredentials that expire after one hour.