https://rancher.com/ logo
Title
w

witty-honey-18052

04/02/2023, 3:23 PM
It seems that this issue boils down to my helm version being
v3.11.2
, which is passing the kubeversion to the helm chart as whatever is bundled with helm.
f

famous-caravan-42165

04/03/2023, 3:32 PM
@witty-honey-18052 are you using
helm template
? Helm uses the version of Kubernetes that the cluster lists. For
helm template
you can use the
--kube-version
flag to set the version you want.
w

witty-honey-18052

04/03/2023, 4:11 PM
Hi @famous-caravan-42165, so part of my issue is that i'm trying to use Skaffold to drive the helm deployment. One workaround was to try using the below flags (--validate, to force helm to use the server version), which seems to work for
skaffold render
but breaks the install/upgrade (
skaffold dev
or
skaffold run
, which fails when validate is not a recognized option for those commands,
Error: unknown flag: --validate
)
helm:
    flags:
        global:
          - --validate
I should be able to pass --kube-version in the flags as well, and will give that a try
f

famous-caravan-42165

04/03/2023, 4:13 PM
When Helm communicates to the k8s API it uses the specific version of k8s that’s running. For
helm template
there is no cluster to connect to. So, it uses a default value of the latest.
--kube-version
works there.
w

witty-honey-18052

04/03/2023, 4:16 PM
That's what I had expected as well as far as helm using the k8s version, but it's been a wild ride trying to find out why it isn't happening in this case. (Or at least why the version error is what is being printed)
This is a similar thread to what I'm experiencing https://kubernetes.slack.com/archives/CABQMSZA6/p1669803652430549
this is my thread with some consolidated details: https://kubernetes.slack.com/archives/CABQMSZA6/p1680448331818619
My goal is to provide a skaffold file for bundled Rancher Extension development, which includes modules for cert-manager and Rancher
f

famous-caravan-42165

04/03/2023, 4:22 PM
w

witty-honey-18052

04/03/2023, 4:34 PM
it looks like it isn't supported (yet) to provide flags specifically to helm template from the skaffold yaml
Just to show how silly this seems, this is the error message when attempting to deploy 2.7.2-rc8, without the
--validate
flag
Error: chart requires kubeVersion: < 1.26.0-0 which is incompatible with Kubernetes v1.26.0
but I think this is boiling down to being an issue on skaffold's end
Ok I think I resolved this by moving the helm configuration into
deploy
instead of
manifests