How to use python sdk to control k8s service.e.g create deployment or service

Samuel.Yan 61 Reputation points
2021-08-12T03:28:01.03+00:00

I want to use python sdk to control my k8s service.For example ,create a deployment or service.

Which module should I import to use in the package azure.mgmt.

Thanks

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
0 comments No comments
{count} votes

Accepted answer
  1. SRIJIT-BOSE-MSFT 4,346 Reputation points Microsoft Employee
    2021-08-13T04:25:12.843+00:00

    @Samuel.Yan , Thank you for your question.

    You can use the azure-mgmt-containerservice to operate on AKS components (i.e. CRUD operations on an AKS cluster and node pools). Please find more information here.

    However, deployments and services are Kubernetes API objects. In order to perform operations on these objects in an AKS cluster, you have to use something like the Kubernetes Python Client. Please find sample codes here.

    ----------

    Hope this helps.

    Please "Accept as Answer" if it helped, so that it can help others in the community looking for help on similar topics.

    0 comments No comments

0 additional answers

Sort by: Most helpful

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.