How To
Summary
Changing the cluster name and custom zone for the Instana agent in a Kubernetes environment.
Steps
It depends on how the Instana agent has been installed. Please see the 3 different sets of steps depending on the method of installation (Operator, Helm chart or DaemonSet).
(i) Operator
Edit the custom resource YAML file that was used for the installation of the agent with the new cluster name and the new custom zone and apply it by using kubectl apply -f <file name>.
Sample of the custom resource YAML file
Note: $ZONE_NAME, $CLUSTER_NAME, $AGENT_KEY, $ENDPOINT_HOST and $ENDPOINT_PORT should be replaces with actual values.
-----------------------------
apiVersion: instana.io/v1
kind: InstanaAgent
metadata:
name: instana-agent
namespace: instana-agent
spec:
zone:
name: $ZONE_NAME # (optional) name of the zone of the host
cluster:
name: $CLUSTER_NAME
agent:
key: $AGENT_KEY # replace with your Instana agent key
endpointHost: $ENDPOINT_HOST
endpointPort: $ENDPOINT_PORT
env: {}
configuration_yaml: |
# You can leave this empty, or use this to configure your instana agent.
# See https://docs.instana.io/setup_and_manage/host_agent/on/kubernetes/
-----------------------------
Note: $ZONE_NAME, $CLUSTER_NAME, $AGENT_KEY, $ENDPOINT_HOST and $ENDPOINT_PORT should be replaces with actual values.
-----------------------------
apiVersion: instana.io/v1
kind: InstanaAgent
metadata:
name: instana-agent
namespace: instana-agent
spec:
zone:
name: $ZONE_NAME # (optional) name of the zone of the host
cluster:
name: $CLUSTER_NAME
agent:
key: $AGENT_KEY # replace with your Instana agent key
endpointHost: $ENDPOINT_HOST
endpointPort: $ENDPOINT_PORT
env: {}
configuration_yaml: |
# You can leave this empty, or use this to configure your instana agent.
# See https://docs.instana.io/setup_and_manage/host_agent/on/kubernetes/
-----------------------------
(ii) Helm chart
Execute "helm upgrade" command with the new cluster name and the new custom zone.
Sample of the helm upgrade command
Note: $AGENT_KEY, $DOWNLOAD_KEY, $ENDPOINT_HOST, $ENDPOINT_PORT $CLUSTER_NAME and $ZONE_NAME should be replaces with actual values.
-----------------------------
helm upgrade instana-agent \
--repo https://agents.instana.io/helm \
--namespace instana-agent \
--create-namespace \
--set agent.key=$AGENT_KEY \
--set agent.downloadKey=$DOWNLOAD_KEY \
--set agent.endpointHost=$ENDPOINT_HOST \
--set agent.endpointPort=$ENDPOINT_PORT \
--set cluster.name=$CLUSTER_NAME \
--set zone.name=$ZONE_NAME \
instana-agent
-----------------------------
Note: $AGENT_KEY, $DOWNLOAD_KEY, $ENDPOINT_HOST, $ENDPOINT_PORT $CLUSTER_NAME and $ZONE_NAME should be replaces with actual values.
-----------------------------
helm upgrade instana-agent \
--repo https://agents.instana.io/helm \
--namespace instana-agent \
--create-namespace \
--set agent.key=$AGENT_KEY \
--set agent.downloadKey=$DOWNLOAD_KEY \
--set agent.endpointHost=$ENDPOINT_HOST \
--set agent.endpointPort=$ENDPOINT_PORT \
--set cluster.name=$CLUSTER_NAME \
--set zone.name=$ZONE_NAME \
instana-agent
-----------------------------
(iii) DaemonSet
You need to delete the agent and then install the agent with the new cluster name and the new custom zone.
Note: You will be able to see the Note after the step 5 in the following site. So you must delete the agent and then install the agent with the new deployment.yaml that has the new cluster name and the new custom zone.
Install as a DaemonSet
https://www.ibm.com/docs/en/instana-observability/current?topic=agents-installing-kubernetes#install-as-a-daemonset
-----------------------------
Note: If you make any more edits to the deployment.yaml file, you must recreate the DaemonSet. To apply changes, run the following commands:
------------------
kubectl delete -f deployment.yaml
kubectl apply -f deployment.yaml
------------------
https://www.ibm.com/docs/en/instana-observability/current?topic=agents-installing-kubernetes#install-as-a-daemonset
-----------------------------
Note: If you make any more edits to the deployment.yaml file, you must recreate the DaemonSet. To apply changes, run the following commands:
------------------
kubectl delete -f deployment.yaml
kubectl apply -f deployment.yaml
------------------
Related Information
Document Location
Worldwide
[{"Type":"MASTER","Line of Business":{"code":"LOB67","label":"IT Automation \u0026 App Modernization"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSE1JP5","label":"IBM Instana Observability Self-Hosted"},"ARM Category":[{"code":"a8m3p000000UoUHAA0","label":"Agent-\u003EReq - Install - Config"}],"ARM Case Number":"TS016704153","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]
Product Synonym
instana
Was this topic helpful?
Document Information
Modified date:
14 November 2024
UID
ibm17173707