# Private Docker registry

## Install and configure kubectl

Follow the instructions for [AWS](/0.29/clusters/cortex-cloud-on-aws/kubectl.md) or [GCP](/0.29/clusters/cortex-cloud-on-gcp/kubectl.md).

## Setting credentials

```bash
$ DOCKER_USERNAME=***
$ DOCKER_PASSWORD=***

$ kubectl create secret docker-registry registry-credentials \
    --namespace default \
    --docker-username=$DOCKER_USERNAME \
    --docker-password=$DOCKER_PASSWORD

$ kubectl patch serviceaccount default --namespace default \
    -p "{\"imagePullSecrets\": [{\"name\": \"registry-credentials\"}]}"
```

## Deleting credentials

```bash
$ kubectl delete secret --namespace default registry-credentials

$ kubectl patch serviceaccount default --namespace default \
    -p "{\"imagePullSecrets\": []}"
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cortexlabs.com/0.29/clusters/registry.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
