Removing data collector Docker container / Kubernetes pod

You can remove .NET Core data collector Docker container or Kubernetes pod.

Procedure to remove data collector Docker container

  1. Run the following command to remove Docker container:
    docker stop <Container_ID>
    docker rm <Container_ID>
    
    Where Container_ID is the Docker container ID.
  2. Optional: Run the following command to remove the container forcefully:
    docker rm -f < Container_ID>
    
  3. Run the following command to remove the Docker image:
    docker rmi -f <Image_name>
    
    Where Image_name is the Docker image name.

Procedure to remove data collector Kubernetes pod

  1. Run the following command to remove Kubernetes pod on master node:
    kubectl delete pod <podname>
    
    Example:
    kubectl delete pod dotnetcoredc1
    
  2. If you have created replicas in your deployment file, new pod will be created. If you need to stop the creation of new pods, you need to delete the deployment by running the following command:

    kubectl delete deployment <deploymentname>
    

    Example:

    kubectl delete deployment dotnetcoredc-deployment1
    

    Info: If you do not remember deployment name , use command kubectl get deployments to list down the detail of all deployments.

    Note: This is one of the standard methods for deleting pod and deployments. You can choose your preference methods for upgrading and/or deleting deployments.