3

I'm attempting to install the argo-cd helm chart with kustomize using the --enable-helm feature.

This results in a kubeVersion compatibility error. I am confused by this result as the version of kubernetes client and server are both greater than the v1.20.0 required version.

I re-produced this test on a new fresh clean VM which has only ever had the versions shown below.

Where could it be reading in the kubernetes v1.20.0 from and how can I fix that?

Error

kc2admin@kargo:~/argocd$ kubectl kustomize --enable-helm .
error: Error: chart requires kubeVersion: >=1.22.0-0 which is incompatible with Kubernetes v1.20.0

Versions

kc2admin@kargo:~/argocd$ kubectl version --short
Client Version: v1.26.0
Kustomize Version: v4.5.7
Server Version: v1.25.4

Kustomization

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: argocd
helmCharts:
- name: argo-cd
  releaseName: argocd
  valuesFile: values.yaml
  version: 5.16.13
  repo: https://argoproj.github.io/argo-helm
  includeCRDs: true

Steps to reproduce

# Create a directory
mkdir argocd && cd argocd

# Create an empty values file
touch values.yaml

# Write the kustomize file
cat <<EOF > Kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: argocd
helmCharts:
- name: argo-cd
  releaseName: argocd
  valuesFile: values.yaml
  version: 5.16.13
  repo: https://argoproj.github.io/argo-helm
  includeCRDs: true
EOF

# build the manifests with kustomize
kubectl kustomize --enable-helm .

Solution

Update from helm v3.6.3 to v3.10.3 as helm template is compiled to fallback to an assumed kubeVersion which it was originally compiled for.

usrbinkat
  • 31
  • 2
  • While Stack Overflow does permit certain questions about Kubernetes, we require that they (like all questions asked here) be specifically related to programming. This question does not appear to be specifically related to programming, but to deployment and kubernetes-helm, which makes it off-topic here. You might be able to ask questions like this one on [sf] or [DevOps](https://devops.stackexchange.com/). – Turing85 Jan 04 '23 at 17:10
  • What happens if you ensure there are no valid credentials available? `KUBECONFIG=/dev/null kubectl kustomize --enable-helm .`? Do you see the same error if you run `kustomize build` (assuming you have the standalone `kustomize` command available) instead of `kubectl kustomize`? – larsks Jan 04 '23 at 17:37
  • Good suggestion, set KUBECONFIG to /dev/null and got the same error. I also get the same error with the straight kustomize binary build command. ```bash kc2admin@kargo:~/argocd$ export KUBECONFIG=/dev/null kc2admin@kargo:~/argocd$ kubectl kustomize --enable-helm . error: WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /dev/null WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /dev/null Error: chart requires kubeVersion: >=1.22.0-0 which is incompatible with Kubernetes v1.20.0 ``` – usrbinkat Jan 04 '23 at 17:58
  • Go figure, it was my version of helm that caused the issue. `curl -L https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash` `kc2admin@kargo:~/argocd$ helm version version.BuildInfo{Version:"v3.10.3"` and the issue is solved – usrbinkat Jan 04 '23 at 18:59

0 Answers0