When trying to run `pulumi up` in a typescript pro...
# general
r
When trying to run
pulumi up
in a typescript project utilizing
@pulumi/pulumi-kubernetes
, the preview shows that all Kubernetes resources would be replaced, since the
<http://app.kubernetes.io/managed-by|app.kubernetes.io/managed-by>: pulumi
label ought to be removed. The details show changes along the line of:
Copy code
[provider: urn:pulumi:dev::project::eks:index:Cluster$pulumi:providers:kubernetes::project-dev-provider::617c0adc-0f4b-47cc-8e2a-319f67902782 => urn:pulumi:dev::project::eks:index:Cluster$pulumi:providers:kubernetes::project-dev-provider::output<string>]
~ metadata  : {
    - labels   : {
        - <http://app.kubernetes.io/managed-by|app.kubernetes.io/managed-by>: "pulumi"
      }
  }
In another project with the same package versions (
0.25.2
) this doesn't happen, however. Has anyone seen a similar behaviour or has an idea what might be causing this?
w
Could you share a little more of the output? What resource is this which is saying it’s label should be removed? And removing a label would not expect to require a replace.
r
Well it's actually every Kubernetes resource in the stack that's supposedly replaced and thats all the output the details show per resource. That's 96 resources which in part get created via
new eks.Cluster(...)
, in part from YAML files and some are created as part of Helm releases and it seems to affect every k8s resource type from services to CRDs.
w
Are you sure this preview isn’t replacing your cluster? I don’t think the labels are the issue / I think the provider managing these resources is changing, which would happen if your clusters kubeconfig changed, which would happen if you replaced your cluster.
Difficult to guess exactly without seeing more of your output though unfortunately.
r
Hmm thanks for the insight. It actually seems to replace the provider:
Copy code
++pulumi:providers:kubernetes: (create-replacement)
    [id=617c0adc-0f4b-47cc-8e2a-319f67902782]
    [urn=urn:pulumi:dev::eks:index:Cluster$pulumi:providers:kubernetes::dev-provider]
    ~ kubeconfig: "<existing-kubeconfig>" => output<string>
+-pulumi:providers:kubernetes: (replace)
    [id=617c0adc-0f4b-47cc-8e2a-319f67902782]
    [urn=urn:pulumi:dev::eks:index:Cluster$pulumi:providers:kubernetes::dev-provider]
    ~ kubeconfig: ""<existing-kubeconfig>" => output<string>
Though I don't really know why. Maybe I can try reverting to an older version of
pulumi/eks
.