I need to delete a tenant from a portal. I found this in the documentation
I can’t make it work in a kubernetes environment .
Release : 5.1
Component : API PORTAL
The following steps should work to list and also to delete the tenants in kubernetes
First get the key and cert from the secrets .
kubectl get secret portal-internal-secret -o 'go-template={{index .data "apim-tps.key" | base64decode | base64decode }}' 2>&1 > apim-tps.key
kubectl get secret portal-internal-secret -o 'go-template={{index .data "apim-tps.crt" | base64decode | base64decode }}' 2>&1 > apim-tps.crt
To list the tenants
curl --insecure --request GET -w "\nStatus Code: %{HTTP_CODE}%\n" https://dev-portal-ssg.example.com:443/provision/tenants -v --cert ./apim-tps.crt --key ./apim-tps.key
to delete you can use
curl --insecure --request DELETE -w "\nStatus Code: %{HTTP_CODE}%\n" https://dev-portal-ssg.example.com:443/provision/tenants/tenanttodelete -v --cert ./apim-tps.crt --key ./apim-tps.key
You may need to adjust the link as this is based on the default helm charts .