How to deploy object in AKS using terraform when local admin account is disabled?

Tanul 1,291 Reputation points
2023-06-09T15:59:02.6466667+00:00

Hello,

We have build AKS with Active directory and kubernetes RBAC enabled. The moment we disable the local admin account deployment of any object is impossible with terraform.

I don't want anyone to use --admin flag with az aks get-credentials. Any suggestion how to deploy kubernetes object in AKS using terraform without local account enabled.

Azure Kubernetes Service
Azure Kubernetes Service
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,447 questions
{count} vote

1 answer

Sort by: Most helpful
  1. shiva patpi 13,366 Reputation points Microsoft Employee Moderator
    2023-06-09T16:38:40.7066667+00:00

    @Tanul

    How about using ServicePrincipal or Managed Identity ?

    1. Create the Service Principal
    2. Grant Permissions
    3. Configure the terraform to use that ClientID & ClientSecret in Azure provider block
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.