Getting weird errors when trying to install cert-...
# general
n
Getting weird errors when trying to install cert-manager on kubernetes cluster. Helm is reading the incorrect kubernetes version.
Copy code
const certManager = new k8s.helm.v3.Release("cert-manager", {
  chart: "cert-manager",
  version: "v1.12.5",
  namespace: "cert-manager",
  repositoryOpts: {
    repo: "<https://charts.jetstack.io>",
  },
  values: {
    installCRDs: true,
  }
}, {
  provider: k8sProvider,
  dependsOn: [certManagerNamespace],
})
The above code gives me this errror
Copy code
error: kubernetes:helm.sh/v3:Release resource 'cert-manager': property chart value {cert-manager} has a problem: chart requires kubeVersion: >= 1.22.0-0 which is incompatible with Kubernetes v1.20.0; check the chart name and repository configuration.
My kubernetes version is 1.26.10, see below
Copy code
const k3sWorker2Install = new remote.Command("k3s-worker-2-install", {
  connection: worker2Con,
  create: pulumi.interpolate`
  sudo yum update -y
  sudo yum install iscsi-initiator-utils -y
  sudo systemctl enable iscsid --now
  sudo curl -sfL <https://get.k3s.io> | INSTALL_K3S_VERSION=v1.26.10-rc1+k3s2 INSTALL_K3S_EXEC="agent --server https://${k3sMaster1.ipv4Address}:6443 --token ${clusterToken}" sh -s -
  sudo swapoff -a
  sudo sed -i '/swap/d' /etc/fstab
  sudo systemctl restart k3s-agent.service
  `
},
  { dependsOn: k3sMaster1Install, k3sWorker2}
)
I did read somewhere that this error can be a red herring and caused by not being able to talk to the cluster, but this is not the case here. If I use kubernetes.helm.v3.
Chart
instead of
Release
, then the deployment gets to the cluster, but then I get errors that pulumi does not support helm hooks. Everything works fine if I take the deployment code out of my Pulumi script and run it manually at the terminal.
d
This is a regression in v4.5.0, and should hopefully be fixed in the next release. See here for context, https://github.com/pulumi/pulumi-kubernetes/issues/2631 You'll need to downgrade to v4.4.0 for now
n
@dry-keyboard-94795 Thank you
s
I also saw this this week, thanks for bringing this up