Hi guys, I have the following code that is working...
# kubernetes
Hi guys, I have the following code that is working with Pulumi 3.29.1 and earlier but it does not work with 3.30 and later. I create EKS cluster using Pulumi.Eks dotnet package. Then I create kubernetes provider I use to get access to the cluster In 3.30+ pulumi versions pulumi tries to replace kubernetes provider and it leads to replacement of all cluster resources that was deployed using the provider
Copy code
var eks = new Cluster($"{clusterName}", new ClusterArgs
            Name = $"{clusterName}",
            Version = config.Require("eks_version"),
            VpcId = VpcId,
            PrivateSubnetIds = PrivateSubnetIds,
            PublicSubnetIds = PublicSubnetIds,
            EndpointPrivateAccess = true,
            EndpointPublicAccess = true,
            NodeAssociatePublicIpAddress = false,
            NodeRootVolumeType = "gp3",
            StorageClasses = "gp3",
            SkipDefaultNodeGroup = true,
            ServiceRole = clusterRole,
            InstanceRole = instanceRole,
            EnabledClusterLogTypes =
            EncryptionConfigKeyArn = eksKmsKey.Arn,
            ProviderCredentialOpts = new KubeconfigOptionsArgs { ProfileName = $"{awsProfile}", 
                RoleArn = adminRoleArn }, 
            UseDefaultVpcCni = true,
            InstanceType = config.Require("main_instance_type"),
            CreateOidcProvider = true,
            KubernetesServiceIpAddressRange = config.Require("k8s_service_cidr_block"),
            PublicAccessCidrs = config.RequireObject<List<string>>("k8s_public_access_cidr_block")

var eksProvider = new k8s.Provider("eksProvider", new k8s.ProviderArgs
    KubeConfig = eks.GetKubeconfig()
Part of pulumi cli output of preview or up commands
It looks like breaking changes but I haven't found this change in release notes so could you please help me with the issue as I stuck with 3.29.1 version and cannot upgrade to latest versions
What failure error message do you get?
I tried to create new cluster with pulumi 3.35.1 and my code and I got the following error when creating k8s resources like service account, pods, ingresses etc: " error: configured Kubernetes cluster is unreachable: unable to load Kubernetes client configuration from kubeconfig file: invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable"
Can you run pulumi about from your project directory
The changes to the EKS provider are actually in the Pulumi eks packages and were caused by a breaking changing upstream in the AWS cli
should I provide all output from pulumi about ?
CLI Version 3.35.1 Go Version go1.17.11 Go Compiler gc Plugins NAME VERSION aws 5.3.0 aws-native 0.16.0 dotnet unknown eks 0.37.1 kubernetes 3.15.2 random 4.4.2 tls 4.1.0 Host OS Microsoft Windows 10 Pro Version 10.0.19044 Build 19044 Arch x86_64 This project is written in dotnet: executable='C:\Program Files\dotnet\dotnet.exe' version='6.0.203'
Dependencies: NAME VERSION Pulumi 3.30.0 Pulumi.Aws 5.3.0 Pulumi.AwsNative 0.16.0 Pulumi.Eks 0.37.1 Pulumi.Random 4.4.2 Pulumi.Tls 4.1.0 YamlDotNet 11.2.1
if changes in Pulumi.Eks package why it is working with 3.29.1 pulumi version ? And what is recommended way how to create k8s provider for EKS cluster ?
can you show me what the diff was? i'm struggling to understand what isn't working here
okay you should be able to work around that using an alias
Could you please advise how to do it ? Strange thing that I tried to create new stack with this code and it failed with pulumi 3.35.1 and successful with 3.29.1. I've updated all packages and aws-cli to the latest versions but the picture is the same - works fine with 3.29 and doesn't work with 3.35. Maybe there is a best practice how to create kubernetes provider to use with eks cluster and I do something wrong ?