question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Python Helm charts no longer deploy into EKS cluster

See original GitHub issue

Since #1539, when deploying a Helm v3 chart in Python, the resources in that chart are no longer deployed to provider specified on the chart. This means that e.g. attempting to deploy a chart to an EKS cluster in Python silently deploys it to whatever is in your kubeconfig instead.

Steps to reproduce

Assuming eks.cluster is an EKS cluster resource, run a program like:

k8s.helm.v3.Chart(
    "some-helm-chart",
    k8s.helm.v3.ChartOpts(
        chart="whatever",
        # ...
    ),
    opts=pulumi.ResourceOptions(provider=eks.cluster.provider),
)

The chart’s resources will get deployed to whatever kubectl is configured to use, rather than the EKS cluster.

Likely cause

This is almost certainly fallout from #1539. v3.0.0 does not exhibit this bug, but v3.1.0 (which includes #1539) does.

cc @lukehoban @lblackstone

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:18 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
beneschcommented, Nov 21, 2021

@eliskovets we’ve been using the workaround provided by @lblackstone in https://github.com/pulumi/pulumi-kubernetes/issues/1565#issuecomment-834791256 to good effect for a while now.

1reaction
beneschcommented, Jul 7, 2021

I don’t mean to sound ungrateful, but I’d like to advocate for reopening this issue until pulumi/pulumi#7012 is fixed, or there are some guardrails put in place here! While I understand that the aforementioned issue is tracking the root cause, it’s not discoverable for folks who are just looking to understand why pulumi_eks and pulumi_kubernetes are not playing well together.

In particular, pulumi/pulumi#3383 means the bug presents as silently deploying into whatever cluster is currently active in the user’s kubecfg. This is the kind of bug that can result in taking down prod. (We were lucky, and it only took down our staging environment, but that’s only because I happened to have staging as my active cluster, not prod.)

Since pulumi/pulumi#7012 looks like it’s not a quick fix, it’d be great to get some some assertions in the SDK to at least prevent disaster, or at the very least some warnings in the docs.

@lblackstone, thanks for the workaround, but I don’t think it’ll work for us, since swapping the provider out like that results in Pulumi attempting to replace all the resources in the cluster. Tried to work around this with provider aliases but looks like those aren’t wired up yet (pulumi/pulumi#3979).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Deploy Kubernetes resources and packages using Amazon ...
How to create and install a Helm chart in an Amazon EKS cluster and centrally manage it by using a Helm chart repository...
Read more >
[aws-eks] Cluster.addHelmChart no longer respecting ...
addHelmChart allows for a repository field which allows the pointing of the repository to pull the helm chart from. This no longer works....
Read more >
Deploy Dash with Helm on Kubernetes with AWS EKS
Today we are going to be talking about Deploying a Dash App on Kubernetes with a Helm Chart using the AWS Managed Kubernetes...
Read more >
How To Deploy Python APIs on AWS EKS using HELM
Helm makes it easy for you to get going with Kubernetes. In this post, we will see how to deploy Python APIs on...
Read more >
5 Helm Charts Making Your AWS EKS Cluster Better
These 5 Helms charts improve the scalability, resilience, and automation of your EKS (Kubernetes cluster). They should be the first to add after...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found