The .NET Core and Node.js applications support certificates signed by a certificate authority (CA) only. The applications do not support self-signed certificates. If your Controller is using a self-signed certificate, then only auto-instrumentation for Java applications is supported.

To support auto-instrumentation with an on-premises Controller, configure the Cluster Agent customSSLSecret property to set the SSL certificates that the Cluster Agent uses to communicate with the on-premises Controller. See Configure the Cluster Agent to Use SSL for On-Premises ControllersThe Cluster Agent copies the certificates to the auto-instrumented pods where they are used by App Server Agents to establish connections with the on-premises Controller.

Configuration for Node.js and an On-Premises Controller

In addition to configuring the Cluster Agent customSSLSecret property, you must perform these steps for auto-instrumented Node.js applications that use an on-premises Controller.

  1. Create a file named shim.js that sets the certificateFile property used by the Node.js Agent. See Node.js Settings Reference.

    require("appdynamics").profile({
      certificateFile: "/opt/appdynamics-nodejs/custom-ssl.pem"
    });
    JS
  2. Create a ConfigMap in the appdynamics namespace from the shim.js file:

    kubectl create cm nodejs-cert-configmap --from-file ./shim.js -n appdynamics
    BASH


  3. Edit the cluster-agent.yaml file to set the customAgentConfigSource/configMapName property to the name of the ConfigMap (nodejs-cert-configmap):

    apiVersion: cluster.appdynamics.com/v1alpha1
    kind: Clusteragent
    metadata:
      name: k8s-cluster-agent
      namespace: appdynamics
    spec:
      # content removed for brevity
      # ...
      instrumentationRules:
        - namespaceRegex: dev
          appName: MyNodeJSApp
          language: nodejs
          customAgentConfigSource:
            - configMapName: nodejs-cert-configmap
          imageInfo:
            image: "docker.io/appdynamics/nodejs-agent:20.12.0-10.0.0-alpine"
            agentMountPath: /opt/appdynamics
    YML
  4. Apply the updated Cluster Agent configuration:

    kubectl apply -f cluster-agent.yaml
    BASH

    The Cluster Agent updates the Node.js workload spec which recreates the pods and copies the certificate file to the pods. The certificate file is referenced by the Node.js Agent through the NODE_OPTIONS environment variable and shim.js file.