sparse-intern-71089
10/26/2018, 5:35 PMearly-musician-41645
10/26/2018, 5:37 PMwhite-balloon-205
white-balloon-205
eks.Cluster library handles all of this at https://github.com/pulumi/eks/blob/master/nodejs/eks/cluster.ts.
In particular the `vcpConfig`: https://github.com/pulumi/eks/blob/master/nodejs/eks/cluster.ts#L190early-musician-41645
10/26/2018, 5:44 PMearly-musician-41645
10/26/2018, 6:37 PMyum install) on all worker nodes in the autoscale group
- Add some ingress rules, e.g. SSH for allowing worker-node access. I see the optional public-key option, but I don't see the accompanying ingress rule for port 22
- Run custom actions on all worker nodes, e.g. curl to install some specific drivers/volumesearly-musician-41645
10/26/2018, 6:39 PMwhite-balloon-205
early-musician-41645
10/26/2018, 6:39 PMmicroscopic-florist-22719
microscopic-florist-22719
microscopic-florist-22719
SecurityGroupRule after declaring the clustermicroscopic-florist-22719
microscopic-florist-22719
const cluster = new eks.Cluster("cluster", {
nodePublicKey: fs.readFileSync("~/.ssh/id_rsa.pub").toString(),
});
// Allow SSH ingress.
new aws.ec2.SecurityGroupRule("ssh", {
type: "ingress",
fromPort: 22,
toPort: 22,
protocol: "tcp",
securityGroupId: cluster.nodeSecurityGroup.id,
cidrBlocks: [ "0.0.0.0/0" ],
});microscopic-florist-22719
microscopic-florist-22719
early-musician-41645
10/29/2018, 5:20 PMnew eks.Cluster with the nodeUserData in the docs somewhere, or in an example?early-musician-41645
10/29/2018, 5:36 PMnpm install of the eks module but it's not getting the change for nodeUserData, e.g.
Object literal may only specify known properties, and 'nodeUserData' does not exist in type 'ClusterOptions'.microscopic-florist-22719
dev label. So your package.json should include a line like "@pulumi/eks": "dev"microscopic-florist-22719
@pulumi/eks?microscopic-florist-22719
// Create an EKS cluster with the default configuration.
const cluster = new eks.Cluster("cluster", {
nodeUserData: `#!/bin/python
from __future__ import print_function
print("hello, world!")
`
});microscopic-florist-22719
#!/bin/bash and add whatever invocations you needearly-musician-41645
10/29/2018, 6:53 PMearly-musician-41645
10/29/2018, 6:54 PM$ cat package.json
{
"name": "eks-cluster",
"devDependencies": {
"@types/node": "latest"
},
"dependencies": {
"@pulumi/aws": "latest",
"@pulumi/eks": "dev",
"@pulumi/pulumi": "latest"
}
}early-musician-41645
10/29/2018, 6:55 PMnpm installearly-musician-41645
10/29/2018, 6:55 PMmicroscopic-florist-22719
microscopic-florist-22719
@pulumi/eks with the nodeUserData change. Updating to v0.16.1 should work.