Skip to content

Commit

Permalink
Update EKS examples to v3 (#1714)
Browse files Browse the repository at this point in the history
This updates the examples to use EKS v3. ([Announcement blog
post](https://www.pulumi.com/blog/eks-v3-release/))
  • Loading branch information
flostadler authored Oct 25, 2024
2 parents 7220c2a + 108af21 commit b8e9ac1
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion aws-java-eks-minimal/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<dependency>
<groupId>com.pulumi</groupId>
<artifactId>eks</artifactId>
<version>[2.0,3.0)</version>
<version>[3.0,4.0)</version>
</dependency>
</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import com.pulumi.aws.ec2.outputs.GetVpcResult;
import com.pulumi.eks.Cluster;
import com.pulumi.eks.ClusterArgs;
import com.pulumi.eks.enums.AuthenticationMode;

public class App {
public static void main(String[] args) {
Expand Down Expand Up @@ -40,8 +41,8 @@ private static void stack(Context ctx) {

var cluster = new Cluster("my-cluster", ClusterArgs.builder()
.vpcId(vpcIdOutput)
.authenticationMode(AuthenticationMode.ApiAndConfigMap)
.subnetIds(subnetIdsOutput)
.instanceType("t2.micro")
.minSize(1)
.maxSize(2)
.build());
Expand Down
2 changes: 1 addition & 1 deletion aws-ts-eks-hello-world/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ const vpc = new awsx.ec2.Vpc("vpc", { numberOfAvailabilityZones: 2 });
const cluster = new eks.Cluster(name, {
vpcId: vpc.vpcId,
subnetIds: vpc.publicSubnetIds,
authenticationMode: eks.AuthenticationMode.Api,
desiredCapacity: 2,
minSize: 1,
maxSize: 2,
storageClasses: "gp2",
deployDashboard: false,
});

// Export the clusters' kubeconfig.
Expand Down
2 changes: 1 addition & 1 deletion aws-ts-eks-hello-world/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"dependencies": {
"@pulumi/aws": "^6.0.0",
"@pulumi/awsx": "^2.0.2",
"@pulumi/eks": "^2.0.0",
"@pulumi/eks": "^3.0.0",
"@pulumi/kubernetes": "^4.0.0",
"@pulumi/pulumi": "^3.0.0",
"@types/node": "^18.0.0"
Expand Down
1 change: 0 additions & 1 deletion aws-ts-eks-migrate-nodegroups/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ const myCluster = new eks.Cluster(`${projectName}`, {
subnetIds: allVpcSubnets,
nodeAssociatePublicIpAddress: false,
skipDefaultNodeGroup: true,
deployDashboard: false,
instanceRoles: roles,
enabledClusterLogTypes: ["api", "audit", "authenticator",
"controllerManager", "scheduler"],
Expand Down
2 changes: 1 addition & 1 deletion aws-ts-eks-migrate-nodegroups/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"dependencies": {
"@pulumi/aws": "^6.0.0",
"@pulumi/awsx": "^2.0.2",
"@pulumi/eks": "^2.0.0",
"@pulumi/eks": "^3.0.0",
"@pulumi/kubernetes": "^4.0.0",
"@pulumi/pulumi": "^3.0.0"
}
Expand Down
4 changes: 2 additions & 2 deletions aws-ts-eks-migrate-nodegroups/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export function createNodeGroup(
): eks.NodeGroup {
return new eks.NodeGroup(name, {
cluster: args.cluster,
nodeSecurityGroup: args.cluster.nodeSecurityGroup,
clusterIngressRule: args.cluster.eksClusterIngressRule,
nodeSecurityGroupId: args.cluster.nodeSecurityGroupId,
clusterIngressRuleId: args.cluster.clusterIngressRuleId,
instanceType: args.instanceType,
amiId: args.ami,
nodeAssociatePublicIpAddress: false,
Expand Down
2 changes: 1 addition & 1 deletion aws-ts-eks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ const vpc = new awsx.ec2.Vpc("vpc", { numberOfAvailabilityZones: 2 });
// Create the EKS cluster itself and a deployment of the Kubernetes dashboard.
const cluster = new eks.Cluster("cluster", {
vpcId: vpc.vpcId,
authenticationMode: eks.AuthenticationMode.Api,
subnetIds: vpc.publicSubnetIds,
instanceType: "t2.medium",
desiredCapacity: 2,
minSize: 1,
maxSize: 2,
Expand Down
2 changes: 1 addition & 1 deletion aws-ts-eks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"dependencies": {
"@pulumi/aws": "^6.0.0",
"@pulumi/awsx": "^2.0.2",
"@pulumi/eks": "^2.0.0",
"@pulumi/eks": "^3.0.0",
"@pulumi/pulumi": "^3.32.1"
}
}
2 changes: 1 addition & 1 deletion aws-yaml-eks/Pulumi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ resources:
cluster:
type: eks:Cluster
properties:
authenticationMode: API_AND_CONFIG_MAP
vpcId: ${vpcId}
subnetIds: ${subnetIds}
instanceType: "t2.medium"
desiredCapacity: 2
minSize: 1
maxSize: 2
Expand Down

0 comments on commit b8e9ac1

Please sign in to comment.