Skip to content

docs: add guide for template ImagePullSecret #11608

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 13, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
make: fmt
  • Loading branch information
ericpaulsen committed Jan 13, 2024
commit 78c01c0338534f3d72d5d6faea88122247f682b5
22 changes: 15 additions & 7 deletions docs/guides/image-pull-secret.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ January 12, 2024

---

Coder workspaces are commonly run as Kubernetes pods. When run inside of an enterprise,
the pod image is typically pulled from a private image registry. This guide walks
through creating an ImagePullSecret to use for authenticating to your registry,
and defining it in your workspace template.
Coder workspaces are commonly run as Kubernetes pods. When run inside of an
enterprise, the pod image is typically pulled from a private image registry.
This guide walks through creating an ImagePullSecret to use for authenticating
to your registry, and defining it in your workspace template.

## 1. Create Docker Config JSON File

Expand All @@ -34,8 +34,8 @@ actual Docker registry URL, username, and password.

## 2. Create Kubernetes Secret

Run the below `kubectl` command in the K8s cluster where you intend to run your Coder
workspaces:
Run the below `kubectl` command in the K8s cluster where you intend to run your
Coder workspaces:

```console
kubectl create secret generic regcred \
Expand All @@ -53,7 +53,15 @@ kubectl get secret -n <workspaces-namespace> regcred --output="jsonpath={.data.\
The output should look similar to this:

```json
{"auths":{"your.private.registry.com":{"username":"ericpaulsen","password":"xxxx","auth":"c3R...zE2"}}}
{
"auths": {
"your.private.registry.com": {
"username": "ericpaulsen",
"password": "xxxx",
"auth": "c3R...zE2"
}
}
}
```

## 3. Define ImagePullSecret in Terraform template
Expand Down