Uninstalling the Logging agent using a Helm chart
You can use Helm to uninstall the Logging agent from a cluster.
Before you begin
-
Make sure you have access to an Red Hat OpenShift on IBM Cloud (
OpenShift
) cluster with permissions to create namespaces and deploy the agent. -
Install the following CLIs:
-
The IBM Cloud CLI to log in to the IBM Cloud and manage IBM Cloud services such as creating an API key.
-
The Kubernetes CLI to manage Kubernetes clusters by using
kubectl
commands. Learn more. -
The Openshift CLI to manage OpenShift clusters from the command line. Learn more.
-
The latest release of the version 3 Helm CLI
-
-
Read about the Logging agent.
Uninstall the Logging agent
Complete the following steps to remove a Logging agent:
-
Log in to the cluster.
To log in to a Kubernetes cluster, see Access your cluster.
To log in to an Openshift cluster: Red Hat OpenShift on IBM Cloud is integrated with IBM Cloud Identity and Access Management (IAM). With IAM, you can authenticate users and services by using their IAM identities and authorize actions with access roles and policies. When you authenticate as a user through the Red Hat OpenShift console, your IAM identity is used to generate a Red Hat OpenShift login token that you can use to log in to the command line. You can automate logging in to your cluster by creating an IAM API key or service ID to use for the oc login command. For more information, see Accessing Red Hat OpenShift clusters. For example, complete the steps in Using a service ID to log in to clusters to log in to your cluster.
-
Log in to the Helm registry. Choose one of the following options:
Option 1: Login to the Helm registry by running the
helm registry login
command:helm registry login -u iambearer -p $(ibmcloud iam oauth-tokens --output json | jq -r .iam_token | cut -d " " -f2) icr.io
Windows Windows PowerShell users should use this command instead:
helm registry login -u iambearer -p ((ibmcloud iam oauth-tokens --output json | ConvertFrom-Json).iam_token -replace 'Bearer ', '') icr.io
For more information, see Using Helm charts in Container Registry: Pulling charts from another registry or Helm repository
Option 2: Log in to the Helm registry in Container Registry by running the
ibmcloud cr login
command.You can use the
ibmcloud cr login
command before you perform a Helm dry run or install. For more information, see Accessing Container Registry and ibmcloud cr login.Run the following commands:
ibmcloud cr region-set global
ibmcloud cr login [--client CLIENT]
-
Run the helm uninstall to remove the resources created by the Helm chart
helm uninstall <install-name>
where:
<install-name>
is the name of the helm installation (logs-agent
)