Red Hat OpenShift 에서 Instana 에이전트 제거하기

에이전트가 배포된 방식에 따라 Red Hat OpenShift 에서 Instana 에이전트를 다양한 방법으로 제거할 수 있습니다.

시작하기 전에

Instana 에이전트를 제거하기 전에, 애플리케이션 런타임에 설치된 트레이서(또는 인프로세스 수집기)를 먼저 제거해야 합니다.

Red Hat OpenShift 환경에 PHP 런타임이 포함되어 있고, (configuration.yaml) spec.agent.configuration_yaml 의 에이전트 구성에서 PHP 추적이 (기본적으로) 활성화된 경우, “ PHP 추적 비활성화”에 설명된 단계를 따라 PHP Tracer를 제거해야 합니다.

트레이서를 제거한 후에는 다음 방법을 사용하여 Red Hat OpenShift 에서 Instana 에이전트를 제거할 수 있습니다:

operator를 사용하여 설치된 에이전트 제거

운영자를 사용하여 설치된 에이전트를 제거하려면 다음 단계를 완료하세요:

  1. 사용자 정의 리소스를 제거하여 Instana 에이전트를 제거하십시오:

    oc delete -f instana-agent.customresource.yaml
     
  2. 다음 명령을 실행하여 운영자를 제거합니다:

    oc delete -f https://github.com/instana/instana-agent-operator/releases/latest/download/instana-agent-operator.yaml
     

Helm 차트를 사용하여 설치된 호스트 에이전트 제거

참고: 명령어를 helm uninstall 실행하기 전에 에이전트 사용자 정의 리소스(CR)를 반드시 삭제하십시오. 그렇지 않으면 CR이 클러스터에서 삭제되지 않습니다.

Helm 차트를 사용하여 설치된 Instana 에이전트를 제거하려면 다음 명령을 실행하십시오:

NAMESPACE=instana-agent
# delete agent custom resource, the operator will remove the agent artifacts it is owning
oc delete agents.instana.io instana-agent -n ${NAMESPACE} --wait
# uninstall helm chart which removes the operator and RBAC artifacts
helm uninstall instana-agent -n ${NAMESPACE}
# manually uninstall the custom resource definition which is not uninstalled by helm
oc delete crd agents.instana.io
# remove the entire namespace
oc delete namespace ${NAMESPACE}
 

이 명령을 실행하면 상담원과 관련된 모든 리소스가 제거됩니다.

CR을 삭제하기 전에 먼저 다음 helm uninstall 명령을 실행한 경우, 클러스터에서 에이전트 설치 전체를 제거하려면 다음 명령을 사용하십시오:

NAMESPACE=instana-agent
# remove the finalizer
oc patch agents.instana.io instana-agent -p '{"metadata":{"finalizers":null}}' --type=merge -n ${NAMESPACE}
# remove the cluster-wide objects
oc delete crd/agents.instana.io clusterrole/leader-election-role clusterrole/instana-agent-clusterrole clusterrolebinding/leader-election-rolebinding clusterrolebinding/instana-agent-clusterrolebinding
# remove helm chart,if still present
helm uninstall instana-agent -n ${NAMESPACE} || true
# delete the entire namespace
oc delete ns ${NAMESPACE} --wait || true
 

Instana, AutoTrace, WebHook, 를 제거하려면 Instana 제거 방법( AutoTrace, WebHook )을 참조하십시오.