<p>I am trying to install a helm chart on an air gapped system. The chart should be pulling an image from a private docker registry and deploy to the kubernetes cluster (both also on the air gapped system). My chart passed linting but when I try to install it, I keep seeing the error:</p>
<pre><code>$ helm install my-mongodb . --debug
install.go:172: [debug] Original chart version: &quot;&quot;
install.go:189: [debug] CHART PATH: /opt/helm-charts/my-mongodb

Error: unable to build kubernetes objects from release manifest: the server could not find the requested resource
helm.go:94: [debug] the server could not find the requested resource
unable to build kubernetes objects from release manifest
helm.sh/helm/v3/pkg/action.(*Install).Run
    /home/circleci/helm.sh/helm/pkg/action/install.go:257
main.runInstall
    /home/circleci/helm.sh/helm/cmd/helm/install.go:242
main.newInstallCmd.func2
    /home/circleci/helm.sh/helm/cmd/helm/install.go:120
github.com/spf13/cobra.(*Command).execute
    /go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:842
github.com/spf13/cobra.(*Command).ExecuteC
    /go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:950
github.com/spf13/cobra.(*Command).Execute
    /go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:887
main.main
    /home/circleci/helm.sh/helm/cmd/helm/helm.go:93
runtime.main
    /usr/local/go/src/runtime/proc.go:203
runtime.goexit
    /usr/local/go/src/runtime/asm_amd64.s:1373
</code></pre>
<p>Helm is installed:</p>
<pre><code>$ helm version
version.BuildInfo{Version:&quot;v3.3.4&quot;, GitCommit:&quot;a61ce5633af99708171414353ed49547cf05013d&quot;, GitTreeState:&quot;clean&quot;, GoVersion:&quot;go1.14.9&quot;}
</code></pre>
<p>So is Kubernetes:</p>
<pre><code>$ kubectl version
Client Version: version.Info{Major:&quot;1&quot;, Minor:&quot;5&quot;, GitVersion:&quot;v1.5.2&quot;, GitCommit:&quot;269f928217957e7126dc87e6adfa82242bfe5b1e&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2017-06-06T13:19:52Z&quot;, GoVersion:&quot;go1.7.6&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;}
Server Version: version.Info{Major:&quot;1&quot;, Minor:&quot;5&quot;, GitVersion:&quot;v1.5.2&quot;, GitCommit:&quot;269f928217957e7126dc87e6adfa82242bfe5b1e&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2017-06-06T13:19:52Z&quot;, GoVersion:&quot;go1.7.6&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;}

$ kubectl config get-clusters
NAME
dev-cluster

$ kubectl get node -n kube-system
NAME          STATUS    AGE
kube-node01   Ready     14d
kube-node02   Ready     14d
kube01        Ready     14d
</code></pre>
<p>Here is my Helm Chart.yaml:</p>
<pre><code>apiVersion: v2
name: my-mongodb
description: A Helm chart for My MongoDB Kubernetes
type: application
version: 0.1.0
appVersion: 5.0.0-1
annotations:
  category: Database
</code></pre>
<p>And my values.yaml</p>
<pre><code>replicaCount: 1

image:
  repository: docker01.dev.local:5000/my-mongodb
  pullPolicy: Always
  pullSecrets: 
     - name: regcred  
     
serviceAccount:
  create: true
  annotations: {}
  name: &quot;&quot;

podAnnotations: {}

podSecurityContext: {}

securityContext: {}

service:
  type: ClusterIP
  port: 80

ingress:
  enabled: false
  annotations: {}
  hosts:
    - host: chart-example.local
      paths: []
  tls: []

resources: {}

autoscaling:
  enabled: false
  minReplicas: 1
  maxReplicas: 100
  targetCPUUtilizationPercentage: 80

nodeSelector: {}

tolerations: []

