Installing the agent on Red Hat OpenShift
You can install the Instana agent on a Red Hat OpenShift cluster by using different methods depending on your requirements. See the following list to check the prerequisite conditions, learn about all the available installation methods, and install the agent on Red Hat OpenShift:
Prerequisites
Before you install the agent, ensure that the prerequisites are met.
Choosing how you want to install the agent
You can install the Instana agent on a Red Hat OpenShift cluster by using the following methods:
- Instana agent operator (online)
- Instana agent operator (air-gapped)
- Helm chart (online)
- Helm chart (air-gapped)
To install the agent on Red Hat OpenShift on IBM Z or LinuxONE platform, use Helm chart (online).
Installing by using the operator
To install the Instana agent on Red Hat OpenShift by using the operator, complete the following steps:
-
Complete the prerequisite steps before you proceed with installing the operator.
-
Install the operator by using one of the following methods:
-
Install the operator by using Operator Lifecycle Manager (OLM) (preferred for Red Hat OpenShift).
-
Installing the operator by using OLM
To install the Instana agent on Red Hat OpenShift by using OLM, complete the following steps:
-
Install the Instana agent operator from OperatorHub.io or the Red Hat OpenShift catalog of Containerized applications.
-
If you don't already have a target namespace, create a namespace where the Instana agent must be installed. For example, you can create a namespace
instana-agentto run the operator. The agent does not need to run in the same namespace as the operator. -
Follow Step 2 to Step 6 in the Installing the operator manually section to create the custom resource for the agent and apply the custom resource. The operator picks up the configuration from the custom resource and deploys the Instana agent.
Installing the operator manually
To install the operator manually on Red Hat OpenShift, complete the following steps:
-
On the home page of the Instana UI, click Agents & collectors. On the Instana agents tab, select Install agents.
-
On the agent deployment catalog page, click the tile OpenShift - Operator.
-
Deploy the latest operator version by using the following command:
kubectl apply -f https://github.com/instana/instana-agent-operator/releases/latest/download/instana-agent-operator.yamlAfter you run this command, the operator is up and running in the namespace that you created, and waiting for the
instana-agentcustom resource to be created. -
Enter the cluster name and (optionally) the agent zone that you want the cluster to be part of.
The cluster name (<your_cluster_name>) is the customized name of the cluster that is monitored by this DaemonSet.
The agent zone (<your_zone_name>) is used to customize the zone grouping, which is displayed on the infrastructure map.
-
Create a custom resource YAML file by copying the YAML template provided in the Instana UI.
The YAML template is pre-filled with your agent key, host agent endpoint, cluster name, and agent zone.
-
Edit the custom resource YAML file. For an example of the YAML file, see instana_v1_extended_instanaagent.yaml.
-
The Instana agent custom resource supports the exact same configuration as the Instana Helm chart. For a detailed list of all the configuration parameters and examples, see Instana Helm chart.
Also see the following topics:
-
If you want to install the agent in a self-hosted environment, and the agent key does not have authority to download from the Instana public artifactory, add the download key as
downloadKey: <your_download_key>. For example:
agent: key: wPYpH7EGK0ucLaO0Nu7BYw downloadKey: m007YDoWNload6kE42yukg endpointHost: ...-
If you want to add TLS encryption for the agent endpoint, use an existing secret or use a certificate and private key:
Using existing secret
You can use an existing secret of the type
kubernetes.io/tlsfor TLS encryption. But theagent.tls.secretNamemust be provided in the custom resource YAML file.Use a certificate and private key
Instead of an existing secret, a certificate and a private key can be used. The certificate and private key must be base64-encoded.
To use this variant, add the following two parameters to the custom resource YAML file:
-
agent.tls.certificate -
agent.tls.key
Note:Ifagent.tls.secretNameis set, thenagent.tls.certificateandagent.tls.keyare ignored. -
-
Optional: You can replace the following values:
-
agent.env: Use this field to specify environment variables for the agent, such as the proxy configuration for the agent. For more possible environment values, see agent configuration. See the following example:spec: agent: env: INSTANA_AGENT_TAGS: staging -
agent.configuration_yaml: Use this field to specify an agent configuration file configuration.yaml. See the following example:spec: agent: configuration_yaml: | # Example of configuration yaml template # Host com.instana.plugin.host: tags: - 'dev' - 'app1'For more information, see Configuring host agents by using the agent configuration file.
-
-
If you want to deploy the static agent, configure the custom resource YAML file with the static agent image. To list the static agent image, set
agent.image.nametocontainers.instana.io/instana/release/agent/static. See the following example:spec: agent: image: name: containers.instana.io/instana/release/agent/static
-
-
Apply the custom resource YAML file:
kubectl apply -f instana-agent.customresource.yamlwhere
instana-agent.customresource.yamlis the name of your custom resource YAML file.The operator picks up the configuration from the custom resource YAML file and deploys the Instana agent.
Now the agent is installed. For what you can do after the installation, go to the What to do next section.
To update the agent, see Updating an operator installation.
Installing by using the operator in an air-gapped environment
In a fully air-gapped environment, the cluster nodes cannot pull images directly from icr.io or containers.instana.io. Use a jump host (bastion) with internet access to copy all required images to a private registry that the cluster can access. Then, deploy the operator from the mirrored images.
The steps in this section use a private namespace in IBM Cloud Container Registry (ICR) as the target registry. Any OCI-compliant registry that is reachable from the jump host and from the target cluster works equally well, for example JFrog Artifactory, Red Hat Quay, Harbor, or a self-hosted Distribution registry. If you use a registry other than ICR, skip the ICR-specific steps and substitute your own registry URL and authentication credentials wherever icr.io appears.
[internet] ──pull──▶ jump host ──push──▶ <private-registry>/instana-airgap-mirror ◀──pull── OCP cluster
(skopeo)
The scripts/mirror-instana-images.sh script handles mirroring all three components in one invocation:
| Component | Source image |
|---|---|
| Operator | icr.io/instana/instana-agent-operator:latest |
| Agent (static) | containers.instana.io/instana/release/agent/static:latest |
| Kubernetes sensor | icr.io/instana/k8sensor:latest |
Prerequisites for air-gapped operator installation
Install the following tools on the jump host before you proceed:
| Tool | Purpose | Install guide |
|---|---|---|
skopeo |
Copy container images between registries without a Docker daemon | dnf install skopeo and brew install skopeo |
jq |
Parse image metadata JSON returned by skopeo inspect |
dnf install jq and brew install jq |
oc |
OpenShift CLI | Distributed with OpenShift |
ibmcloud CLI + Container Registry plug-in |
Create and authenticate with the ICR namespace | ibmcloud plugin install container-registry |
ibmcloud CLI is only required when ICR is used as the target registry. Skip it if you are using a different registry such as Artifactory, Quay, or Harbor.skopeo --version
jq --version
oc version --client
Installation
To install the agent by using the operator in an air-gapped environment, complete the following steps:
- Prepare your private registry and authenticate skopeo to it.
Note:If you are using ICR, complete the following steps. If you are using a different registry (Artifactory, Quay, Harbor, or Distribution), create the equivalent target repository, authenticate skopeo with your registry's credentials, and then continue with step 2.
- Log in to IBM Cloud and create a dedicated namespace for the mirrored images:
ibmcloud login --sso ibmcloud cr region-set global ibmcloud cr namespace-add instana-airgap-mirror - Create a dedicated IAM API key for non-interactive registry access:
ibmcloud iam api-key-create instana-mirror-key -d "skopeo mirror key" - Export the key without echoing it to the terminal, and verify that the login works:
read -rs ICR_API_KEY skopeo login --username iamapikey --password "$ICR_API_KEY" icr.ioNote:If a previousibmcloud cr loginwrote anidentitytokenfield into~/.docker/config.jsonthat skopeo cannot overwrite, open the file, delete theicr.ioentry, save it, and retryskopeo login.
- Log in to IBM Cloud and create a dedicated namespace for the mirrored images:
-
Obtain an Instana agent download key.
The static agent image lives on
containers.instana.io, which requires an agent download key. Retrieve it from the Instana UI Settings → Agents → Install Agent, or ask your Instana account team. Store it without echoing:read -rs INSTANA_AGENT_DOWNLOAD_KEY - Mirror the images to the private registry by running the mirror script from the jump host. The script resolves the current
:latestversion for each image, copies both the:latesttag and the versioned tag to the destination, and writes a properties file with all resolved coordinates../scripts/mirror-instana-images.sh \ --registry icr.io \ --namespace instana-airgap-mirror \ --dest-creds "iamapikey:$ICR_API_KEY" \ --dest-tls-verify true \ --agent-download-key "$INSTANA_AGENT_DOWNLOAD_KEY"The script produces a
mirror-instana-images.propertiesfile that contains the exact image coordinates resolved during mirroring. For example:operator_version=2.2.14 operator_destination=icr.io/instana-airgap-mirror/instana-agent-operator agent_version=1.320.3 agent_destination=icr.io/instana-airgap-mirror/agent k8sensor_version=1.4.16 k8sensor_destination=icr.io/instana-airgap-mirror/k8sensorNote:Store this file alongside your deployment manifests. The image coordinates it contains are used to configure theInstanaAgentcustom resource in a later step. - Confirm that all three repositories are present in the registry and have the expected tags. For ICR, run the following command:
ibmcloud cr images --restrict instana-airgap-mirror - Create the target namespace and grant the service accounts the required Security Context Constraints (SCCs). The agent pod runs privileged (host network and host PID), and the remote-agent service account needs
anyuidfor its init container.INSTANA_AGENT_NAMESPACE=instana-agent oc new-project ${INSTANA_AGENT_NAMESPACE} oc adm policy add-scc-to-user privileged -z instana-agent -n "${INSTANA_AGENT_NAMESPACE}" oc adm policy add-scc-to-user anyuid -z instana-agent-remote -n "${INSTANA_AGENT_NAMESPACE}" - Create a Kubernetes pull secret with the registry credentials, then pre-create the operator service account and link the secret to it before you deploy. Pre-create the service account. If you do not, the operator manifest creates it in the next step, which causes an
ImagePullBackOfferror on first startup.oc create secret docker-registry icr-pull-secret \ --docker-server=icr.io \ --docker-username=iamapikey \ --docker-password="$ICR_API_KEY" \ -n instana-agent oc create serviceaccount instana-agent-operator -n instana-agent oc secrets link instana-agent-operator icr-pull-secret --for=pull -n instana-agent - Download the latest release manifest and replace the upstream operator image reference with the mirrored one:
curl -fsSL \ https://github.com/instana/instana-agent-operator/releases/latest/download/instana-agent-operator.yaml \ -o instana-agent-operator.yaml sed 's|image: icr.io/instana/instana-agent-operator:|image: icr.io/instana-airgap-mirror/instana-agent-operator:|g' \ instana-agent-operator.yaml > instana-agent-operator-mirrored.yamlNote:Only the operator image line is replaced here. TheInstanaAgentcustom resource that references the agent and k8sensor images is configured separately in a later step. - Apply the patched manifest and wait for the rollout to complete:
oc apply -f instana-agent-operator-mirrored.yaml oc rollout status deployment/instana-agent-controller-manager \ -n instana-agent --timeout=120s - Pre-create the agent service accounts and link the pull secret to each one. The operator creates
instana-agentandinstana-agent-k8sensorwhen you first apply theInstanaAgentcustom resource, but OpenShift does not propagate pull secrets from thedefaultservice account to pods running under these operator-managed accounts. If you pre-create them, you avoid anErrImagePullerror on first pod scheduling.oc create serviceaccount instana-agent -n instana-agent oc create serviceaccount instana-agent-k8sensor -n instana-agent oc secrets link instana-agent icr-pull-secret --for=pull -n instana-agent oc secrets link instana-agent-k8sensor icr-pull-secret --for=pull -n instana-agentNote:If you already applied the custom resource and pods are inErrImagePull, the service accounts exist, but the secret is not linked yet. Run the preceding twooc secrets linkcommands and then delete the failing pods, so they are rescheduled. - Create the
InstanaAgentcustom resource manifest. Replace the placeholder values with your actual configuration:- Replace
<INSTANA_AGENT_KEY>and<INSTANA_AGENT_DOWNLOAD_KEY>with the keys from the Instana UI Agents & Collectors → Install Agents → OpenShift Operator. - Substitute the image tags with the versions from
mirror-instana-images.properties. - Update the proxy fields to match your environment.
- Set
proxyUserandproxyPasswordto empty strings if no proxy authentication is required.
apiVersion: instana.io/v1 kind: InstanaAgent metadata: name: instana-agent namespace: instana-agent spec: zone: name: <your_zone_name> cluster: name: <your_cluster_name> agent: key: <INSTANA_AGENT_KEY> downloadKey: <INSTANA_AGENT_DOWNLOAD_KEY> endpointHost: <your-ingress-endpoint> endpointPort: "443" proxyHost: <proxy-host> proxyPort: "3128" proxyProtocol: http proxyUser: "" proxyPassword: "" image: name: icr.io/instana-airgap-mirror/agent tag: "<agent_version>" # value of agent_version in mirror-instana-images.properties 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/ k8s_sensor: image: name: icr.io/instana-airgap-mirror/k8sensor tag: "<k8sensor_version>" # value of k8sensor_version in mirror-instana-images.propertiesNote:NopullSecretsfield is required in the custom resource because you provided image pull credentials by patchingicr-pull-secretonto the service accounts in the previous step. - Replace
- Apply the custom resource:
oc apply -f instana-agent-cr.yaml - Verify the deployment by listing the pods in the
instana-agentnamespace:oc get pods -n instana-agentWhen the deployment is complete, you see one
instana-agent-controller-managerpod, oneinstana-agentDaemonSet pod per node, and threeinstana-agent-k8sensorpods, all inRunningstatus. Once the backend connection is established through the configured proxy, the cluster appears in the Instana UI under the configured zone and cluster name.
The agent is installed. For more information about the next steps, see the What to do next section.
Installing by using the Helm chart
You can use the Helm chart to install the agent. The Helm chart adds the Instana agent to all nodes that can be scheduled in your cluster by using a DaemonSet.
To install the Instana agent by using Helm chart, you must first install or upgrade to Helm version 3.
The Instana agent Helm chart supports Red Hat OpenShift 4.x.
To install the Instana agent on Red Hat OpenShift by using the Helm chart, complete the following steps:
-
On the home page of the Instana UI, click Agents & collectors. On the Instana Agents tab, select Install agents.
-
On the agent deployment catalog page, click the tile OpenShift - Helm chart.
-
Enter the cluster name and (optionally) the agent zone that you want the cluster to be part of.
The cluster name (
<your_cluster_name>) is the customized name of the cluster that is monitored by this DaemonSet.The agent zone (
<your_zone_name>) is used to customize the zone grouping displayed on the infrastructure map.The agent deployment code is updated with the values that you provide. All the other required parameters are pre-populated in the agent deployment code, which looks like the following example:
INSTANA_AGENT_NAMESPACE=instana-agent oc login -u system:admin oc new-project ${INSTANA_AGENT_NAMESPACE} oc adm policy add-scc-to-user privileged -z instana-agent -n "${INSTANA_AGENT_NAMESPACE}" oc adm policy add-scc-to-user anyuid -z instana-agent-remote -n "${INSTANA_AGENT_NAMESPACE}" helm install instana-agent \ --repo https://agents.instana.io/helm \ --namespace ${INSTANA_AGENT_NAMESPACE} \ --set agent.key='<your_agent_key>' \ --set agent.endpointHost='<your_host_agent_endpoint>' \ --set agent.endpointPort=443 \ --set cluster.name='<your_cluster_name>' \ --set zone.name='<your_zone_name>' \ instana-agent -
When you install the Instana agent on IBM Z or LinuxONE, configure distinct zones during the installation process. This separation is important because both the Instana agent and the application workloads it monitors is within the same cluster.
Unlike other environments where Instana and the monitored applications are deployed separately, IBM Z or LinuxONE setups share the same cluster. It makes isolating zones essential. To isolate zones, ensure that the nodes where Instana is installed are properly labeled and tainted.
If the label used is
node-role.kubernetes.io/monitor=true. To verify that the Instana nodes are labelled correctly, run the following command:kubectl get nodes -l node-role.kubernetes.io/monitor=trueTo verify that the Instana nodes are tainted as expected with the sample taint
node.instana.io/monitor=true, run the following command:kubectl get nodes -o=jsonpath='{range .items[*]}{.metadata.name}{"\t"}{range .spec.taints[*]}{.key}{"="}{.value}{"\t"}{end}{"\n"}{end}' | grep 'node\.instana\.io/monitor'After verifying Instana nodes are labelled and tainted, you can follow these steps:
-
Label application worklad nodes Ensure that the nodes running application workloads are appropriately labeled to differentiate them from infrastructure nodes.
NODE=<your node name> CLUSTER=<your cluster name> oc label node worker${NODE}.${CLUSTER_NAME} workload="true" -
Define Two Zones
- Set the Instana nodes to the
INFRASTRUCTUREmode. - Set the application workload nodes to the
APMmode. - Create a YAML file
agent_values.yamland speify the zones along with their affinity and tolerations in the file.
zones: - name: workloads mode: APM affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: workload operator: Exists - name: instana-nodes mode: INFRASTRUCTURE tolerations: - key: node.instana.io/monitor operator: Equal effect: NoSchedule value: "true" affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: node-role.kubernetes.io/monitor operator: In values: - "true"In this sample YAML file, it is assumed that the Instana nodes are labeled with
node-role.kubernetes.io/monitor=trueand tainted with key:node.instana.io/monitor=true. Update these values according to your own node labeling and tainting conventions.Append your custom yaml file at the end of agent deployment code as shown in the following example:
INSTANA_AGENT_NAMESPACE=instana-agent oc login -u system:admin oc new-project ${INSTANA_AGENT_NAMESPACE} oc adm policy add-scc-to-user privileged -z instana-agent -n "${INSTANA_AGENT_NAMESPACE}" oc adm policy add-scc-to-user anyuid -z instana-agent-remote -n "${INSTANA_AGENT_NAMESPACE}" helm install instana-agent \ --repo https://agents.instana.io/helm \ --namespace ${INSTANA_AGENT_NAMESPACE} \ --set agent.key='<your_agent_key>' \ --set agent.endpointHost='<your_host_agent_endpoint>' \ --set agent.endpointPort=443 \ --set cluster.name='<your_cluster_name>' \ --set zone.name='<your_zone_name>' \ instana-agent -f agent_values.yaml - Set the Instana nodes to the
-
-
Edit the agent deployment code.
-
To configure the installation, you can specify the values on the command line by using the
--setflag or provide a YAML file with your values by using the-fflag. For a detailed list of all the configuration parameters and examples, see Instana Helm chart. Also, see the following topics: -
Optional: To deploy the static agent, set the flag
--set agent.image.name=containers.instana.io/instana/release/agent/static. -
The Kubernetes service that is created by default exposes the following items to the cluster:
- OpenTelemetry endpoint for
otlpingestion over gRPC - the implementation of Prometheus'
remote_writeAPI - Trace Web SDK
- other Agent APIs.
- OpenTelemetry endpoint for
-
Optional: If you want to add TLS encryption for the agent endpoint, use an existing secret or use a certificate and private key:
-
Using existing secret of type
kubernetes.io/tlsYou can use an existing secret of the type
kubernetes.io/tlsfor TLS encryption. But you must specify thesecretNamewith--set 'agent.tls.secretName=<YOUR_SECRET_NAME>'during the installation. The files from the provided secret is then included in the agent. -
Use a certificate and private key
The certificate and private key must be base64-encoded. To use this variant, run helm install with the following extra parameters:
--set 'agent.tls.certificate=<YOUR_CERTIFICATE_BASE64_ENCODED>' --set 'agent.tls.key=<YOUR_PRIVATE_KEY_BASE64_ENCODED>'Note:If agent.tls.secretName is set, then agent.tls.certificate and agent.tls.key are ignored.
-
-
-
Copy and then run the agent deployment code.
Now the agent is installed. For what you can do after the installation, go to the What to do next section.
To update the agent, see Updating an operator installation.
Installing by using Helm chart in an air-gapped environment
Red Hat OpenShift provides an internal container registry that you can use in air-gapped environments to store images to run workloads in the cluster.
Make sure that you install the following software before installing the agent:
- OpenShift CLI (oc)
- jq
- skopeo
To install the Instana agent by using Helm chart in an air-gapped environment, complete the following steps:
-
Log in to the Red Hat OpenShift cluster as administrator by running the following command:
oc login --server=https://api.myopenshiftcluster.com:6443 -u kubeadmin -p $OPENSHIFT_PASSWORD -
Expose the internal container registry to be accessible from your jump host:
oc patch configs.imageregistry.operator.openshift.io/cluster --type merge -p '{"spec":{"defaultRoute":true}}' -
Retrieve the hostname that is used to access the registry externally:
HOST=$(oc get route default-route -n openshift-image-registry --template='{{ .spec.host }}') -
Create a project 'instana' (if it is not created earlier) in the Red hat OpenShift cluster to enable pushing images to the specified namespace:
oc get project instana || oc new-project instana -
Display the registry host information:
echo "${HOST}" # default-route-openshift-image-registry.apps.myopenshiftcluster.com -
Obtain the certificate of the trusted ingress operator and add it in the certificate authority (CA) directory of the system:
oc extract secret/$(oc get ingresscontroller -n openshift-ingress-operator default -o json | jq '.spec.defaultCertificate.name // "router-certs-default"' -r) -n openshift-ingress --confirmFailing this step might result in certificate warnings (for example,
tls: failed to verify certificate: x509: certificate signed by unknown authority) when you try to push the image to the target registry. -
Import the CA into the system's trusted certificate authority store by using the following commands:
sudo mv tls.crt /etc/pki/ca-trust/source/anchors/ sudo update-ca-trust -
Log in to both the source and destination registries by using Skopeo:
skopeo login -u kubeadmin -p $(oc whoami -t) $HOST skopeo login -u _ -p $AGENT_DOWNLOAD_KEY containers.instana.io -
Determine the latest versions available for each component:
LATEST_OPERATOR_VERSION=$(skopeo inspect docker://icr.io/instana/instana-agent-operator:latest | jq -r ".Labels.version") LATEST_AGENT_VERSION=$(skopeo inspect docker://containers.instana.io/instana/release/agent/static:latest | jq -r ".Labels.version") LATEST_K8S_SENSOR_VERSION=$(skopeo inspect docker://icr.io/instana/k8sensor:latest | jq -r '.Labels["org.opencontainers.image.revision"]') -
Copy the required components to the local registry:
skopeo copy docker://icr.io/instana/instana-agent-operator:latest "docker://${HOST}/instana/instana-agent-operator:${LATEST_OPERATOR_VERSION}" skopeo copy docker://containers.instana.io/instana/release/agent/static:latest "docker://${HOST}/instana/instana-agent-static:${LATEST_AGENT_VERSION}" skopeo copy docker://icr.io/instana/k8sensor:latest "docker://${HOST}/instana/k8sensor:${LATEST_K8S_SENSOR_VERSION}"
Deploying the agent Helm chart
To fetch the Helm chart, complete the following steps:
-
Create a new namespace for the agent deployment:
INSTANA_AGENT_NAMESPACE=instana-agent oc new-project ${INSTANA_AGENT_NAMESPACE} -
Fetch the Helm chart on the jump host:
helm pull instana-agent --repo https://agents.instana.io/helm --untarIf you're performing an upgrade instead of an initial installation, manually apply the CRDs (Custom Resource Definitions) from the
crdsfolder that is located within the extracted Helm chart directory:oc apply -f instana-agent/crds/ -
Create a new file
custom-values.yamlto overwrite the default image references with those specific to your air-gapped environment:Note:Note: When you deploy the Helm chart to the OCP cluster, you can use the internal registry URLs. image-registry.openshift-image-registry.svc:5000/instana/instana-agent-operator:${LATEST_OPERATOR_VERSION} image-registry.openshift-image-registry.svc:5000/instana/instana-agent-static:${LATEST_AGENT_VERSION} image-registry.openshift-image-registry.svc:5000/instana/k8sensor:${LATEST_K8S_SENSOR_VERSION}See the following sample
custom-values.yamlfile:cluster: name: demo-cluster zone: name: airgapped-demo agent: endpointHost: ingress-red-saas.instana.io endpointPort: 443 key: xxx image: name: image-registry.openshift-image-registry.svc:5000/instana/instana-agent-static tag: 1.290.20 configuration_yaml: | # Manual a-priori configuration. Configuration will be only used when the sensor # is actually installed by the agent. # Host #com.instana.plugin.host: # tags: # - 'dev' # - 'app1' k8s_sensor: image: name: image-registry.openshift-image-registry.svc:5000/instana/k8sensor tag: b4eac7d controllerManager: image: name: image-registry.openshift-image-registry.svc:5000/instana/instana-agent-operator tag: v2.1.20 -
Grant the necessary permissions to the 'instana-agent' user or group to run the agent DaemonSet and remote agent Deployment:
oc adm policy add-scc-to-user privileged -z instana-agent -n ${INSTANA_AGENT_NAMESPACE} oc adm policy add-scc-to-user anyuid -z instana-agent-remote -n ${INSTANA_AGENT_NAMESPACE} -
Adjust the pull policy to enable all service accounts within the 'instana-agent' namespace to access images from the 'instana' namespace:
oc policy add-role-to-group system:image-puller system:serviceaccounts:instana-agent -n instana -
Deploy the Helm chart that is located in the './instana-agent' directory into the newly created 'instana-agent' namespace by using the following commands:
helm install instana-agent \ --namespace ${INSTANA_AGENT_NAMESPACE} \ -f custom-values.yaml \ ./instana-agent
Validating the deployment
To validate the private images that are deployed to the cluster, complete the following steps:
-
List all pods in the
instana-agentnamespace by running the following command:oc get pods -n instana-agentSee the following sample response:
NAME READY STATUS RESTARTS AGE instana-agent-6275r 1/1 Running 0 2m52s instana-agent-controller-manager-5c9bd89b7c-697mf 1/1 Running 0 3m instana-agent-k8sensor-5466f8cb4d-9j7p2 1/1 Running 0 2m52s instana-agent-k8sensor-5466f8cb4d-fdwsj 1/1 Running 0 2m52s instana-agent-k8sensor-5466f8cb4d-jstc4 1/1 Running 0 2m52s instana-agent-sjmtc 1/1 Running 0 2m52s instana-agent-z5plx 1/1 Running 0 2m52sMake sure that three
k8sensorpods, and oneinstana-agent-controller-managerpod, and oneinstana-agentpod per each worker node are running. -
Validate the images by running the following command:
oc get ds,deployment -o yaml | grep "image:"See the following sample response:
image: image-registry.openshift-image-registry.svc:5000/instana/instana-agent-static:1.290.20 image: image-registry.openshift-image-registry.svc:5000/instana/instana-agent-operator:v2.1.20 image: image-registry.openshift-image-registry.svc:5000/instana/k8sensor:b4eac7d
Now the agent is installed. For what you can do after the installation, see the What to do next section.
For more information about the agent endpoints, see Host Agent Configuration.