Skip to content

Commit

Permalink
fix: update examples for aks and gke (#1534)
Browse files Browse the repository at this point in the history
  • Loading branch information
diavrank and Iván Cabrera committed Jan 23, 2024
1 parent bbe9871 commit 2e62f83
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
9 changes: 5 additions & 4 deletions kubernetes-ts-multicloud/aks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class AksCluster extends pulumi.ComponentResource {
// Create the AD service principal for the K8s cluster.
const adApp = new azuread.Application("aks", {displayName: `${name}-ad`}, {parent: this});
const adSp = new azuread.ServicePrincipal("aksSp", {
applicationId: adApp.applicationId,
clientId: adApp.clientId,
}, {parent: this});
const adSpPassword = new azuread.ServicePrincipalPassword("aksSpPassword", {
servicePrincipalId: adSp.id,
Expand Down Expand Up @@ -86,16 +86,15 @@ export class AksCluster extends pulumi.ComponentResource {
},
},
servicePrincipal: {
clientId: adApp.applicationId,
clientId: adApp.clientId,
clientSecret: adSpPassword.value,
},
kubernetesVersion: "1.16.9",
kubernetesVersion: "1.27",
roleBasedAccessControlEnabled: true,
networkProfile: {
networkPlugin: "azure",
dnsServiceIp: "10.2.2.254",
serviceCidr: "10.2.2.0/24",
dockerBridgeCidr: "172.17.0.1/16",
},
}, {parent: this});

Expand All @@ -107,6 +106,8 @@ export class AksCluster extends pulumi.ComponentResource {
this.staticAppIP = new azure.network.PublicIp("staticAppIP", {
resourceGroupName: this.cluster.nodeResourceGroup,
allocationMethod: "Static",
sku: "Standard", // By default, standard load balancer is used when you create a new cluster instead of basic
location: resourceGroup.location,
}, {parent: this}).ipAddress;

this.registerOutputs();
Expand Down
1 change: 1 addition & 0 deletions kubernetes-ts-multicloud/gke.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export class GkeCluster extends pulumi.ComponentResource {
// node pool and immediately delete it.
initialNodeCount: 1,
removeDefaultNodePool: true,
deletionProtection: false,

minMasterVersion: engineVersion,
}, {parent: this});
Expand Down

0 comments on commit 2e62f83

Please sign in to comment.