https://pulumi.com logo
#general
Title
# general
h

hallowed-ghost-37140

11/28/2023, 11:53 PM
Any ideas why I'm getting this error when trying to run
pulumi up
after upgrading some
@pulumi/*
packages. I'm running a managed DigitalOcean k8s cluster, and obtaining the
kubeconfig
from the outputs then using it to initialize the k8s provider. Then using that provider to install via Helm various charts, but now after upgrading the packages it's failing with...
Copy code
$ pulumi up
Previewing update (evilcorp/dev)

View in Browser (Ctrl+O): <https://app.pulumi.com/evilcorp/evilapp/dev/previews/bc43f6ec-25b7-4aab-b02e-c03c2816989c>

     Type                              Name                  Plan       Info
     pulumi:pulumi:Stack               evilapp-dev                     
 ~   ├─ pulumi:providers:kubernetes    k8s-provider          update     [diff: ~version]
 +   ├─ kubernetes:core/v1:Namespace   argo-cd-namespace     create     
     └─ kubernetes:<http://helm.sh/v3:Release|helm.sh/v3:Release>  cert-manager-release             1 error

Diagnostics:
  kubernetes:<http://helm.sh/v3:Release|helm.sh/v3:Release> (cert-manager-release):
    error: kubernetes:<http://helm.sh/v3:Release|helm.sh/v3:Release> resource 'cert-manager-release': property chart value {cert-manager} has a problem: could not get server version from Kubernetes: the server has asked for the client to provide credentials; check the chart name and repository configuration.
This is the general setup.
Copy code
import * as digitalocean from "@pulumi/digitalocean";
import * as kubernetes from "@pulumi/kubernetes";

const doCluster = new digitalocean.KubernetesCluster("do-cluster", {
  name: "k8s-evilapp",
  nodePool: {
    autoScale: true,
    maxNodes: 2,
    minNodes: 1,
    name: "pool-evilapp",
    size: "s-1vcpu-2gb",
  },
  region: "nyc3",
  version: "1.28.2-do.0",
});

export const kubeconfig = doCluster.kubeConfigs[0].rawConfig;

const provider = new kubernetes.Provider("k8s-provider", {
  kubeconfig,
});

const certManagerNamespace = new kubernetes.core.v1.Namespace(
  "cert-manager-namespace",
  {
    metadata: {
      name: "cert-manager",
    },
  },
  {
    provider,
  }
);

const certManagerRelease = new kubernetes.helm.v3.Release(
  "cert-manager-release",
  {
    chart: "cert-manager",
    version: "1.10.2",
    namespace: certManagerNamespace.metadata.name,
    repositoryOpts: {
      repo: "<https://charts.jetstack.io>",
    },
    values: {
      installCRDs: true
    }
  },
  {
    provider,
  }
);
d

dry-keyboard-94795

11/29/2023, 9:12 AM
This issue should be fixed in
@pulumi/kubernetes
v4.5.4, see the changelog for details https://github.com/pulumi/pulumi-kubernetes/blob/master/CHANGELOG.md