Generating Docker Credentials for Vultr Container Registry provides secure access for pushing and pulling images. These credentials are essential for authenticating and interacting with the container registry, ensuring seamless integration with Docker and Kubernetes. For Kubernetes, these credentials enable pods to authenticate and interact with the registry, facilitating the deployment of containerized applications.
Follow this guide to generate Docker credentials for your container registry on your Vultr account using the Vultr Customer Portal, API, or CLI.
Navigate to Products and click Container Registry.
Click your target registry to open its management page.
Click Docker/Kubernetes.
In the Docker Credentials section, provide a time duration for which the docker credentials are valid.
Check the Push Access box to allow push privileges for these particular credentials.
Click Generate Docker Config Json to generate credentials in JSON format.
In the Docker Credentials for Kubernetes section, provide a time duration for which the credentials are valid.
Check the Push Access box to allow push privileges for these particular credentials.
Click Generate Kubernetes YAML to generate a Kubernetes YAML file.
Send a GET
request to the List Registries endpoint and note the target registry's ID.
$ curl "https://api.vultr.com/v2/registries" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Send an OPTIONS
request to the Create Registry Docker Credentials endpoint and note the generated credentials.
$ curl "https://api.vultr.com/v2/registry/<registry-id>/docker-credentials?expiry_seconds=3600&read_write=true" \
-X OPTIONS \
-H "Authorization: Bearer ${VULTR_API_KEY}" \
-H "Content-Type: application/json"
Send an OPTIONS
request to the Create Registry Kubernetes Docker Credentials endpoint and note the generated YAML.
$ curl "https://api.vultr.com/v2/registry/<registry-id>/docker-credentials/kubernetes?expiry_seconds=3600&read_write=true&base64_encode=false" \
-X OPTIONS \
-H "Authorization: Bearer ${VULTR_API_KEY}" \
-H "Content-Type: application/json"
List all registries available in your Vultr account and note the target registry's ID.
$ vultr-cli container-registry list
Generate Docker credentials for the target registry.
$ vultr-cli container-registry credentials docker <registry-id> --expiry-seconds 3600 --read-write true