Answers: <p>The <code>/etc/rancher/k3s/registries.yaml</code> is read by <a href="https://devops.stackexchange.com/q/16152/18965"><code>k3s ctr</code> and <code>k3s crictl</code></a>. You can validate it works properly with a command like this,</p>
  <pre class="lang-sh prettyprint-override"><code>sudo k3s crictl pull     docker.io/alpine:3
  sudo k3s ctr images pull docker.io/library/alpine:3
  </code></pre>
  
Answers: CC BY-SA 4.0
Answers: 2022-06-15T22:03:07.317Z
Answers: 2022-06-15T23:03:04.607Z
Answers: 2022-06-15T23:03:04.607Z
Answers: Evan Carroll
Body: <p>I've set up my <code>/etc/rancher/k3s/registries.yaml</code>, how can I confirm it works without doing</p>
  <pre class="lang-shell prettyprint-override"><code>k3s kubectl run c1 --image docker.io/perl:5.30
  k3s kubectl logs --follow=true c1
  sleep 1
  k3s kubectl delete pod c1
  </code></pre>
  <p>Is there a more efficient way to test registry authentication for images than having to use k3s run?</p>
  
Tags: <authentication><k3s>
Title: How can you validate that registries.yaml is set properly?
UserDisplayName: Evan Carroll
ThreadText: # How can you validate that registries.yaml is set properly?
  
  (Asked by: username_0 on 2022-06-15)
  
  I've set up my `/etc/rancher/k3s/registries.yaml`, how can I confirm it works without doing
  
  ```shell
  k3s kubectl run c1 --image docker.io/perl:5.30
  k3s kubectl logs --follow=true c1
  sleep 1
  k3s kubectl delete pod c1
  
  ```
  
  Is there a more efficient way to test registry authentication for images than having to use k3s run?
  
  **Tags:** authentication, k3s
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2022-06-15. Score: 0 | Accepted answer
  
  The `/etc/rancher/k3s/registries.yaml` is read by [`k3s ctr` and `k3s crictl`](https://devops.stackexchange.com/q/16152/18965). You can validate it works properly with a command like this,
  
  ```sh
  sudo k3s crictl pull     docker.io/alpine:3
  sudo k3s ctr images pull docker.io/library/alpine:3
  
  ```
  
  
  ---
  
  