title: How do I use SANs with openSSL instead of common name?
body: <p>After upgrading a system (kubernetes) that uses golang 1.15.0-rc.1, I am stuck on this error message:</p>
  <pre><code>&quot;x509: certificate relies on legacy Common Name field, use SANs or temporarily enable Common Name matching with GODEBUG=x509ignoreCN=0&quot;. 
  </code></pre>
  <p>The only place I am using common name (that I know of) is when I generate the private key for my service <code>openssl req -new -key certs/foo-bar.pem -subj &quot;/CN=foobar.mydomain.svc&quot; -out certs/foo-bar.csr -config certs/foo-bar_config.txt</code>.</p>
  <p>How can I convert this command to use SANs instead?</p>