Skip to content

Commit 717456f

Browse files
ericpaulsenKatie Horne
and
Katie Horne
authored
add registry troubleshooting steps (coder#428)
* add registry troubleshooting steps * lint * add to manifest * json spacing * Update manifest; lint * Edit text Co-authored-by: Katie Horne <katie@coder.com>
1 parent ab99da5 commit 717456f

File tree

3 files changed

+67
-3
lines changed

3 files changed

+67
-3
lines changed

guides/troubleshooting/registry.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
title: Image registry troubleshooting
3+
description: Learn how to resolve issues connecting to an image registry.
4+
---
5+
6+
When configuring Coder to use a local image registry in an air-gapped network,
7+
you may encounter an error similar to the following:
8+
9+
```console
10+
An error occurred while submitting
11+
12+
unable to ping registry for 'new transport: Get "https://registry-url.org": x509:
13+
certificate signed by unknown authority
14+
```
15+
16+
## Why this happens
17+
18+
The local registry you are configuring is expecting a valid certificate to
19+
authenticate the connection with Coder. You will receive this error if:
20+
21+
- You do not have a certificate
22+
configured
23+
- There is an issue with the certificate itself
24+
25+
> Coder uses Docker's Registry 2.0 implementation, which supports self-signed
26+
> certificates and assumes that the protocol you're using will be HTTPS.
27+
28+
## Troubleshooting steps
29+
30+
- If you haven't created the local registry, and you haven't generated the
31+
self-signed certificate, [please see our
32+
documentation](../../setup/air-gapped/infrastructure.md) on setting these up.
33+
34+
- Check to see if your `registry.crt` file is stored in the correct location on
35+
each of your Kubernetes nodes. Depending upon your Linux distribution and
36+
container runtime, it may be in any of the following locations:
37+
38+
```console
39+
/usr/local/share/ca-certificates/registry.crt
40+
/etc/docker/certs.d/${REGISTRY_DOMAIN_NAME}/ca.crt
41+
/etc/ssl/certs/registry.crt
42+
/etc/pki/tls/registry.crt
43+
```
44+
45+
- If your cluster uses `containerd`, ensure the following patch has been applied
46+
to the `/etc/containerd/config.toml` file:
47+
48+
```console
49+
[plugins."io.containerd.grpc.v1.cri".registry.configs."$REGISTRY_DOMAIN_NAME".tls]
50+
insecure_skip_verify = true
51+
```
52+
53+
Ensure that you've created the self-signed certificate secret in your Kubernetes
54+
cluster:
55+
56+
```console
57+
kubectl -n coder get secret local-registry-cert -o yaml
58+
```
59+
60+
If none of these steps resolve the issue, please [contact
61+
us](https://coder.com/contact) for further support.

manifest.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,10 +365,13 @@
365365
"navigable": false,
366366
"children": [
367367
{
368-
"path": "./guides/troubleshooting/inotify-watch-limits.md"
368+
"path": "./guides/troubleshooting/docker-problems.md"
369369
},
370370
{
371-
"path": "./guides/troubleshooting/docker-problems.md"
371+
"path": "./guides/troubleshooting/registry.md"
372+
},
373+
{
374+
"path": "./guides/troubleshooting/inotify-watch-limits.md"
372375
}
373376
]
374377
}

setup/air-gapped/infrastructure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ docker run -d -p 443:5000 \
5454
5555
## Configuring the Kubernetes Node
5656

57-
Before the Kubernetes node can accept run local images, it needs to consider the
57+
Before the Kubernetes node can accept local images, it needs to consider the
5858
new `registry.crt` file as trusted. The specific locations and methods to store
5959
and trust the certificate vary depending on the Linux distribution and the
6060
container runtime, but here is a partial list to help you get started:

0 commit comments

Comments
 (0)