<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Secret on shocksolution.com</title><link>https://shocksolution.com/tags/secret/</link><description>Recent content in Secret on shocksolution.com</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Fri, 14 Dec 2018 16:15:11 +0000</lastBuildDate><atom:link href="https://shocksolution.com/tags/secret/index.xml" rel="self" type="application/rss+xml"/><item><title>Creating Kubernetes Secrets Using TLS/SSL as an Example</title><link>https://shocksolution.com/posts/creating-kubernetes-secrets-using-tls-ssl-as-an-example/</link><pubDate>Fri, 14 Dec 2018 16:15:11 +0000</pubDate><guid>https://shocksolution.com/posts/creating-kubernetes-secrets-using-tls-ssl-as-an-example/</guid><description>&lt;p&gt;Creating Kubernetes secrets isn&amp;rsquo;t intuitive the first time you do it. A common reason to use a secret is to add a SSL/TLS certificate to a cluster. Kubernetes provides two ways to add a secret: directly on the command line, and from a YAML source file. First, let&amp;rsquo;s generate a test certificate to work with and select our cluster.&lt;/p&gt;&#10;&lt;h2 id="prerequisites"&gt;Prerequisites&lt;/h2&gt;&#10;&lt;div class="code-block"&gt;&#10; &lt;button class="code-copy" type="button" hidden aria-label="Copy code to clipboard"&gt;&#10; &lt;span class="code-copy-label" aria-hidden="true"&gt;Copy&lt;/span&gt;&#10; &lt;/button&gt;&#10; &lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout tls.key -out tls.crt -subj &amp;#34;/CN=foo.bar.com&amp;#34;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10; &lt;/div&gt;&lt;p&gt;This command produces two files: tls.key and tls.cert. In production, you&amp;rsquo;d generate a key file and use it to obtain a certificate from a certificate authority.&lt;/p&gt;</description></item></channel></rss>