<p>In my umbrella Helm chart, I defined a dependency to Redis:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: v2
appVersion: &quot;1.0&quot;
description: A Helm chart for Kubernetes
name: my-project
version: 0.1.0

dependencies:
  - name: redis
    version: ~6.2.x
    repository: https://charts.bitnami.com/bitnami
</code></pre>
<p>At time of writing, the latest version is 6.2.6 (see <a href="https://bitnami.com/stack/redis/helm" rel="nofollow noreferrer">https://bitnami.com/stack/redis/helm</a>).</p>
<p>But when I execute <code>helm dependency update my-project</code>, Helm downloads version 6.2.0 instead of 6.2.6.
When I try to install my chart, it fails:
<code>Error: INSTALLATION FAILED: unable to build kubernetes objects from release manifest: [unable to recognize &quot;&quot;: no matches for kind &quot;Deployment&quot; in version &quot;extensions/v1beta1&quot;, unable to recognize &quot;&quot;: no matches for kind &quot;StatefulSet&quot; in version &quot;apps/v1beta2&quot;]</code>
Without the dependency to Redis, my chart installs fine.</p>
<p>I also tried to point at that specific Redis version in chart.yaml, but then <code>helm dependency list</code> returns:</p>
<pre><code>NAME    VERSION REPOSITORY                              STATUS
redis   6.2.6   https://charts.bitnami.com/bitnami      wrong version
</code></pre>
<p>I'm running Kubernetes in Docker Desktop on my laptop.
The versions I'm using:</p>
<ul>
<li>Helm version: 3.7.0-rc.2</li>
<li>K8s server: 1.21.2</li>
<li>K8s client: 1.21.4</li>
</ul>
<p>When I install Redis independently using <code>helm install my-release bitnami/redis</code>, the installation succeeds.</p>
<p>How do I use Redis 6.2.6 as a dependency in my chart?</p>

<p>K8s version <strong>1.21</strong> have deployment latest API</p>
<p>Simple ref : <a href="https://stackoverflow.com/a/66164857/5525824">https://stackoverflow.com/a/66164857/5525824</a></p>
<p>While the chart you are using the Older API you might need to some changes or use the latest chart for installation.</p>
<p>The latest deployment API version is : <strong>apps/v1</strong></p>
<p>You can check your K8s cluster supported API using</p>
<pre><code>for kind in `kubectl api-resources | tail +2 | awk '{ print $1 }'`; do kubectl explain $kind; done | grep -e &quot;KIND:&quot; -e &quot;VERSION:&quot;
</code></pre>
<p>output</p>
<pre><code>KIND:     deployment
VERSION:  v1
KIND:     statefulset
VERSION:  v1
</code></pre>
<p>Or use simple command : <code>kubectl api-versions</code></p>
<p>You should checkout this <strong>Bitnami Redis</strong> document : <a href="https://artifacthub.io/packages/helm/bitnami/redis" rel="nofollow noreferrer">https://artifacthub.io/packages/helm/bitnami/redis</a></p>
<p>it updated a few days back and could work with minor changes of <strong>API</strong> only in your case.</p>
<p>If you check the stable Redis version helm chart : <a href="https://github.com/helm/charts/blob/master/stable/redis/templates/redis-master-statefulset.yaml" rel="nofollow noreferrer">https://github.com/helm/charts/blob/master/stable/redis/templates/redis-master-statefulset.yaml</a></p>
<p>stateful API version : <code>apiVersion: apps/v1</code></p>
<p>You change your Bitnami helm chart API using the : <a href="https://github.com/bitnami/charts/tree/master/bitnami/redis#common-parameters" rel="nofollow noreferrer">https://github.com/bitnami/charts/tree/master/bitnami/redis#common-parameters</a></p>
<p>You can change the API version at : <a href="https://github.com/bitnami/charts/blob/9f9d8aa887608e39aaab4ca1a80677605825b888/bitnami/redis/templates/master/statefulset.yaml#L2" rel="nofollow noreferrer">https://github.com/bitnami/charts/blob/9f9d8aa887608e39aaab4ca1a80677605825b888/bitnami/redis/templates/master/statefulset.yaml#L2</a></p>
<blockquote>
<p>Previous versions of this Helm Chart use apiVersion: v1 (installable
by both Helm 2 and 3), this Helm Chart was updated to apiVersion: v2
(installable by Helm 3 only). Here you can find more information about
the apiVersion field. The different fields present in the Chart.yaml
file has been ordered alphabetically in a homogeneous way for all the
Bitnami Helm Charts</p>
</blockquote>
<p>Read more at : <a href="https://helm.sh/docs/topics/charts/#the-apiversion-field" rel="nofollow noreferrer">https://helm.sh/docs/topics/charts/#the-apiversion-field</a></p>
<p>Or : <a href="https://github.com/bitnami/charts/tree/master/bitnami/redis#to-1200" rel="nofollow noreferrer">https://github.com/bitnami/charts/tree/master/bitnami/redis#to-1200</a></p>
<p>You have two option</p>
<ol>
<li>Either you change the helm chart edit it with latest stable API</li>
<li>Downgrade the K8s cluster to <strong>1.16</strong> or <strong>1.18</strong> and use your OLD redis chart which is giving error with <strong>1.21</strong></li>
</ol>
