📜 ⬆️ ⬇️

Azure Kubernetes Service (AKS) and PowerShell

image

I needed to somehow automate the deployment and management of Kubernetes clusters in Azure.

Documentation Microsoft offers for this 2.5 way:

1) Basic one CLI or PowerShell + main configuration template in JSON format. For this option, there is a template in the documentation and a working version in Azure Quickstart Templates . It is not bad to deploy in this way, but I have not tried to roll up the changes yet, so I put it off until later;

2) Clean CLI. There are many teams, convenient. There is quite a convenient description in the documentation . The only problem is that the rest of the automation already written in PowerShell does not want to use different approaches to running scripts;
')
3) Pure Powershell. And here he stumbled out of the blue. The description is in the documentation , but the AzureRM.Aks module is not installed directly in PowerShell. Now it's July 2016 in the courtyard, the Azure Kubernetes Service has been for two months now, not in the preliminary version, but the Powershell module for this service is still in preview.

I report on the installation method of this module so that you do not have to spend your time on it:

Get-Module PowerShellGet Install-Module PowerShellGet -Force 

Now the main thing - we overload Powershell. Without this, you can even kill a few more hours of life and look for reasons why nothing else happens and look for crutches for repair. Next, calmly install the module AzureRM.Aks

 Install-Module -AllowPreRelease AzureRM.AKS 

Everything, now it is possible to work with AKS from Powershell.

Source: https://habr.com/ru/post/418349/


All Articles