pulumi / pulumi-kubernetes

A Pulumi resource provider for Kubernetes to manage API resources and workloads in running clusters
https://www.pulumi.com/docs/reference/clouds/kubernetes/
Apache License 2.0
415 stars 115 forks source link

Failed checking the Kubernetes version: argocd: >= 1.22.0-0 and got Kubernetes 1.20.0 #2249

Closed LucasBrazi06 closed 1 year ago

LucasBrazi06 commented 2 years ago

What happened?

Got an issue in deploying the argo-cd helm chart! Seems failing checking the Kubernetes version: argocd: >= 1.22.0-0 and got Kubernetes 1.20.0 I don't know where it got the version 1.20.0 as on EKS I have 1.24!

Steps to reproduce

    new k8s.helm.v3.Chart(
      'argo-cd',
      {
        chart: 'argo-cd',
        fetchOpts: {
          repo: 'https://argoproj.github.io/argo-helm'
        },
        namespace: 'argo',
        values: {}
      },
      {
        providers: {
          kubernetes: cluster.provider
        }
      }
    );

Expected Behavior

Deploy the chart :-)

Actual Behavior

Got this error:

Diagnostics:
  pulumi:pulumi:Stack (e-mobility-ca-prod):
    error: Error: invocation of kubernetes:helm:template returned an error: failed to generate YAML for specified Helm chart: failed to create chart from template: chart requires kubeVersion: >=1.22.0-0 which is incompatible with Kubernetes v1.20.0
        at Object.callback (/Users/serge/dev/personal/ev-kubernetes/pulumi/e-mobility/node_modules/@pulumi/runtime/invoke.ts:159:33)
        at Object.onReceiveStatus (/Users/serge/dev/personal/ev-kubernetes/pulumi/e-mobility/node_modules/@grpc/grpc-js/src/client.ts:338:26)
        at Object.onReceiveStatus (/Users/serge/dev/personal/ev-kubernetes/pulumi/e-mobility/node_modules/@grpc/grpc-js/src/client-interceptors.ts:426:34)
        at Object.onReceiveStatus (/Users/serge/dev/personal/ev-kubernetes/pulumi/e-mobility/node_modules/@grpc/grpc-js/src/client-interceptors.ts:389:48)
        at /Users/serge/dev/personal/ev-kubernetes/pulumi/e-mobility/node_modules/@grpc/grpc-js/src/call-stream.ts:276:24
        at processTicksAndRejections (node:internal/process/task_queues:77:11)

Output of pulumi about

CLI
Version      3.47.2
Go Version   go1.19.2
Go Compiler  gc

Plugins
NAME        VERSION
aws         5.21.1
aws         5.10.0
docker      3.6.1
eks         0.42.7
kubernetes  3.20.2
nodejs      unknown

Host
OS       darwin
Version  13.0.1
Arch     arm64

This project is written in nodejs: executable='/opt/homebrew/bin/node' version='v18.11.0'

Current Stack: ca-prod

