question

zhenweiyan-7012 avatar image
0 Votes"
zhenweiyan-7012 asked srbose-msft answered

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

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
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

srbose-msft avatar image
0 Votes"
srbose-msft answered

@zhenweiyan-7012 , 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.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.