1

I am using microk8s to run Kubernetes on my Ubuntu server. I am using the helm v3 as my helm command.

This is the result of the helm version command:

version.BuildInfo{Version:"v3.9.2", GitCommit:"1addefbfe665c350f4daf868a9adc5600cc064fd", GitTreeState:"clean", GoVersion:"go1.17.12"}

I am trying to run this helm chart on this K8s instance:

apiVersion: v2
name: myTest
description: The test daemon (test) helm chart
type: application
version: 1.4.0
appVersion: v1.18.0
kubeVersion: ">= 1.19.0"
...

But I am getting this error:

INSTALLATION FAILED: chart requires kubeVersion: >= 1.19.0 which is incompatible with Kubernetes v1.19.15-34+c064bb32deff78

I tried different versions of Microk8s as 1.21, 1.24, and 1.19 but there is the same result.

I installed this service on minikube without any problem :(

Navid_pdp11
  • 3,487
  • 3
  • 37
  • 65
  • try update the microk8s via `snap`, then: `microk8s enable helm` – Ali Aug 16 '22 at 13:05
  • I did that, I enabled helm and helm3. version 1.24 is the latest channel that you can install by using snap but nothing resolved. – Navid_pdp11 Aug 16 '22 at 13:23

1 Answers1

1

According to the Semantic Versioning specification you have a pre-release version of Kubernetes. (This is possibly an issue in microk8s's release process.) The Helm documentation for the kubeVersion: field states that it depends on the Go github.com/Masterminds/semver package. Its documentation notes:

SemVer comparisons using constraints without a prerelease comparator will skip prerelease versions. For example, >=1.2.3 will skip prereleases when looking at a list of releases while >=1.2.3-0 will evaluate and find prereleases.

So setting in your Chart.yaml that you're willing to tolerate pre-release versions should address this:

kubeVersion: ">= 1.19.0-0" # adding a -0 on the end
David Maze
  • 130,717
  • 29
  • 175
  • 215