There are certain steps on how to safely remove the old instance together with its data.
- In Kubernetes/Openshift, navigate to deployments and scale down desired service instance (for example apmservices-tas-001) deployment to 0. Wait until all service instance pods (for example apmservices-tas-001-758b59546b-zrv8d) are deleted.
-
If you do not have access to Kubernetes dashboard, you can use kubectl. Please make sure you are connected to the correct namespace and then use command:
-
- Navigate to nfs storage and delete folders with its contents:
nfs/dxi/apmservices/tas-001/data
nfs/dxi/apmservices/tas-001/logs - Recreate the folders:
nfs/dxi/apmservices/tas-001/data
nfs/dxi/apmservices/tas-001/logs - Change ownership of new folders: chown 1010 /data /logs
- Get the master token for your apmservices.
- Open Openshift/Kubernetes
- Select correct project/namespace where your services are deployed
- Navigate to secrets
- Open apmservices-private
- In Open shift: click on "Reveal Secret"
- In Kubernetes: click on the "eye" icon next to "bootstrap.properties"
- Copy value of master token from field: "apm.security.tenantServiceMasterToken"
If you do not have access to Kubernetes dashboard, you can use kubectl:
-
-
Get available secrets using command:
-
Get content of apmservices-private
- Copy content of bootstrap.properties
-
Decode the content using base64
- Copy value of master token from field: "apm.security.tenantServiceMasterToken"
-
-
Get serviceId and InstanceId
-
You can get this from services tab in DX Cluster manager UI
-
Or you can get it by calling REST API:
-
- Locate desired service by serviceID and copy serviceId and InstanceId
-
Remove mapping for requested service by calling REST API