<p>I am trying to connect to cqlsh from remote (kuebctl command) when encryption is enabled, but I am unable to connect to cqlsh. anyone has a better way to connect?</p>

<pre><code>$ kubectl run -i --tty --restart=Never --rm --image cassandra cqlsh -- cqlsh cassandra-0.cassandra.default.svc.cluster.local -u cassandra -p cassandra --ssl
If you don't see a command prompt, try pressing enter.
Validation is enabled; SSL transport factory requires a valid certfile to be specified. Please provide path to the certfile in [ssl] section as 'certfile' option in /root/.cassandra/cqlshrc (or use [certfiles] section) or set SSL_CERTFILE environment variable.
pod "cqlsh" deleted
pod default/cqlsh terminated (Error)
</code></pre>

<p>Since I am connecting from remote, I cannot set the cqlshrc file.</p>

user3435964
<p>You can specify location of the certfile, and validate options via environment variables <code>SSL_CERTFILE</code> and <code>SSL_VALIDATE</code> correspondingly, but you'll need to mount certificate files anyway, so you can also mount corresponding <code>cqlshrc</code>...</p>

<p>See <a href="https://docs.datastax.com/en/dse/5.1/dse-admin/datastax_enterprise/security/usingCqlshSslAndKerberos.html" rel="nofollow noreferrer">documentation</a> for more details.</p>

<p>P.S. Also, if client validation is enabled, you'll need to provide client's key/certificate as well (options <code>userkey</code>, and <code>usercert</code> in the <code>cqlshrc</code>).</p>