affinity: {}
</code></pre>
<p>My docker image successfully runs in a docker container, so I'm fairly confident the image isn't the issue. What am I doing wrong?</p>
<p>EDIT: I am running the helm install command at: /opt/helm-charts/my-mongodb
This is the location of the Charts.yaml file. The file structure is:</p>
<pre><code>my-mongodb
 - Chart.yaml
 - values.schema.json
 - values.yaml
 - charts
 - templates
   - deployment.yaml
   - _helpers.tpl
   - hpa.yaml
   - ingress.yaml
   - NOTES.txt
   - serviceaccount.yaml
   - service.yaml
   - tests
     - test-connection.yaml
</code></pre>
<p>This chart was created with the command: helm create my-mongodb and then I edited the Charts.yaml, values.yaml and deployment.yaml files</p>
<p>Here is the deployment.yaml file as well:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include &quot;my-mongodb.fullname&quot; . }}
  labels:
    {{- include &quot;my-mongodb.labels&quot; . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
  replicas: {{ .Values.replicaCount }}
{{- end }}
  selector:
    matchLabels:
      {{- include &quot;my-mongodb.selectorLabels&quot; . | nindent 6 }}
  template:
    metadata:
    {{- with .Values.podAnnotations }}
      annotations:
        {{- toYaml . | nindent 8 }}
    {{- end }}
      labels:
        {{- include &quot;my-mongodb.selectorLabels&quot; . | nindent 8 }}
    spec:
      {{- with .Values.imagePullSecrets }}
      imagePullSecrets:
        {{- toYaml . | nindent 8 }}
      {{- end }}
      serviceAccountName: {{ include &quot;my-mongodb.serviceAccountName&quot; . }}
      securityContext:
        {{- toYaml .Values.podSecurityContext | nindent 8 }}
      containers:
        - name: {{ .Chart.Name }}
          securityContext:
            {{- toYaml .Values.securityContext | nindent 12 }}
          image: &quot;{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}&quot;
          imagePullPolicy: {{ .Values.image.pullPolicy }}
          ports:
            - name: http
              containerPort: 8080
              protocol: TCP
            - name: mongoDB
              containerPort: 27017
              protocol: TCP
            - name: mongoDBShardSvr
              containerPort: 27018
              protocol: TCP
            - name: mongoDBConfigSvr
              containerPort: 27019
              protocol: TCP                                         
          livenessProbe:
            httpGet:
              path: /
              port: http
          readinessProbe:
            httpGet:
              path: /
              port: http
          resources:
            {{- toYaml .Values.resources | nindent 12 }}
      {{- with .Values.nodeSelector }}
      nodeSelector:
        {{- toYaml . | nindent 8 }}
      {{- end }}
      {{- with .Values.affinity }}
      affinity:
        {{- toYaml . | nindent 8 }}
      {{- end }}
      {{- with .Values.tolerations }}
      tolerations:
        {{- toYaml . | nindent 8 }}
      {{- end }}
</code></pre>

<p>It is probably a version compatibility issue. Helm v3.3.x is not compatible with Kubernetes v1.5.2.</p>
<p>As per <a href="https://helm.sh/docs/topics/version_skew/#supported-version-skew" rel="nofollow noreferrer">Supported Version Skew</a>:</p>
<blockquote>
<p>When a new version of Helm is released, it is compiled against a
particular minor version of Kubernetes. For example, Helm 3.0.0
interacts with Kubernetes using the Kubernetes 1.16.2 client, so it is
compatible with Kubernetes 1.16.</p>
<pre><code>|---------------------|--------------------------------------|
|      Helm Version   |     Supported Kubernetes Versions    |
|---------------------|--------------------------------------|
|         3.4.x       |           1.19.x - 1.16.x            |
|         3.3.x       |           1.18.x - 1.15.x            |
|         3.2.x       |           1.18.x - 1.15.x            |
|---------------------|--------------------------------------|
</code></pre>
</blockquote>
<p>More than that, you are using <code>apiVersion: apps/v1</code> for your Deployment version. This API version was introduced on Kubernetes <a href="https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.9.md#workloads-api-appsv1" rel="nofollow noreferrer">v1.9.0</a>.</p>
