sparse-intern-71089
02/22/2019, 7:12 PMstocky-spoon-28903
02/22/2019, 7:20 PMstocky-spoon-28903
02/22/2019, 7:21 PMincalculable-diamond-5088
02/22/2019, 7:22 PMerror: Running program '/pulumi' failed with an unhandled exception:
error: Error: Missing required property 'roleArn'
stocky-spoon-28903
02/22/2019, 7:47 PMincalculable-diamond-5088
02/22/2019, 7:51 PMaws.eks.Cluster.get
incalculable-diamond-5088
02/22/2019, 7:51 PMconst eksCluster = aws.eks.Cluster.get({ name: 'cluster-name' })
stocky-spoon-28903
02/22/2019, 7:51 PMincalculable-diamond-5088
02/22/2019, 7:52 PMincalculable-diamond-5088
02/22/2019, 7:52 PMstocky-spoon-28903
02/22/2019, 7:54 PMstocky-spoon-28903
02/22/2019, 7:55 PMbreezy-hamburger-69619
02/22/2019, 7:57 PMcluster
, do the following:
const k8sProvider = new k8s.Provider("myKubernetesCluster", {
kubeconfig: cluster.kubeconfig.apply(JSON.stringify),
});
breezy-hamburger-69619
02/22/2019, 7:58 PM{ provider: k8sProvider }
stocky-spoon-28903
02/22/2019, 8:04 PMcluster.get
, use this: aws.eks.Cluster.get("pulumi-name", "aws-cluster-name")
stocky-spoon-28903
02/22/2019, 8:04 PMincalculable-diamond-5088
02/22/2019, 8:06 PMincalculable-diamond-5088
02/22/2019, 8:07 PMcluster
does not contain kubeconfig
propertyincalculable-diamond-5088
02/22/2019, 8:13 PMstocky-spoon-28903
02/22/2019, 8:14 PMbreezy-hamburger-69619
02/22/2019, 8:34 PM@pulumi/eks
package instead of `pulumi/aws/eks`: https://pulumi.io/reference/pkg/nodejs/@pulumi/eks/index.html#Cluster-kubeconfigincalculable-diamond-5088
02/22/2019, 8:35 PMincalculable-diamond-5088
02/22/2019, 8:45 PMconst eksCluster = new eks.Cluster('eks-cluster', {}, { id: ... })
and I get:
Error: Cannot read an existing resource unless it has a custom provider
at new Resource (/Users/igor/work/pulumi/node_modules/@pulumi/pulumi/resource.js:91:23)
at new ComponentResource (/Users/igor/work/pulumi/node_modules/@pulumi/pulumi/resource.js:208:9)
breezy-hamburger-69619
02/22/2019, 8:50 PMbreezy-hamburger-69619
02/22/2019, 8:57 PMconst cluster = aws.eks.Cluster.get("myCluster", "nebula-eksCluster-efc46c2")
you can use the cluster
props: certificateAuthority
, name
, and endpoint
to fill in the blanks in https://gist.github.com/b01eeecacccc3e284771463ed626af5ecreamy-potato-29402
02/22/2019, 8:58 PMcreamy-potato-29402
02/22/2019, 8:58 PMcreamy-potato-29402
02/22/2019, 8:59 PMincalculable-diamond-5088
02/22/2019, 9:01 PMcreamy-potato-29402
02/22/2019, 9:01 PMcreamy-potato-29402
02/22/2019, 9:01 PM.kubeconfig()
method that constructs it on the fly.creamy-potato-29402
02/22/2019, 9:02 PMbreezy-hamburger-69619
02/22/2019, 9:04 PMcreamy-potato-29402
02/22/2019, 9:04 PMError: Cannot read an existing resource unless it has a custom provider
at new Resource (/Users/igor/work/pulumi/node_modules/@pulumi/pulumi/resource.js:91:23)
at new ComponentResource (/Users/igor/work/pulumi/node_modules/@pulumi/pulumi/resource.js:208:9)
breezy-hamburger-69619
02/22/2019, 9:15 PMkubeconfig()
method: https://github.com/pulumi/pulumi-eks/issues/68incalculable-diamond-5088
02/22/2019, 9:17 PMmicroscopic-florist-22719
@pulumi/eks.Cluster
from an exiting setup, as it encompasses much more than the EKS cluster itselfmicroscopic-florist-22719
@pulumi/aws
that can construct a Kubeconfig for a raw aws.eks.Cluster
breezy-hamburger-69619
02/22/2019, 9:34 PMcluster
obj returned from doing a aws.eks.Cluster.get(...)
?microscopic-florist-22719
creamy-potato-29402
02/22/2019, 9:34 PMmicroscopic-florist-22719
breezy-hamburger-69619
02/22/2019, 9:35 PMmicroscopic-florist-22719
@pulumi/eks.Cluster
out of existing resources in the fullness of timebreezy-hamburger-69619
02/22/2019, 9:36 PMmicroscopic-florist-22719
@pulumi/aws
is the right place to put the kubeconfig()
helpercreamy-potato-29402
02/22/2019, 9:36 PMmicroscopic-florist-22719
@pulumi/aws.eks.Cluster
breezy-hamburger-69619
02/22/2019, 9:36 PMcreamy-potato-29402
02/22/2019, 9:37 PMmicroscopic-florist-22719
creamy-potato-29402
02/22/2019, 9:37 PMcreamy-potato-29402
02/22/2019, 9:37 PMmicroscopic-florist-22719
creamy-potato-29402
02/22/2019, 9:38 PMmicroscopic-florist-22719
const cluster = aws.eks.Cluster.get("myCluster", "my-cluster-id");
const kubeconfig = cluster.kubeconfig();
microscopic-florist-22719
microscopic-florist-22719
@pulumi/eks
package can consume that methodcreamy-potato-29402
02/22/2019, 9:39 PMeks.Cluster
type.creamy-potato-29402
02/22/2019, 9:40 PMec2.Instance
microscopic-florist-22719
creamy-potato-29402
02/22/2019, 9:40 PMbreezy-hamburger-69619
02/22/2019, 9:41 PMpulumi/eks
and moved it to `pulumi/aws`: https://github.com/pulumi/pulumi-aws/issues/478microscopic-florist-22719