TYPE                                                 URN
pulumi:pulumi:Stack                                  urn:pulumi:ca-prod::e-mobility::pulumi:pulumi:Stack::e-mobility-ca-prod
pulumi:providers:aws                                 urn:pulumi:ca-prod::e-mobility::pulumi:providers:aws::default_5_21_1
awsx:x:ec2:Vpc                                       urn:pulumi:ca-prod::e-mobility::awsx:x:ec2:Vpc::e-mobility-ca-prod-vpc
eks:index:Cluster                                    urn:pulumi:ca-prod::e-mobility::eks:index:Cluster::e-mobility-ca-prod
pulumi:providers:aws                                 urn:pulumi:ca-prod::e-mobility::pulumi:providers:aws::default_5_10_0
eks:index:ServiceRole                                urn:pulumi:ca-prod::e-mobility::eks:index:Cluster$eks:index:ServiceRole::e-mobility-ca-prod-eksRole
aws:iam/role:Role                                    urn:pulumi:ca-prod::e-mobility::aws:iam/role:Role::e-mobility-ca-prod-role-eks
aws:iam/role:Role                                    urn:pulumi:ca-prod::e-mobility::eks:index:Cluster$eks:index:ServiceRole$aws:iam/role:Role::e-mobility-ca-prod-eksRole-role
aws:iam/rolePolicyAttachment:RolePolicyAttachment    urn:pulumi:ca-prod::e-mobility::aws:iam/rolePolicyAttachment:RolePolicyAttachment::e-mobility-ca-prod-role-eks-policy-1
aws:iam/rolePolicyAttachment:RolePolicyAttachment    urn:pulumi:ca-prod::e-mobility::aws:iam/rolePolicyAttachment:RolePolicyAttachment::e-mobility-ca-prod-role-eks-policy-0
aws:iam/rolePolicyAttachment:RolePolicyAttachment    urn:pulumi:ca-prod::e-mobility::aws:iam/rolePolicyAttachment:RolePolicyAttachment::e-mobility-ca-prod-role-eks-policy-2
aws:iam/rolePolicyAttachment:RolePolicyAttachment    urn:pulumi:ca-prod::e-mobility::eks:index:Cluster$eks:index:ServiceRole$aws:iam/rolePolicyAttachment:RolePolicyAttachment::e-mobility-ca-prod-eksRole-4b490823
awsx:x:ec2:Subnet                                    urn:pulumi:ca-prod::e-mobility::awsx:x:ec2:Vpc$awsx:x:ec2:Subnet::e-mobility-ca-prod-vpc-public-0
awsx:x:ec2:NatGateway                                urn:pulumi:ca-prod::e-mobility::awsx:x:ec2:Vpc$awsx:x:ec2:NatGateway::e-mobility-ca-prod-vpc-1
awsx:x:ec2:InternetGateway                           urn:pulumi:ca-prod::e-mobility::awsx:x:ec2:Vpc$awsx:x:ec2:InternetGateway::e-mobility-ca-prod-vpc
awsx:x:ec2:Subnet                                    urn:pulumi:ca-prod::e-mobility::awsx:x:ec2:Vpc$awsx:x:ec2:Subnet::e-mobility-ca-prod-vpc-public-1
awsx:x:ec2:Subnet                                    urn:pulumi:ca-prod::e-mobility::awsx:x:ec2:Vpc$awsx:x:ec2:Subnet::e-mobility-ca-prod-vpc-private-0
awsx:x:ec2:NatGateway                                urn:pulumi:ca-prod::e-mobility::awsx:x:ec2:Vpc$awsx:x:ec2:NatGateway::e-mobility-ca-prod-vpc-0
awsx:x:ec2:Subnet                                    urn:pulumi:ca-prod::e-mobility::awsx:x:ec2:Vpc$awsx:x:ec2:Subnet::e-mobility-ca-prod-vpc-private-1
aws:ec2/vpc:Vpc                                      urn:pulumi:ca-prod::e-mobility::awsx:x:ec2:Vpc$aws:ec2/vpc:Vpc::e-mobility-ca-prod-vpc
aws:ec2/eip:Eip                                      urn:pulumi:ca-prod::e-mobility::awsx:x:ec2:Vpc$awsx:x:ec2:NatGateway$aws:ec2/eip:Eip::e-mobility-ca-prod-vpc-1
aws:ec2/eip:Eip                                      urn:pulumi:ca-prod::e-mobility::awsx:x:ec2:Vpc$awsx:x:ec2:NatGateway$aws:ec2/eip:Eip::e-mobility-ca-prod-vpc-0
aws:ec2/subnet:Subnet                                urn:pulumi:ca-prod::e-mobility::awsx:x:ec2:Vpc$awsx:x:ec2:Subnet$aws:ec2/subnet:Subnet::e-mobility-ca-prod-vpc-private-1
aws:ec2/routeTable:RouteTable                        urn:pulumi:ca-prod::e-mobility::awsx:x:ec2:Vpc$awsx:x:ec2:Subnet$aws:ec2/routeTable:RouteTable::e-mobility-ca-prod-vpc-private-0
aws:ec2/internetGateway:InternetGateway              urn:pulumi:ca-prod::e-mobility::awsx:x:ec2:Vpc$awsx:x:ec2:InternetGateway$aws:ec2/internetGateway:InternetGateway::e-mobility-ca-prod-vpc
aws:ec2/subnet:Subnet                                urn:pulumi:ca-prod::e-mobility::awsx:x:ec2:Vpc$awsx:x:ec2:Subnet$aws:ec2/subnet:Subnet::e-mobility-ca-prod-vpc-public-1
aws:ec2/securityGroup:SecurityGroup                  urn:pulumi:ca-prod::e-mobility::eks:index:Cluster$aws:ec2/securityGroup:SecurityGroup::e-mobility-ca-prod-eksClusterSecurityGroup
aws:ec2/routeTable:RouteTable                        urn:pulumi:ca-prod::e-mobility::awsx:x:ec2:Vpc$awsx:x:ec2:Subnet$aws:ec2/routeTable:RouteTable::e-mobility-ca-prod-vpc-private-1
aws:ec2/subnet:Subnet                                urn:pulumi:ca-prod::e-mobility::awsx:x:ec2:Vpc$awsx:x:ec2:Subnet$aws:ec2/subnet:Subnet::e-mobility-ca-prod-vpc-private-0
aws:ec2/routeTable:RouteTable                        urn:pulumi:ca-prod::e-mobility::awsx:x:ec2:Vpc$awsx:x:ec2:Subnet$aws:ec2/routeTable:RouteTable::e-mobility-ca-prod-vpc-public-1
aws:ec2/routeTable:RouteTable                        urn:pulumi:ca-prod::e-mobility::awsx:x:ec2:Vpc$awsx:x:ec2:Subnet$aws:ec2/routeTable:RouteTable::e-mobility-ca-prod-vpc-public-0
aws:ec2/subnet:Subnet                                urn:pulumi:ca-prod::e-mobility::awsx:x:ec2:Vpc$awsx:x:ec2:Subnet$aws:ec2/subnet:Subnet::e-mobility-ca-prod-vpc-public-0
aws:ec2/securityGroupRule:SecurityGroupRule          urn:pulumi:ca-prod::e-mobility::eks:index:Cluster$aws:ec2/securityGroupRule:SecurityGroupRule::e-mobility-ca-prod-eksClusterInternetEgressRule
aws:ec2/routeTableAssociation:RouteTableAssociation  urn:pulumi:ca-prod::e-mobility::awsx:x:ec2:Vpc$awsx:x:ec2:Subnet$aws:ec2/routeTableAssociation:RouteTableAssociation::e-mobility-ca-prod-vpc-private-1
aws:ec2/routeTableAssociation:RouteTableAssociation  urn:pulumi:ca-prod::e-mobility::awsx:x:ec2:Vpc$awsx:x:ec2:Subnet$aws:ec2/routeTableAssociation:RouteTableAssociation::e-mobility-ca-prod-vpc-private-0
aws:ec2/routeTableAssociation:RouteTableAssociation  urn:pulumi:ca-prod::e-mobility::awsx:x:ec2:Vpc$awsx:x:ec2:Subnet$aws:ec2/routeTableAssociation:RouteTableAssociation::e-mobility-ca-prod-vpc-public-1
aws:ec2/route:Route                                  urn:pulumi:ca-prod::e-mobility::awsx:x:ec2:Vpc$awsx:x:ec2:Subnet$aws:ec2/route:Route::e-mobility-ca-prod-vpc-public-1-ig
aws:ec2/route:Route                                  urn:pulumi:ca-prod::e-mobility::awsx:x:ec2:Vpc$awsx:x:ec2:Subnet$aws:ec2/route:Route::e-mobility-ca-prod-vpc-public-0-ig
aws:ec2/routeTableAssociation:RouteTableAssociation  urn:pulumi:ca-prod::e-mobility::awsx:x:ec2:Vpc$awsx:x:ec2:Subnet$aws:ec2/routeTableAssociation:RouteTableAssociation::e-mobility-ca-prod-vpc-public-0
aws:ec2/natGateway:NatGateway                        urn:pulumi:ca-prod::e-mobility::awsx:x:ec2:Vpc$awsx:x:ec2:NatGateway$aws:ec2/natGateway:NatGateway::e-mobility-ca-prod-vpc-1
aws:ec2/natGateway:NatGateway                        urn:pulumi:ca-prod::e-mobility::awsx:x:ec2:Vpc$awsx:x:ec2:NatGateway$aws:ec2/natGateway:NatGateway::e-mobility-ca-prod-vpc-0
aws:eks/cluster:Cluster                              urn:pulumi:ca-prod::e-mobility::eks:index:Cluster$aws:eks/cluster:Cluster::e-mobility-ca-prod-eksCluster
aws:ec2/route:Route                                  urn:pulumi:ca-prod::e-mobility::awsx:x:ec2:Vpc$awsx:x:ec2:Subnet$aws:ec2/route:Route::e-mobility-ca-prod-vpc-private-1-nat-1
aws:ec2/route:Route                                  urn:pulumi:ca-prod::e-mobility::awsx:x:ec2:Vpc$awsx:x:ec2:Subnet$aws:ec2/route:Route::e-mobility-ca-prod-vpc-private-0-nat-0
aws:ec2/securityGroup:SecurityGroup                  urn:pulumi:ca-prod::e-mobility::eks:index:Cluster$aws:ec2/securityGroup:SecurityGroup::e-mobility-ca-prod-nodeSecurityGroup
aws:ec2/securityGroupRule:SecurityGroupRule          urn:pulumi:ca-prod::e-mobility::eks:index:Cluster$aws:ec2/securityGroupRule:SecurityGroupRule::e-mobility-ca-prod-eksNodeInternetEgressRule
aws:ec2/securityGroupRule:SecurityGroupRule          urn:pulumi:ca-prod::e-mobility::eks:index:Cluster$aws:ec2/securityGroupRule:SecurityGroupRule::e-mobility-ca-prod-eksExtApiServerClusterIngressRule
aws:ec2/securityGroupRule:SecurityGroupRule          urn:pulumi:ca-prod::e-mobility::eks:index:Cluster$aws:ec2/securityGroupRule:SecurityGroupRule::e-mobility-ca-prod-eksClusterIngressRule
aws:ec2/securityGroupRule:SecurityGroupRule          urn:pulumi:ca-prod::e-mobility::eks:index:Cluster$aws:ec2/securityGroupRule:SecurityGroupRule::e-mobility-ca-prod-eksNodeClusterIngressRule
aws:ec2/securityGroupRule:SecurityGroupRule          urn:pulumi:ca-prod::e-mobility::eks:index:Cluster$aws:ec2/securityGroupRule:SecurityGroupRule::e-mobility-ca-prod-eksNodeIngressRule
pulumi:providers:kubernetes                          urn:pulumi:ca-prod::e-mobility::eks:index:Cluster$pulumi:providers:kubernetes::e-mobility-ca-prod-eks-k8s
pulumi:providers:kubernetes                          urn:pulumi:ca-prod::e-mobility::eks:index:Cluster$pulumi:providers:kubernetes::e-mobility-ca-prod-provider
pulumi:providers:eks                                 urn:pulumi:ca-prod::e-mobility::pulumi:providers:eks::default
kubernetes:yaml:ConfigFile                           urn:pulumi:ca-prod::e-mobility::kubernetes:yaml:ConfigFile::namespaces
eks:index:ManagedNodeGroup                           urn:pulumi:ca-prod::e-mobility::eks:index:ManagedNodeGroup::e-mobility-ca-prod-node-group-eks
kubernetes:core/v1:ConfigMap                         urn:pulumi:ca-prod::e-mobility::eks:index:Cluster$kubernetes:core/v1:ConfigMap::e-mobility-ca-prod-nodeAccess
eks:index:ManagedNodeGroup                           urn:pulumi:ca-prod::e-mobility::eks:index:ManagedNodeGroup::e-mobility-ca-prod-node-group-nginx
kubernetes:yaml:ConfigFile                           urn:pulumi:ca-prod::e-mobility::kubernetes:yaml:ConfigFile::app-docker
eks:index:VpcCni                                     urn:pulumi:ca-prod::e-mobility::eks:index:Cluster$eks:index:VpcCni::e-mobility-ca-prod-vpc-cni
kubernetes:core/v1:Namespace                         urn:pulumi:ca-prod::e-mobility::kubernetes:yaml:ConfigFile$kubernetes:core/v1:Namespace::docker-registry
kubernetes:core/v1:Namespace                         urn:pulumi:ca-prod::e-mobility::kubernetes:yaml:ConfigFile$kubernetes:core/v1:Namespace::local
eks:index:ManagedNodeGroup                           urn:pulumi:ca-prod::e-mobility::eks:index:ManagedNodeGroup::e-mobility-ca-prod-node-group-prod
kubernetes:core/v1:Namespace                         urn:pulumi:ca-prod::e-mobility::kubernetes:yaml:ConfigFile$kubernetes:core/v1:Namespace::prod
kubernetes:core/v1:Namespace                         urn:pulumi:ca-prod::e-mobility::kubernetes:yaml:ConfigFile$kubernetes:core/v1:Namespace::monitoring
kubernetes:core/v1:Namespace                         urn:pulumi:ca-prod::e-mobility::kubernetes:yaml:ConfigFile$kubernetes:core/v1:Namespace::dev
kubernetes:core/v1:Namespace                         urn:pulumi:ca-prod::e-mobility::kubernetes:yaml:ConfigFile$kubernetes:core/v1:Namespace::cert-manager
kubernetes:core/v1:Namespace                         urn:pulumi:ca-prod::e-mobility::kubernetes:yaml:ConfigFile$kubernetes:core/v1:Namespace::ingress-nginx
kubernetes:core/v1:Namespace                         urn:pulumi:ca-prod::e-mobility::kubernetes:yaml:ConfigFile$kubernetes:core/v1:Namespace::argo
kubernetes:core/v1:Namespace                         urn:pulumi:ca-prod::e-mobility::kubernetes:yaml:ConfigFile$kubernetes:core/v1:Namespace::metrics-server
kubernetes:core/v1:Namespace                         urn:pulumi:ca-prod::e-mobility::kubernetes:yaml:ConfigFile$kubernetes:core/v1:Namespace::argo-runtime
kubernetes:core/v1:Namespace                         urn:pulumi:ca-prod::e-mobility::kubernetes:yaml:ConfigFile$kubernetes:core/v1:Namespace::qa
kubernetes:core/v1:Namespace                         urn:pulumi:ca-prod::e-mobility::kubernetes:yaml:ConfigFile$kubernetes:core/v1:Namespace::minio
aws:eks/nodeGroup:NodeGroup                          urn:pulumi:ca-prod::e-mobility::eks:index:ManagedNodeGroup$aws:eks/nodeGroup:NodeGroup::e-mobility-ca-prod-node-group-eks
aws:eks/nodeGroup:NodeGroup                          urn:pulumi:ca-prod::e-mobility::eks:index:ManagedNodeGroup$aws:eks/nodeGroup:NodeGroup::e-mobility-ca-prod-node-group-nginx
kubernetes:core/v1:Secret                            urn:pulumi:ca-prod::e-mobility::kubernetes:yaml:ConfigFile$kubernetes:core/v1:Secret::prod/docker-secret
aws:eks/nodeGroup:NodeGroup                          urn:pulumi:ca-prod::e-mobility::eks:index:ManagedNodeGroup$aws:eks/nodeGroup:NodeGroup::e-mobility-ca-prod-node-group-prod

