IBM Cloud Docs
Deleting an agent

Deleting an agent

When an agent is no longer needed, you can delete the agent.

Deleting an agent through UI

  1. Log in to your IBM Cloud account by using your credentials.
  2. Navigate to Schematics > Agents.
  3. Click the ... dots > Delete agent.
  4. In the Delete Agent pop-up window, type <your agent name> to confirm. Note the deleted agent action cannot be undone.
  5. Click Delete.

Deleting an agent through CLI

You can delete an agent or uninstall an agent from the Kubernetes cluster by using an agent delete command. This command requires an AGENT_ID as input argument.

Example

ibmcloud schematics agent delete --id agent-ga-prod-cli-jan-10.soA.cd1c

Output

Do you really want to delete the agent agent-ga-prod-cli-jan-10.soA.cd1c? [y/N]> y
Deleting Agent...
Agent agent-ga-prod-cli-jan-10.soA.cd1c deleted successfully
OK

When the agent is deleted, you can expect:

  • All the agent microservices are uninstalled.
  • All the agent related Kubernetes resources, such as Pods, Deployment, Configmap, and Namespaces are unavailable.
  • All the credentials that are created as part of the agent deployment, such as HMAC credentials for the Object Storage bucket, trusted profile to communicate with Schematics are unavailable.
  • All the information about the agent in the Schematics instance of your IBM Cloud account is deleted.

When the agent is deleted, the following do not happen:

  • The Kubernetes cluster is not destroyed. The cluster continues to incur costs until it is deleted.
  • The Object Storage instance and the Object Storage bucket are deleted.
  • The agent assignment policy for the agent is not deleted.

Deleting an agent through API

Follow the steps to retrieve your IAM access token and authenticate with IBM Cloud Schematics by using the API.

Example

GET /v2/agents/agent-beta1-testing.soA.748e/ HTTP/1.1
Host: schematics.cloud.ibm.com
Content-Type: application/json
Authorization: Bearer <auth_token>

Output

{
    "requestid": "9dc76486-ec80-4a26-b159-6e2d46eeb39f",
    "timestamp": "2023-03-16T21:13:20.244850864Z",
    "messageid": "M1074",
    "message": "The requested object cannot be located. Check that the ID is correct and try your request again.",
    "statuscode": 404
}

Next steps