Kubernetes CLI を使用したクラスタエージェントのインストール
このページでは、 OpenShift OperatorHub バンドルを使用してクラスタエージェントをインストールする方法について説明します。これは、「Kubernetes CLI を使用したクラスタエージェントのインストール」の代替手段です。
要件
開始する前に、次のことを確認します。
- kubectl 1.16 以上がインストールされていること
- 「クラスタエージェントの要件およびサポート対象環境」に記載されている要件が満たされていること
- クラスタエージェントと AppDynamics オペレータイメージ。カスタムのクラスター エージェント イメージを作成するには、「クラスター エージェント コンテナ イメージの作成 」を、カスタム オペレータ イメージを作成するには、「AppDynamics オペレータ コンテナ イメージ」を参照してください。
Requirements
Before you begin, verify that you have:
- Installed kubectl >= 1.16
- Met the requirements described here: Cluster Agent Requirements and Supported Environments
Installation Procedure
Configuration to Use Custom Kubernetes API Server
To use Kubernetes API Server, you require to add the following to the cluster-agent-operator.yaml (for Kubernetes >=1.16) or cluster-agent-operator-openshift.yaml (OpenShift with Kubernetes >=1.16) spec :
- Update
configMapin thecluster-agent-operator.yamlfile with the Kubernetes API server details. These details are required:server: specify the URL of the Kubernetes API server.clusters.name: name of the cluster.users.name: name of the user who can access the Kubernetes API server.contexts.context: update the cluster name and user name to map the user details with the specific cluster.The following sample yaml file includes the required parameters:
Here,apiVersion: v1 kind: ConfigMap metadata: name: custom-kubeconfig namespace: appdynamics data: kubeconfig: | apiVersion: v1 clusters: - cluster: server: "https://kubernetes.default.svc" certificate-authority: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt name: psr-cluster contexts: - context: cluster: psr-cluster user: psr-user name: psr-context current-context: psr-context kind: Config preferences: {} users: - name: psr-user user: tokenFile: /var/run/secrets/kubernetes.io/serviceaccount/tokenhttps://kubernetes.default.svcis the URL of the API server. Under clusters,psr-clusteris the name of the cluster. Under users, psr-user is the user who can use the Kubernetes API server.
- Set the
USE_CUSTOM_KUBECONFIGenv variable totruein thecluster-agent-operator.yaml(for Kubernetes >=1.16) orcluster-agent-operator-openshift.yaml(OpenShift with Kubernetes >=1.16) file.- name: USE_CUSTOM_KUBECONFIG value: "true