Found no pending operations associated with ca-prod

Backend
Name           pulumi.com
URL            https://app.pulumi.com/LucasBrazi06
User           LucasBrazi06
Organizations  LucasBrazi06

Dependencies:
NAME            VERSION
@pulumi/pulumi  3.47.1
@types/node     14.18.33
@pulumi/aws     5.21.1
@pulumi/awsx    0.40.1
@pulumi/eks     0.42.7

Pulumi locates its logs in /var/folders/d7/63km1rys40b4rgcy4kxpbw7w0000gn/T/ by default

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

LucasBrazi06 commented 2 years ago

Running Helm template works fine but not via Pulumi:

  helm repo add argo https://argoproj.github.io/argo-helm
  helm repo update

  helm template argo-cd argo/argo-cd -n argo
LucasBrazi06 commented 2 years ago

By using this command helm template argo-cd argo/argo-cd -n argo --kube-version 1.20 I can reproduce the same issue.

I uninstalled Helm from my Mac and tried pulumi up and it seems working meaning that you are using your own Helm to generate the template.

If you pass the --kube-version param to Helm with the value of the cluster linked to the Chart, it'll work I think!

yann-soubeyrand commented 2 years ago

Hello @LucasBrazi06, I may be wrong but it seems that you’re using version 3.20.2 of this provider which doesn’t try to automatically fill in .Capabilities in Helm Charts. This ability has been released in version 3.21.1 of this provider. You should try upgrading it.

