sparse-intern-71089
11/05/2018, 7:06 PMcreamy-potato-29402
11/05/2018, 7:18 PMearly-musician-41645
11/05/2018, 7:19 PMpulumi up
throws an error.creamy-potato-29402
11/05/2018, 7:20 PMearly-musician-41645
11/05/2018, 7:20 PMnew eks.Cluster
. One of the things created by that is the SAearly-musician-41645
11/05/2018, 7:21 PMcreamy-potato-29402
11/05/2018, 7:21 PMcreamy-potato-29402
11/05/2018, 7:22 PMearly-musician-41645
11/05/2018, 7:22 PMcreamy-potato-29402
11/05/2018, 7:22 PMearly-musician-41645
11/05/2018, 7:22 PMcreamy-potato-29402
11/05/2018, 7:22 PMcreamy-potato-29402
11/05/2018, 7:22 PMearly-musician-41645
11/05/2018, 7:22 PMcreamy-potato-29402
11/05/2018, 7:22 PMcreamy-potato-29402
11/05/2018, 7:24 PMmicroscopic-florist-22719
creamy-potato-29402
11/05/2018, 7:24 PMcreamy-potato-29402
11/05/2018, 7:24 PMmicroscopic-florist-22719
creamy-potato-29402
11/05/2018, 7:26 PMcreamy-potato-29402
11/05/2018, 7:26 PMearly-musician-41645
11/05/2018, 7:57 PMearly-musician-41645
11/05/2018, 8:00 PMWARM_IP_TARGET
and deploy it after the cluster is created. I'm trying to add that chart as part of the Pulumi project but it's failing with no particular workaround I can find other than deploying it outside the Pulumi stackmicroscopic-florist-22719
microscopic-florist-22719
microscopic-florist-22719
microscopic-florist-22719
early-musician-41645
11/05/2018, 9:10 PMCNIArgs
to the new eks.Cluster
that I'm already using.early-musician-41645
11/05/2018, 9:11 PMeks.Cluster
to avoid getting into the weeds of cluster and worker group creation. There's just a small change I need for the CNI plugin that I want to orchestrate along with cluster creationmicroscopic-florist-22719
// create the EKS cluster and its other core resources
const core = new eks.Core(...);
// deploy additional k8s resources
// create the EKS worker pool
const workers = new eks.WorkerPool(...);
// deploy the k8s dashboard
const dashboard = new eks.Dashboard(...);
microscopic-florist-22719
early-musician-41645
11/05/2018, 9:23 PMCNIPluginArgs
to one of those (the WorkerPool?)early-musician-41645
11/05/2018, 9:24 PMkubectl apply -f aws-k8s-cni.yaml
and that solve the issue. Is there an equivalent to kubectl apply
from a local file I can use with Pulumi?microscopic-florist-22719
// deploy additional k8s resources
), but from what you've described I think that we can do better hereearly-musician-41645
11/05/2018, 9:24 PMmicroscopic-florist-22719
Is there an equivalent tofrom a local file I can use with Pulumi?kubectl apply
microscopic-florist-22719
early-musician-41645
11/05/2018, 9:26 PMkubectl apply
, and then update a 2nd projectmicroscopic-florist-22719
kubectl
from within Pulumibig-piano-35669
pulumi up
command that works like apply -f $path_to_file
?big-piano-35669
you could also shell out toThat shouldn't be necessary.from within Pulumikubectl
big-piano-35669
microscopic-florist-22719
microscopic-florist-22719
early-musician-41645
11/05/2018, 9:29 PMkubectl apply
. I'd love to do with inside.early-musician-41645
11/05/2018, 9:29 PMnew eks.Cluster
.big-piano-35669
const k = new k8s.ConfigFile(
"foo", { file: "config/foo.yml" });
to deploy a single Kubernetes YAML file, or
const ks = new k8s.ConfigGroup(
"foos", { files: "config/*.yaml" });
to deploy a collection of them.early-musician-41645
11/05/2018, 9:30 PMearly-musician-41645
11/05/2018, 9:33 PMconst cni = new k8s.ConfigFile("aws-k8s-cni", { file: "aws-k8s-cni.yaml", });
Diagnostics:
pulumi:pulumi:Stack (eks-cluster-online-vnext-10az):
error: Running program '/home/tsi.lan/eshamay/git/mustang/sdp-mustang-terraform/pulumi/eks-cluster' failed with an unhandled exception:
error: TSError: ⨯ Unable to compile TypeScript:
index.ts(89,21): error TS2339: Property 'ConfigFile' does not exist on type 'typeof import("/home/tsi.lan/eshamay/git/mustang/sdp-mustang-terraform/pulumi/eks-cluster/node_modules/@pulumi/kubernetes/index")'.
at createTSError (/home/tsi.lan/eshamay/git/mustang/sdp-mustang-terraform/pulumi/eks-cluster/node_modules/ts-node/src/index.ts:261:12)
at getOutput (/home/tsi.lan/eshamay/git/mustang/sdp-mustang-terraform/pulumi/eks-cluster/node_modules/ts-node/src/index.ts:367:40)
at Object.compile (/home/tsi.lan/eshamay/git/mustang/sdp-mustang-terraform/pulumi/eks-cluster/node_modules/ts-node/src/index.ts:558:11)
at Module.m._compile (/home/tsi.lan/eshamay/git/mustang/sdp-mustang-terraform/pulumi/eks-cluster/node_modules/ts-node/src/index.ts:439:43)
at Module._extensions..js (module.js:586:10)
at Object.require.extensions.(anonymous function) [as .ts] (/home/tsi.lan/eshamay/git/mustang/sdp-mustang-terraform/pulumi/eks-cluster/node_modules/ts-node/src/index.ts:442:12)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.require (module.js:504:17)
error: an unhandled error occurred: Program exited with non-zero exit code: 1
early-musician-41645
11/05/2018, 9:33 PMcreamy-potato-29402
11/05/2018, 9:33 PMearly-musician-41645
11/05/2018, 9:34 PMkubectl apply -f aws-k8s-cni.yaml
does work, and it reports things as unchanged
early-musician-41645
11/05/2018, 9:34 PMkubectl
under the hood, I'd expect similar resultscreamy-potato-29402
11/05/2018, 9:34 PMcreamy-potato-29402
11/05/2018, 9:35 PMcreamy-potato-29402
11/05/2018, 9:35 PMpreview
creamy-potato-29402
11/05/2018, 9:35 PMapply
every time you pulumi up
creamy-potato-29402
11/05/2018, 9:36 PMmicroscopic-florist-22719
early-musician-41645
11/05/2018, 9:36 PMearly-musician-41645
11/05/2018, 9:37 PMerror: TSError: ⨯ Unable to compile TypeScript:
index.ts(89,21): error TS2339: Property 'ConfigFile' does not exist on type 'typeof import("/home/tsi.lan/eshamay/git/mustang/sdp-mustang-terraform/pulumi/eks-cluster/node_modules/@pulumi/kubernetes/index")'.
early-musician-41645
11/05/2018, 9:38 PMconst cni = new k8s.ConfigFile("aws-k8s-cni", { file: "aws-k8s-cni.yaml", });
creamy-potato-29402
11/05/2018, 9:39 PMk8s
here should refer to @pulumi/kubernetes
creamy-potato-29402
11/05/2018, 9:39 PMearly-musician-41645
11/05/2018, 9:41 PMimport * as k8s from "@pulumi/kubernetes";
creamy-potato-29402
11/05/2018, 9:42 PMk8s.yaml.ConfigFile
early-musician-41645
11/05/2018, 9:43 PMcreamy-potato-29402
11/05/2018, 9:51 PMcreamy-potato-29402
11/05/2018, 9:51 PMearly-musician-41645
11/05/2018, 9:53 PMcreamy-potato-29402
11/05/2018, 9:54 PMearly-musician-41645
11/05/2018, 9:54 PMcreamy-potato-29402
11/05/2018, 10:00 PMcreamy-potato-29402
11/05/2018, 10:00 PMearly-musician-41645
11/05/2018, 10:01 PMbig-piano-35669
apply -f
? Or do you prefer an opt-in mechanism? Or just keep doing what we do now?microscopic-florist-22719
early-musician-41645
11/05/2018, 10:13 PMaws-nodes
ServiceAccount (i.e. via the EKS cluster and worker group) then it should tolerate the request to create it again, e.g. as an unchanged resourceearly-musician-41645
11/05/2018, 10:14 PMkubectl apply
would handle it. It would just report unchanged
.early-musician-41645
11/05/2018, 10:14 PMcreamy-potato-29402
11/05/2018, 10:19 PMcreamy-potato-29402
11/05/2018, 10:19 PMkubectl apply
-ish model here.creamy-potato-29402
11/05/2018, 10:19 PMearly-musician-41645
11/05/2018, 10:21 PMthe general problem of patching system resources that you didn't create.The original issue arose because of the
aws-nodes
SA. I did create the SA because I did a new eks.Cluster
. Does that fall into "resources that you didn't create"?creamy-potato-29402
11/05/2018, 10:22 PMcreamy-potato-29402
11/05/2018, 10:23 PMcreamy-potato-29402
11/05/2018, 10:23 PMearly-musician-41645
11/05/2018, 10:24 PMcreamy-potato-29402
11/05/2018, 10:25 PMearly-musician-41645
11/05/2018, 10:26 PMcreamy-potato-29402
11/05/2018, 10:28 PMcreamy-potato-29402
11/05/2018, 10:28 PM