registry
registry copied to clipboard
k8s how to guide for eks errors
What happened?
Broken steps in our how-to-guide
Modified index.ts
❯ cat index.ts
import * as pulumi from "@pulumi/pulumi";
import * as awsx from "@pulumi/awsx";
import * as eks from "@pulumi/eks";
import * as k8s from "@pulumi/kubernetes";
const name = "helloworld";
// Create an EKS cluster with non-default configuration
const vpc = new awsx.ec2.Vpc("vpc", { subnets: [{ type: "public" }] });
const cluster = new eks.Cluster(name, {
vpcId: vpc.id,
subnetIds: vpc.publicSubnetIds,
desiredCapacity: 2,
minSize: 1,
maxSize: 2,
storageClasses: "gp2",
deployDashboard: false,
});
// Export the clusters' kubeconfig.
export const kubeconfig = cluster.kubeconfig
But unable to run pulumi up
successfully.
Example
❯ pulumi up -y
Previewing update (dev)
View in Browser (Ctrl+O): https://app.pulumi.com/diana-pulumi-corp/eks-hello-world/dev/previews/6c29f0f7-a61e-4af2-a5e7-16f0c021cfd7
Type Name Plan Info
+ pulumi:pulumi:Stack eks-hello-world-dev create 1 error
Diagnostics:
pulumi:pulumi:Stack (eks-hello-world-dev):
error: Running program '/Users/d/github/desteves/TEST-ISSUES/pulumi-hugo_issues_3411/eks-hello-world/index.ts' failed with an unhandled exception:
TSError: ⨯ Unable to compile TypeScript:
index.ts(9,39): error TS2345: Argument of type '{ subnets: { type: string; }[]; }' is not assignable to parameter of type 'VpcArgs'.
Object literal may only specify known properties, and 'subnets' does not exist in type 'VpcArgs'.
Output of pulumi about
pulumi about
CLI
Version 3.88.0
Go Version go1.21.1
Go Compiler gc
Plugins
NAME VERSION
aws 5.42.0
aws 5.31.0
awsx 1.0.6
docker 3.6.1
eks 1.0.3
kubernetes 4.3.0
kubernetes 3.30.2
nodejs unknown
Host
OS darwin
Version 13.5.1
Arch arm64
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).