LucasBrazi06 commented 2 years ago

@yann-soubeyrand Thanks a million for the info!!! Now I'm getting mad on how to use this new plugin version. I managed to install it via this command: pulumi plugin install resource kubernetes 3.21.1. But calling pulumi up still uses the version 3.20.2!!! Same result even if I change the '@pulumi/eks' to V1.0.0 in the package.json file. I'm still searching how to force Pulumi to use this plugin version...

yann-soubeyrand commented 2 years ago

You were right in trying to change the package version in the package.json file. However, this is not the right package :wink: Do you have direct dependency on @pulumi/pulumi-kubernetes or does it come transitively as a dependency of @pulumi/eks? I’m not used to the Typescript ecosystem, but it seems that you can use an override section in the second case: https://www.stefanjudis.com/today-i-learned/how-to-override-your-dependencys-dependencies/.

LucasBrazi06 commented 2 years ago

Do you have direct dependency on @pulumi/pulumi-kubernetes

Not a direct dep: image

When I create the Pulumi project in Typescript, all the libs are up to date with their latest versions! When I force them to the latest, Pulumi does not manage to transpile anymore!

I will try to override the dependent lib as you advised! Thanks for the tips! I'll let you know.

danielrbradley commented 2 years ago

EKS has now got a 1.0.0 version available. This might also upgrade the version of @pulumi/kubernetes for you

