Agent ControlですでにインストゥルメントされているクラスタでNew Relic を試したい場合は、既存のNew Relic エージェントを削除し、Agent Control を通じて管理する必要があります。各エージェントのHelmチャートによって公開されるすべての機能とすべての設定は、引き続きAgent Controlを通じて統一された方法で適用できます。
既存の計装とAgent Controlが管理する新しいエージェントを照合します。
まず、既存の計装をサポートされているエージェントと一致させます。
Agent Controlを通じてデプロイおよび管理できます。
nri-bundle
チャートには次の Helm チャートが含まれています:New Relic-infrastructure
、nri-kube-events
、kube-state-metrics
、およびnri-kube-events
(現在はNew Relic Infrastructureタイプを通じて管理されています)New Relic-prometheus-configurator
(現在は New Relic Prometheus エージェント タイプを通じて管理されています)New Relic-logging
(現在は Fluent Bit エージェント タイプを通じて管理されています)
nr-k8s-otel-collector
チャート (現在は New Relic OpenTelemetry Collector エージェント タイプを通じて管理されています)
Helmを使用してエージェントをインストールした場合は、次のコマンドを実行してクラスタからインストレーション構成を取得します。
$$ helm get values <release-name> --namespace <namespace-name>
インストレーションからファイルを保存してある場合は、何もする必要はありません。
一方、マニフェスト経由でインストゥルメントを行った場合は、各エージェント チャートで対応するオプションを見つけます。
ヒント
エージェントやコンポーネント、特にAgent Controlでまだサポートされていないエージェントやコンポーネントは引き続きクラスタ内に保持できます。 最適なエクスペリエンスを確保するには、同じクラスター名を維持し、同じアカウントをポイントするようにしてください。
Agent Controlをインストールするためのvalues.yaml
構成を作成します
ガイド付きインストール経由でAgent Controlインストレーションを開始し、興味のあるエージェントをすべて選択します。 values.yaml
ファイルをローカル マシンにコピーします。適用する前に、クラスタ内で既に実行されているエージェントの設定に対応するように各エージェントの設定を更新します。
制御したいエージェントをアンインストールします
Agent Control経由で管理するエージェントとコンポーネントをアンインストールします。 アンインストール方法については、既存のエージェントのドキュメントを参照してください。
Helmインストレーション
values.yaml
ファイルを変更した後、ガイド付きインストールに含まれるインストール手順に進みます。
例
クラスタはHelmチャート経由ですでにインストゥルメントされていました。 nri-bunle
のリリースから次のvalues.yaml
を取得しました:
global: cluster: test-migration licenseKey: ***kube-state-metrics: enabled: falseNew Relic-prometheus-agent: enabled: trueNew Relic-infrastructure: enabled: true kubelet: tolerations: - operator: "Exists" effect: "NoSchedule" - operator: "Exists" effect: "NoExecute" - operator: "Exists" key: "MyToleration" ksm: enabled: false common: config: interval: 29sNew Relic-logging: enabled: true image: tag: "latest" resources: limits: cpu: 200m requests: cpu: 200mnri-kube-events: enabled: true customAttributes: test_tag_label: test_tag_value
nri-kube-events
、 New Relic-logging
、およびNew Relic-infrastructure
には、 Agent Controlでセットアップするために再利用する必要がある設定があることに注意してください。 一方、 New Relic-prometheus-agent
nri-bundle
の一部としてインストールされており、追加の設定はありませんでした。 さらに、KSMコンポーネントをfalse
に設定しました。
次に、ガイド付きインストールによって作成された構成を取得し、アンインストールされたエージェントと同じ設定を維持しながら、管理する予定のエージェントが有効になるようにvalues.yaml
ファイルを変更します。
global: cluster: "test-migration" licenseKey: "****"agent-control-deployment: identityClientId: "****" identityClientSecret: "****" config: fleet_control: fleet_id: "****" auth: organizationId: "****" subAgents: logs: type: New Relic/io.fluentbit:0.1.0 content: chart_version: "1.25.1" chart_values: New Relic-logging: image: tag: "latest" resources: limits: cpu: 200m requests: cpu: 200m infrastructure: type: New Relic/com.New Relic.infrastructure:0.1.0 content: chart_version: "5.0.109" chart_values: New Relic-infrastructure: kubelet: tolerations: - operator: "Exists" effect: "NoSchedule" - operator: "Exists" effect: "NoExecute" - operator: "Exists" key: "MyToleration" ksm: enabled: false common: config: interval: 29s nri-kube-events: customAttributes: test_tag_label: test_tag_value kube-state-metrics: enabled: false prometheus: type: New Relic/com.New Relic.prometheus:0.1.0 content: chart_version: "1.15.4"
次に、古い計装を削除します。
$helm delete my-installation -n New Relic
最後に、 Agent Controlを介して新しいものを作成します。
$helm upgrade --install agent-control -n New Relic New Relic/agent-control --create-namespace --values my_migrated_values.yaml