From 2e62f83a767b542e92162c5a5d74c09aeaa4e233 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Cabrera?= <39581375+diavrank@users.noreply.github.com> Date: Mon, 22 Jan 2024 19:34:36 -0600 Subject: [PATCH] fix: update examples for aks and gke (#1534) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix: https://github.com/pulumi/pulumi-kubernetes/issues/945#issuecomment-1859267231 References: https://github.com/MicrosoftDocs/azure-docs/issues/44148#issuecomment-562313602 Co-authored-by: Iván Cabrera --- kubernetes-ts-multicloud/aks.ts | 9 +++++---- kubernetes-ts-multicloud/gke.ts | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/kubernetes-ts-multicloud/aks.ts b/kubernetes-ts-multicloud/aks.ts index 84c31eeec..c74f1e6ea 100644 --- a/kubernetes-ts-multicloud/aks.ts +++ b/kubernetes-ts-multicloud/aks.ts @@ -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, @@ -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}); @@ -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(); diff --git a/kubernetes-ts-multicloud/gke.ts b/kubernetes-ts-multicloud/gke.ts index 2e8f732f6..bf926a419 100644 --- a/kubernetes-ts-multicloud/gke.ts +++ b/kubernetes-ts-multicloud/gke.ts @@ -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});