I am working on automating certain tasks related to Azure Kubernetes.
For this, I want to connect to AKS to list pods and to get live logs which we get through kubectl.
However, when I import the azure module as follows
from azure.mgmt.containerservice import ContainerServiceClient
or
from azure.mgmt.kubernetesconfiguration import SourceControlConfigurationClient
It throws exception that
ModuleNotFoundError: No module named 'azure.mgmt'
I have properly installed this module in virtual env which gets listed on the pip3 list
.
Is there any new way of working with AKS or container service?
Edit - Output of pip3 list is -
Package Version
---------------------------------- ---------
azure-common 1.1.28
azure-core 1.26.3
azure-identity 1.12.0
azure-mgmt-core 1.3.2
azure-mgmt-kubernetesconfiguration 2.0.0