I have an azure devops build pipeline and in one of the stages I want to create a service connection. I want "kubernetes" and "dockerregistry" type service connections. How to achieve that?
1. Azure CLI: I see azure CLI commands to create service connection of type "azurerm" and github only. But didn't find any command for "Kubernetes" and "dockerregistry" type. https://learn.microsoft.com/en-us/cli/azure/devops/service-endpoint?view=azure-cli-latest
2. Rest API: Found this rest api way to create service connection, I tried to give type "kubernetes" but not able to figure out the authentication here. Giving me error "invalid client id".
3. Powershell: Did not find anything for this.
Hi there!
As I could see you had not found any way to do it in
Powershell, I created some examples for the scenario for you.Others type
bodyfor when creating a service-connection Docker-registry type ofOthersAzure Container Registry type
bodyfor when creating a service-connection Docker-registry type ofAzure Container RegistryExample results
Others type
ACR type
I hope this helps! Good luck!