13 Feb 2019 02:57 AM - last edited on 13 Dec 2021 10:03 AM by MaciejNeumann
Hi,
I have a question about procedure of uninstallation of OneAgent Operator for Kubernetes.
When we installed OneAgent Operator, we set up two yaml files:
One is "kubernetes.yaml" and the other is "cr.yaml".
https://www.dynatrace.com/support/help/shortlink/k...
On the other hand, the following page says that we must delete only "kubernetes.yaml" but says nothing about "cr.yaml".
https://www.dynatrace.com/support/help/shortlink/k...
Should we also delete "cr.yaml"?
Regards,
Kohei
Solved! Go to Solution.
13 Feb 2019 03:14 AM
Hi Kohei,
You need to follow the directions described here : https://www.dynatrace.com/support/help/cloud-plat...
Which are these 2 commands:
$ kubectl delete -n dynatrace oneagent --all
$ kubectl delete -f https://raw.githubusercontent.com/Dynatrace/dynatrace-oneagent-operator/master/deploy/kubernetes.yaml
Essentially, this deletes the operator, daemonsets, custom resources and associated objects. You don't need to delete the yaml files themselves as they are only templates, what you need is to run the kubectl commands listed above to instruct kubernetes to delete the resources.
Also, make sure you delete the config and log files on each of your cluster nodes by following the procedure described here : Linux related information
Regards,
Steve
13 Feb 2019 05:43 AM
Hi @Steve C.,
I'm sorry for my lacking of description.
As you said, I'm sure that I need to use the following two commands:
$ kubectl delete -n dynatrace oneagent --all
$ kubectl delete -f https://raw.githubusercontent.com/Dynatrace/dynat...
Actually, what I wanted to ask you is whether I can delete such files as "cr.yaml" if I perform these commands.
Using "$ kubectl delete -n dynatrace oneagent --all ", I understand that I can delete all the files about dynatrace operator (maybe except kubernetes.yaml), so we don't need to delete cr.yaml manually in another way.
Is my understanding correct?
Thanks,
Kohei
13 Feb 2019 07:33 AM
Let me inform you of the progress.
I noticed that "cr.yaml" is not deleted by these commands.
I think the reason is that "cr.yaml" is created in the arbitrary directory so we should delete manually this file if we don't want to leave it.
In addition to the above, "kubernetes.yaml" doesn't seem to be downloaded but it's used to describe configuration for creation of pods.
What I noticed here is that in fact I cannot delete remote "kubenetes.yaml" but delete local settings of pods .
I made some misunderstandings because of my lacking of Kubenetes.