When doing a K8s deploy of an application into Microsoft Azure through Microsoft DevOps, there is a need to create a service connection by hand and manually pass a name to the script. First of all - K8s cluster needs to be already created in Microsoft Azure by Terraform.

Alt text

Alt text

Important additional info

I had an issue where my subscription wasn’t listed in subscription dropdown. It seems to be a very popular problem based on internet, but none answer was correct in my case.

We have on our subscription enabled multi-factor authentication (MFA) and suprisingly that was the case. Probably Microsoft Devops cannot list the subscriptions where MFA is enabled.

I discovered it by clicking through Azure portal, totally accidentally, here are steps to show subscription in the list:

  1. In Microsoft Azure portal open the subscription which is not listed in Devops dropdown.

  2. Go to Azure Active Directory, then Users.

  3. Select the same user which is creating the service connection on the list.

  4. Select checkbox for him and click “Per-user MFA”

    Alt text

  5. Disable MFA

    Alt text

  6. Right now subscription will be listed in dropdown!