sparse-intern-71089
10/30/2018, 6:37 PMcreamy-potato-29402
10/30/2018, 6:38 PMexport
the variable.creamy-potato-29402
10/30/2018, 6:39 PMexport const kubeconfig = convertToYaml(eks.kubeConfig)
or whateverearly-musician-41645
10/30/2018, 6:49 PMearly-musician-41645
10/30/2018, 10:47 PMfs.writeFileSync
doesn't do what I expect:
// Create the Kubernetes cluster and all associated artifacts and resources
const cluster = new eks.Cluster(environment+"-eks-cluster", {
vpcId : config.require("vpc-id"),
subnetIds : vpcSubnetIds,
instanceType : "m4.4xlarge",
nodePublicKey : config.require("worker-ssh-key"),
nodeRootVolumeSize: 250,
desiredCapacity : 3,
maxSize : 10,
minSize : 1,
nodeUserData : userData,
deployDashboard : false,
});
export const kubeconfig = cluster.kubeconfig;
// Write out the kubeconfig file
fs.writeFileSync("./config-"+environment+".kubeconfig.json", JSON.stringify(kubeconfig));
early-musician-41645
10/30/2018, 10:48 PM$ cat config-online-vnext-10az-pulumi.kubeconfig.json
{"__pulumiOutput":true,"isKnown":{}}
creamy-potato-29402
10/30/2018, 11:42 PMcluster.kubeconfig.apply(kc => fs.writeFileSync(...))
early-musician-41645
10/31/2018, 8:24 PMcluster.kubeconfig.apply(kc => fs.writeFileSync("./config-"+environment+".kubeconfig.json", JSON.stringify(kc)))
Thanks!