I am fairly new to kubernetes - I have developed web UI/API that automates model deployment using Azure Machine Learning Services to Azure Kubernetes Services (AKS). As a hardening measure, I am tying to set up managed identity for deployed pods in AKS using this documentation. One of the step is to edit the deployment to add identity-feature label at /spec/template/metadata/labels
for the deployment (see para starting like Edit the deployment to add ...
in this section).
I wish to automate this step using python kubernetes client (https://github.com/kubernetes-client/python). Browsing the available API, I was wondering that perhaps patch_namespaced_deployment
will allow me to edit deployment and add label at /spec/template/metadata/labels
. I was looking for some example code using the python client for the same - any help to achieve above will be appreciated.