LucasBrazi06 commented 2 years ago

EKS has now got a 1.0.0 version available. This might also upgrade the version of @pulumi/kubernetes for you

Thanks for your advise!

I had seen this upgrade but unfortunately not backward compatible (I commented out the ArgoCD deployment):

Diagnostics:
  pulumi:pulumi:Stack (e-mobility-ca-prod):
    error: TypeError: Cannot read properties of undefined (reading 'map')
        at /Users/serge/dev/personal/ev-kubernetes/pulumi/e-mobility/node_modules/@pulumi/yaml/yaml.ts:2993:14
        at processTicksAndRejections (node:internal/process/task_queues:95:5)
    error: TypeError: Cannot read properties of undefined (reading 'map')
        at /Users/serge/dev/personal/ev-kubernetes/pulumi/e-mobility/node_modules/@pulumi/yaml/yaml.ts:2993:14
        at processTicksAndRejections (node:internal/process/task_queues:95:5)

It fails on Yaml parsing like this one:

    new k8s.yaml.ConfigFile(
      'app-docker',
      {
        file: `src/assets/yaml/container-registry/${containerRegistry}.yaml`,
        transformations: [
          (yamlDocument: any) => {
            if (yamlDocument.metadata) {
              yamlDocument.metadata.namespace = namespace
            } else {
              yamlDocument.metadata = { namespace }
            }
          }
        ]
      },
      {
        provider: cluster.provider
      },
    );

