On this page:
You can use Network Visibility to monitor applications running on Kubernetes. Network Visibility isolates an application's network issues from its application issues. It monitors an application's network interactions and reports key performance metrics in the context of application performance monitoring.
How It Works
To monitor the communication between pods and between nodes, the agent opens up a TCP port in each node for app containers to communicate with the Network DaemonSet container using a REST API. The agent is deployed as a DaemonSet in each node that has host mode enabled. Follow the steps on this page to create a Docker image for the DaemonSet and configure the agent.
Before You Begin
- Ensure that you have at least one pod with a Java Agent (version 4.4 or higher) deployed to the same cluster as the Network Agent.
Ensure that TCP port 3892 is not already used by the node. Port 3892 will be used by the application pods to communicate with the DaemonSet.
Creating a Docker Image
To deploy Network Visibility with Kubernetes, you must first create a Docker image for the Network Visibility DaemonSet and push the image to your Docker Trusted Registry.
Paste the sample Dockerfile below into a text file and save the file.
Navigate to the directory where you saved the Dockerfile. Build the Docker image by running the following command:
Push the Docker image to your Docker Trusted Registry.
Configuring Network Visibility with Kubernetes
Paste the configuration below into a yaml file. This configuration file is used for deploying the Network Visibility agent.
- In the configuration file, update these fields:
- image (under containers): The file path to the DaemonSet image in your Docker Trusted Registry.
- name (under imagePullSecrets): The key for your Docker Trusted Registry.
Deploy the Network Visibility agent for Kubernetes by running the following command:
$ kubectl apply -f MyConfigFile.yaml
Configure Network Visibility to Monitor Application Pods
After installing Network Visibility for Kubernetes, you'll need to correlate Network Visibility with a Java agent. This allows you to map network metrics to application flows. To do this, deploy at least one pod with a Java Agent (version 4.4 or higher) to the same cluster as the Network Agent.
Open the application's deployment configuration yaml file with Kubernetes in a text editor and set the APPDYNAMICS_NETVIZ_AGENT_HOST and APPDYNAMICS_NETVIZ_AGENT_PORT values, as shown:
If you are using an app agent that is 4.5.2 or older, you must open the <app-agent-install-dir>/<version-number>/external-services/netviz/netviz-service.properties file to set these values.
- In the Controller UI, enable socket instrumentation so that you can to map network metrics to application flows. For instructions on enabling socket instrumentation, see Set Up the Network and App Agents.