Delete portal tenant in kubernetes environment
search cancel

Delete portal tenant in kubernetes environment

book

Article ID: 248307

calendar_today

Updated On:

Products

CA API Developer Portal

Issue/Introduction

I need to delete a tenant from a portal. I found this  in the documentation

https://techdocs.broadcom.com/us/en/ca-enterprise-software/layer7-api-management/api-developer-portal/5-1/install-configure-and-upgrade/post-installation-tasks/portal-multi-tenancy.html

I can’t make it work in a kubernetes environment  .

Environment

Release : 5.1

Component : API PORTAL

Resolution

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 .