Hi All
i am executing the below syntax from the azure PowerShell i am getting the below error.
Connect-AzAccount
$sec= ConvertTo-SecureString "XXXXXXXXXXXXXXXXXXXX" -AsPlainText -Force
$Cre = New-Object -TypeName System.Management.Automation.PSCredential ("1111111111111111111111111111", $sec)
New-AzAksCluster -ResourceGroupName myrg -Name test -ServicePrincipalIdAndSecret $Cre -NodeVmSize Standard_SKU -NodeMaxCount 5 -NodeMinCount 1 -EnableNodeAutoScaling
when i use -GenerateSshKey nothing happens it takes long time. ignore Standard_SKU i have given correct sku name while executing
Note : Go to https://aka.ms/azps-changewarnings for steps to suppress this breaking change warning, and other information on breaking changes in Azure PowerShell.
New-AzAksCluster : Could not find SSH public key in default path 'C:\Users\admin.ssh\id_rsa.pub' which is required for creating k8s cluster. See https://learn.microsoft.com/en-us/azure/virtual-machines/linux/mac-create-ssh-keys
or https://learn.microsoft.com/en-us/azure/virtual-machines/linux/ssh-from-windows for generating a key pair manually; or you could try to add switch parameter -GenerateSshKey during calling New-AzAksCluster which will automatically
generate SSH key file if you have ssh-keygen installed.
At line:1 char:1
- New-AzAksCluster -ResourceGroupName myrg -Name test...
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : CloseError: (:) [New-AzAksCluster], AzPSArgumentException
- FullyQualifiedErrorId : Microsoft.Azure.Commands.Aks.NewAzureRmAks