https://pulumi.com logo
Title
g

gentle-market-22852

08/18/2022, 11:57 AM
package com.tejasoft.devops.iac.pulumi.aws;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.eks.Cluster;

public final class AWSEKSPulumiApp
{
    public static void main(final String[] aArgs) {
       Pulumi.run(AWSEKSPulumiApp::stack);
    }

    private static void stack(final Context aContext) {
       final var cluster = new Cluster("eks-cluster");
       aContext.export("kubeconfig", cluster.kubeconfig());
    }
}
when this is executed the command
pulumi stack output
gives out put as
Current stack outputs (0):
No output values currently in this stack
e

echoing-dinner-19531

08/18/2022, 12:21 PM
You've run it with
pulumi up
first?
g

gentle-market-22852

08/18/2022, 12:23 PM
did run pulumi up and then also same error
e

echoing-dinner-19531

08/18/2022, 12:38 PM
What was the result of
up
?
g

gentle-market-22852

08/18/2022, 1:01 PM
Previewing update (dev) View Live: https://app.pulumi.com/nagkumar/hw/dev/previews/52164d5d-2e6a-405d-8859-13ff2f852bbf Type Name pulumi😛ulumi:Stack hw-dev ├─ eks:index:Cluster eks-cluster + │ ├─ eks:index:VpcCni eks-cluster-vpc-cni + │ ├─ aws:ec2:SecurityGroupRule eks-cluster-eksExtApiServerClusterI + │ ├─ aws:ec2:SecurityGroupRule eks-cluster-eksNodeIngressRule + │ ├─ aws:ec2:SecurityGroupRule eks-cluster-eksNodeInternetEgressRu + │ ├─ aws:ec2:SecurityGroupRule eks-cluster-eksClusterIngressRule + │ └─ aws:ec2:SecurityGroupRule eks-cluster-eksNodeClusterIngressRu └─ kubernetes:core/v1:ConfigMap eks-cluster-nodeAccess Diagnostics: pulumi😛ulumi:Stack (hw-dev): error: Running program [PID: 14772](unknown) failed with an unhandled exception: io.grpc.StatusRuntimeException: UNAVAILABLE: error reading from server: read tcp 127.0.0.1:53539->127.0.0.1:53538: use of closed network connection at io.grpc.Status.asRuntimeException(Status.java:535) at io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:533) at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:553) at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:68) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:739) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:718) at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833) kubernetes:core/v1:ConfigMap (eks-cluster-nodeAccess): error: failed to initialize discovery client: exec plugin: invalid apiVersion "client.authentication.k8s.io/v1alpha1"
e

echoing-dinner-19531

08/18/2022, 3:01 PM
I mean given it's erroring out that a server is unavailable I'd expect it to also say there are no outputs.
g

gentle-market-22852

08/19/2022, 2:31 AM
for the same code, aws does show i.e. it is active
also, another question is how to choose pulumi to fire latest eks as I do see notification there is a higher verstion..instead of manual update, wish pulumi code fires the latest one by default
e

echoing-dinner-19531

08/19/2022, 1:56 PM
for the same code, aws does show i.e. it is active
Sure because it got far enough to create the cluster, but the program error'd out before it could export its outputs.
also, another question is how to choose pulumi to fire latest eks as I do see notification there is a higher verstion
I think it will use the highest version on creation, but it won't automatically update it for you. You need to set the version property to tell it to update.