</code></pre></div><divclass="admonition important"><pclass=admonition-title>Important</p><p><strong>DO NOT RUN THIS IN PRODUCTION</strong></p><p>This deployment uses <code>emptyDir</code> in the <code>volumeMount</code> which means the contents of the registry will be deleted when the pod dies.</p></div><p>The next required step is creation of the ingress rules. To do this we have two options: with and without TLS</p><h3id=without-tls>Without TLS<aclass=headerlinkhref=#without-tlstitle="Permanent link"> ¶</a></h3><p>Download and edit the yaml deployment replacing <code>registry.<your domain></code> with a valid DNS name pointing to the ingress controller:</p><divclass=highlight><pre><span></span><code><spanclass=go>wget https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/docs/examples/docker-registry/ingress-without-tls.yaml</span>
</code></pre></div><divclass="admonition important"><pclass=admonition-title>Important</p><p>Running a docker registry without TLS requires we configure our local docker daemon with the insecure registry flag.</p></div><p>Please check <ahref=https://docs.docker.com/registry/insecure/#deploy-a-plain-http-registry>deploy a plain http registry</a></p><h3id=with-tls>With TLS<aclass=headerlinkhref=#with-tlstitle="Permanent link"> ¶</a></h3><p>Download and edit the yaml deployment replacing <code>registry.<your domain></code> with a valid DNS name pointing to the ingress controller:</p><divclass=highlight><pre><span></span><code><spanclass=go>wget https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/docs/examples/docker-registry/ingress-with-tls.yaml</span>
</code></pre></div><p>Deploy <ahref=https://github.com/jetstack/kube-lego>kube lego</a> use <ahref=https://letsencrypt.org/>Let's Encrypt</a> certificates or edit the ingress rule to use a secret with an existing SSL certificate.</p><h3id=testing>Testing<aclass=headerlinkhref=#testingtitle="Permanent link"> ¶</a></h3><p>To test the registry is working correctly we download a known image from <ahref=https://hub.docker.com>docker hub</a>, create a tag pointing to the new registry and upload the image:</p><divclass=highlight><pre><span></span><code><spanclass=go>docker pull ubuntu:16.04</span>
<spanclass=go>docker tag ubuntu:16.04 `registry.<your domain>/ubuntu:16.04`</span>
</code></pre></div><p>Please replace <code>registry.<your domain></code> with your domain.</p></article></div></div></main><footerclass=md-footer><divclass="md-footer-meta md-typeset"><divclass="md-footer-meta__inner md-grid"><divclass=md-copyright> Made with <ahref=https://squidfunk.github.io/mkdocs-material/target=_blankrel=noopener> Material for MkDocs </a></div></div></div></footer></div><divclass=md-dialogdata-md-component=dialog><divclass="md-dialog__inner md-typeset"></div></div><scriptid=__configtype=application/json>{"base":"../..","features":["navigation.tabs","navigation.tabs.sticky","navigation.instant","navigation.sections"],"search":"../../assets/javascripts/workers/search.f886a092.min.js","translations":{"clipboard.copied":"Copied to clipboard","clipboard.copy":"Copy to clipboard","search.result.more.one":"1 more on this page","search.result.more.other":"# more on this page","search.result.none":"No matching documents","search.result.one":"1 matching document","search.result.other":"# matching documents","search.result.placeholder":"Type to start searching","search.result.term.missing":"Missing","select.version":"Select version"}}</script><scriptsrc=../../assets/javascripts/bundle.aecac24b.min.js></script></body></html>