</code></pre></div><p>Then, you can concatenate them all into one file, named 'ca.crt' with the following:</p><divclass=highlight><pre><span></span><code>cat<spanclass=w></span>certificate1.crt<spanclass=w></span>certificate2.crt<spanclass=w></span>certificate3.crt<spanclass=w></span>>><spanclass=w></span>ca.crt
</code></pre></div><p><strong>Note:</strong> Make sure that the Key Size is greater than 1024 and Hashing Algorithm (Digest) is something better than md5 for each certificate generated. Otherwise you will receive an error.</p><h2id=creating-certificate-secrets>Creating Certificate Secrets<aclass=headerlinkhref=#creating-certificate-secretstitle="Permanent link"> ¶</a></h2><p>There are many different ways of configuring your secrets to enable Client-Certificate Authentication to work properly.</p><ul><li><p>You can create a secret containing just the CA certificate and another Secret containing the Server Certificate which is Signed by the CA.</p><divclass=highlight><pre><span></span><code>kubectl<spanclass=w></span>create<spanclass=w></span>secret<spanclass=w></span>generic<spanclass=w></span>ca-secret<spanclass=w></span>--from-file<spanclass=o>=</span>ca.crt<spanclass=o>=</span>ca.crt
</code></pre></div></li><li><p>You can create a secret containing CA certificate along with the Server Certificate that can be used for both TLS and Client Auth.</p><divclass=highlight><pre><span></span><code>kubectl<spanclass=w></span>create<spanclass=w></span>secret<spanclass=w></span>generic<spanclass=w></span>ca-secret<spanclass=w></span>--from-file<spanclass=o>=</span>tls.crt<spanclass=o>=</span>server.crt<spanclass=w></span>--from-file<spanclass=o>=</span>tls.key<spanclass=o>=</span>server.key<spanclass=w></span>--from-file<spanclass=o>=</span>ca.crt<spanclass=o>=</span>ca.crt
</code></pre></div></li><li><p>If you want to also enable Certificate Revocation List verification you can create the secret also containing the CRL file in PEM format: <divclass=highlight><pre><span></span><code>kubectl<spanclass=w></span>create<spanclass=w></span>secret<spanclass=w></span>generic<spanclass=w></span>ca-secret<spanclass=w></span>--from-file<spanclass=o>=</span>ca.crt<spanclass=o>=</span>ca.crt<spanclass=w></span>--from-file<spanclass=o>=</span>ca.crl<spanclass=o>=</span>ca.crl
</code></pre></div></p></li></ul><p>Note: The CA Certificate must contain the trusted certificate authority chain to verify client certificates.</p><h2id=setup-instructions>Setup Instructions<aclass=headerlinkhref=#setup-instructionstitle="Permanent link"> ¶</a></h2><ol><li>Add the annotations as provided in the <ahref=ingress.yaml>ingress.yaml</a> example to your own ingress resources as required.</li><li>Test by performing a curl against the Ingress Path without the Client Cert and expect a Status Code 400.</li><li>Test by performing a curl against the Ingress Path with the Client Cert and expect a Status Code 200.</li></ol></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>