copyright | lastupdated | keywords | subcollection | ||
---|---|---|---|---|---|
|
2024-08-29 |
schematics agent deleting, deleting agent, agent deleting, command-line, api, ui |
schematics |
{{site.data.keyword.attribute-definition-list}}
{: #delete-agent-overview}
When an agent is no longer needed, you can delete the agent.
{: #delete-agentb1-ui} {: ui}
- Log in to your {{site.data.keyword.cloud_notm}}{: external} account by using your credentials.
- Navigate to {{site.data.keyword.bpshort}} > Agents.
- Click the
...
dots > Delete agent. - In the Delete Agent pop-up window, type
<your agent name>
to confirm. Note the deleted agent action cannot be undone. - Click Delete.
{: #delete-agentb1-cli} {: 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.
{: shortdesc}
Example
ibmcloud schematics agent delete --id agent-ga-prod-cli-jan-10.soA.cd1c
{: pre}
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
{: screen}
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 {{site.data.keyword.objectstorageshort}} bucket, trusted profile to communicate with {{site.data.keyword.bpshort}} are unavailable.
- All the information about the agent in the {{site.data.keyword.bpshort}} instance of your {{site.data.keyword.cloud_notm}} 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 {{site.data.keyword.objectstorageshort}} instance and the {{site.data.keyword.objectstorageshort}} bucket are deleted.
- The agent assignment policy for the agent is not deleted.
{: #delete-agentb1-api} {: api}
Follow the steps to retrieve your IAM access token and authenticate with {{site.data.keyword.bplong_notm}} 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>
{: codeblock}
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
}
{: screen}
{: #agent-delete-nextstep}
- You can view the list of agents, and the agent assignment policy.
- You can check out the agent FAQ for any common questions that are related to delete an agent.