<p>Is it possible to pull private images in Github Container Registry using GITHUB_TOKEN?</p>
<p>If so, what do I need to configure in k8s?</p>
<p>Thanks!</p>

<p>Yes you can. You will have to create a <code>secret</code> object in your cluster.</p>
<pre><code>kubectl create secret docker-registry ghcr-login-secret --docker-server=https://ghcr.io --docker-username=$YOUR_GITHUB_USERNAME --docker-password=$YOUR_GITHUB_TOKEN --docker-email=$YOUR_EMAIL
</code></pre>
<blockquote>
<p>Note: Your credentials will become part of shell history, so be careful and remove the shell history afterwards.</p>
</blockquote>
<p>This will internally create a <code>dockerconfig.json</code> with your provided values and generate a secret that will be used to authenticate with your registry.</p>
<p>You can then proceed to specify in your <code>Pod</code> specification that you are using a private registry and pass this secret as:</p>
<pre><code>...
imagePullSecrets:
  - name: ghcr-login-secret
...
</code></pre>
<p>You can read more about external registry interfacing with Kubernetes <a href="https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/" rel="nofollow noreferrer">here</a>.</p>
