<p>I am using kubernetes with helm 3.</p>
<p>I need to create a kubernetes pod with sql - creating:</p>
<blockquote>
<p>database name: my_database
user: root
password:12345
port: 3306</p>
</blockquote>
<p>The steps:
creating chart by:</p>
<pre><code>helm create test
</code></pre>
<p>after the chart is created, change the Chart.yaml file in test folder, by adding dependencies section.</p>
<blockquote>
<p>apiVersion: v2
name: test3
description: A Helm chart for Kubernetes</p>
<p>version: 0.1.0</p>
<p>appVersion: &quot;1.16.0&quot;</p>
<p>dependencies:</p>
<ul>
<li>name: mysql
version: 8.8.23   repository: &quot;https://charts.bitnami.com/bitnami&quot;</li>
</ul>
</blockquote>
<p>run:</p>
<pre><code>helm dependencies build test
</code></pre>
<p>After that there is a compressed file <code>tgz</code>.
So I extracted it and there is tar file - I extracted it too, and leave only the final extracted folder.</p>
<p>I presume this isn't the best approach of changing parameter in <code>yaml</code> for <code>bitnami</code>,
and using also the <code>security.yaml</code> - I would like knowing that better approach too.</p>
<p>I need to change the user + password, and link to database,
so I changed the values.yaml directly (any better approach?), for values: auth:rootPassword and auth:my_database.</p>
<p>the another following steps:</p>
<pre><code>helm build dependencies test
helm install test --namespace test --create-namespace
</code></pre>
<p>after that there are two pods created.
I could check it by:</p>
<pre><code>kubectl get pods -n test
</code></pre>
<p>and I see two pods running (maybe replication).
one of the pod: test-mysql-0 (the other is with random parse).</p>
<p>run:</p>
<pre><code>kubectl exec --stdin --tty test-mysql-0  --namespace test-mysql -- /bin/sh 
</code></pre>
<p>did enter the pod.
run:</p>
<pre><code>mysql -rroot -p12345;
</code></pre>
<p>and then:</p>
<pre><code>show databases;
</code></pre>
<p>That did showing all the database, including seeing the created database: my_database, successfully.</p>
<p>When I tried openning the <code>mysql</code> database from 'mysql workbench', and test (same user: root, and password, and port: 3306, and localhost), I couldn't run test (test connection button in database properties returns: 'failed to connect to database').</p>
<ol>
<li>Why cannot I run properly 'mysql workbench', while in the pad itself - without any particular problem?</li>
<li>Is there any better approach than extrating the tgz file as I described above, and can I pass in better way (some secured yaml) the user+password?
(Right now is only the root password)</li>
</ol>
<p>Thanks.</p>

Eitan
<p>It sounds like you're trying to set the parameters in the dependent chart (please correct me if I'm wrong)</p>
<p>If this is right, all you need to do is add another section in <em>your</em> chart's <code>values.yaml</code></p>
<pre class="lang-yaml prettyprint-override"><code>name-of-dependency:
  user-name: ABC
  password: abcdef
</code></pre>
<p>the &quot;name-of-dependency&quot; is specified in your <code>Chart.yaml</code> file when you declare your chart. For example, here's my redis dependency from one of my own charts</p>
<pre class="lang-yaml prettyprint-override"><code>dependencies:
  - name: redis
    repository: https://charts.bitnami.com/bitnami/
    version: x.x.x
</code></pre>
<p>Then when I install the chart, I can override the redis chart's settings by doing this in my own chart's <code>values.yaml</code></p>
<pre class="lang-yaml prettyprint-override"><code>redis:
  architecture: standalone
  auth:
    password: &quot;secret-password-here&quot;
</code></pre>
