pulumi-kubernetes: [Helm/Release] Unable to create new release: `mkdir` error

Attempting to create a new helm release from the Traefik chart with the following code:

traefik, err := helmv3.NewRelease(ctx, "traefik", &helmv3.ReleaseArgs{
	Chart:     pulumi.String("traefik"),
	Namespace: pulumi.String("kube-system"),
	RepositoryOpts: helmv3.RepositoryOptsArgs{
		Repo: pulumi.String("https://helm.traefik.io/traefik"),
	},
	SkipAwait: pulumi.BoolPtr(false),
	Values: pulumi.Map{
		"additionalArguments": pulumi.StringArray{
			pulumi.String("--entrypoints.websecure.http.tls"),
			pulumi.String("--ping"),
			pulumi.String("--providers.kubernetesIngress.ingressClass=traefik"),
		},
		"deployment": pulumi.Map{
			"replicas": pulumi.Int(1),
		},
		"ingressRoute": pulumi.Map{
			"dashboard": pulumi.Map{
				"annotations": pulumi.StringMap{
					"traefik.ingress.kubernetes.io/router.tls": pulumi.String("true"),
				},
				"enabled": pulumi.Bool(true),
			},
		},
		"logs": pulumi.Map{
			"access": pulumi.BoolMap{
				"enabled": pulumi.Bool(true),
			},
			"general": pulumi.Map{
				"level": pulumi.String("INFO"),
			},
		},
		"metrics": pulumi.Map{
			"prometheus": pulumi.Map{
				"entryPoint": pulumi.String("metrics"),
			},
		},
		"ports": pulumi.Map{
			"web": pulumi.Map{
				"redirectTo": pulumi.String("websecure"),
			},
		},
		"service": pulumi.Map{
			"annotations": pulumi.StringMap{
				"kubernetes.io/ingress.class":                                     pulumi.String("traefik"),
				"service.beta.kubernetes.io/aws-load-balancer-access-log-enabled": pulumi.String("true"),
				"service.beta.kubernetes.io/aws-load-balancer-internal":           pulumi.String("false"),
				"service.beta.kubernetes.io/aws-load-balancer-name":               pulumi.String("traefik"),
				"service.beta.kubernetes.io/aws-load-balancer-nlb-target-type":    pulumi.String("ip"),
				"service.beta.kubernetes.io/aws-load-balancer-scheme":             pulumi.String("internet-facing"),
				"service.beta.kubernetes.io/aws-load-balancer-type":               pulumi.String("external"),
			},
			"spec": pulumi.StringMap{
				"externalTrafficPolicy": pulumi.String("Cluster"),
			},
		},
	},
	Version: pulumi.String("~> 10.3.2"),
}, pulumi.Parent(cluster), pulumi.Provider(k8sProvider))
if err != nil {
	return err
}

And receiving the following error when running pulumi up -d -v 6:

Previewing update (staging)

View Live: https://app.pulumi.com/gf3/ops/staging/previews/XXX

     Type                               Name             Plan       Info
     pulumi:pulumi:Stack                ops-staging                 25 debugs
     ├─ aws:eks:Cluster                 Arowana-staging
 +   │  └─ pulumi:providers:kubernetes  k8s-provider     create
     └─ kubernetes:helm.sh/v3:Release   traefik                     1 error

Diagnostics:
  kubernetes:helm.sh/v3:Release (traefik):
    error: mkdir : no such file or directory

  pulumi:pulumi:Stack (ops-staging):
    debug: AWS Auth provider used: "SharedCredentialsProvider"
    debug: AWS Auth provider used: "SharedCredentialsProvider"
    debug: Trying to get account information via iam:GetUser
    debug: Truncating attribute path of 0 diagnostics for TypeSet
    debug: Truncating attribute path of 0 diagnostics for TypeSet
    debug: Truncating attribute path of 0 diagnostics for TypeSet
    debug: Truncating attribute path of 0 diagnostics for TypeSet
    debug: Truncating attribute path of 0 diagnostics for TypeSet
    debug: Truncating attribute path of 0 diagnostics for TypeSet
    debug: Truncating attribute path of 0 diagnostics for TypeSet
    debug: Truncating attribute path of 0 diagnostics for TypeSet
    debug: Truncating attribute path of 0 diagnostics for TypeSet
    debug: Truncating attribute path of 0 diagnostics for TypeSet
    debug: Truncating attribute path of 0 diagnostics for TypeSet
    debug: Truncating attribute path of 0 diagnostics for TypeSet
    debug: Truncating attribute path of 0 diagnostics for TypeSet
    debug: Truncating attribute path of 0 diagnostics for TypeSet
    debug: Truncating attribute path of 0 diagnostics for TypeSet
    debug: Truncating attribute path of 0 diagnostics for TypeSet
    debug: Truncating attribute path of 0 diagnostics for TypeSet
    debug: Truncating attribute path of 0 diagnostics for TypeSet
    debug: Truncating attribute path of 0 diagnostics for TypeSet
    debug: Truncating attribute path of 0 diagnostics for TypeSet
    debug: Truncating attribute path of 0 diagnostics for TypeSet
    debug: Truncating attribute path of 0 diagnostics for TypeSet

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 15 (6 by maintainers)

Most upvoted comments

@gf3 @viveklak I was running into the exact same issue (i9 MacOS) and managed to solve it by setting the PULUMI_K8s_HELM_REPOSITORY_CACHE env to a temporary directory.

It appears that this line returns an empty string in my environment, causing the mkdir executed by Helm to fail.

@viveklak i just tried upgrading, luckily there weren’t any required changes—unfortunately i’m seeing the same error

currently this is failing in my local dev environment (M1 macOS), which is the same environment i am able to successfully run helm/terraform to fetch and install the chart

Thanks for following up so quickly! Could you send me the logs post upgrade? That would really help. Interestingly I am not able to reproduce this locally (i7 macos) but I can’t see why the change in arch would matter.

@viveklak sent!

Got it. Many thanks! I will investigate and update shortly.

@viveklak can i send you the log privately? it’s ~26k lines and i’m not sure if it contains sensitive information

and yes, installing traefik manually works:

Absolutely! My e-mail is <first-name> at pulumi.com. Thanks again!