No problem with the version 0.42.7 of '@pulumi/eks' lib.

dlee-rt commented 1 year ago

@LucasBrazi06 were you able to fix this issue? Just in case it helps, I was able to get around this issue by explicitly specifying the version of the package when creating the kubernetes provider. I am not using Typescript, but I assume you are creating a new provider with the kubeconfig of the cluster you're trying to deploy ArgoCD to. You can specify the version of the package as a pulumi resource option. Setting this to 3.23.0 allowed me to deploy the latest version of ArgoCD to a 1.23 k8s cluster. Hope that helps

LucasBrazi06 commented 1 year ago

@LucasBrazi06 were you able to fix this issue? Just in case it helps, I was able to get around this issue by explicitly specifying the version of the package when creating the kubernetes provider. I am not using Typescript, but I assume you are creating a new provider with the kubeconfig of the cluster you're trying to deploy ArgoCD to. You can specify the version of the package as a pulumi resource option. Setting this to 3.23.0 allowed me to deploy the latest version of ArgoCD to a 1.23 k8s cluster. Hope that helps

@dlee-rt Thanks for your help!!! I'm still having the issue.

The provider is created by Pulumi when I created the EKS cluster: image

And I use it to deploy ArgoCD: image

Maybe you can share me the code to do so even if it's not TypeScript?

dlee-rt commented 1 year ago

Sure, I am doing something similar where I create an EKS cluster, grab the kubeconfig from the new cluster resource using an Apply function, then pass that kubeconfig to a newly defined kubernetes provider that I use to deploy ArgoCD. Please check the snippet below and let me know if you have any follow up questions (code is in Go):

kubeconfig := eksCluster.Kubeconfig.ApplyT(func(k interface{}) (string, error) {
    data, err := json.Marshal(k)
    if err != nil {
        return "", err
    }
    return string(data), nil
}).(pulumi.StringOutput)

kubeProvider, err := kubernetes.NewProvider(ctx, "k8s-cluster", &kubernetes.ProviderArgs{
    Kubeconfig: kubeconfig,
}, pulumi.Version("3.23.0"))
if err != nil {
    return err
}
lblackstone commented 1 year ago

It looks like this bug was fixed according to https://github.com/pulumi/pulumi-kubernetes/issues/2249#issuecomment-1328002550