Kubernetes does not support exposing a range of ports for the Proxy service. This prevents the Proxy service from allocating and using two ports for each Python Agent.

This page describes how to deploy Python Agent with shared Java proxy on Kubernetes. You can deploy the shared Java proxy using one of these methods: 

  • Expose a continuous range of ports in the proxy service for the proxy-agent communication

  • Run the proxy pod as a static pod with hostNetwork: true 

  • Applications that run with Python Agent must run in pods. You can scale the Python Agent pods up and down.

  • The proxy runs as a single, separate pod and is exposed to the Python Agents through a service. You should not scale or replicate the proxy pod.


Expose Continuous Range of Ports Manually in the Proxy Service 

To deploy the shared Java proxy manually:

  1. Expose a few ports (atleast two times the number of agents) using the YAML file in Kubernetes in the proxy service.
  2. Configure the Python Agent using either of these methods: 
    • Set the APPDYNAMICS_TCP_PORT_RANGE to the exposed port range to enable the proxy service to allocate ports to the Python Agent.
    • When the Python Agent selects request and report port, set the APPDYNAMICS_TCP_REQUEST_PORT and the APPDYNAMICS_TCP_REPORTING_PORT to a port in the exposed port range.

Run the Proxy Pod as a Static Pod 

You can run the TCP proxy pod as a static pod which makes it use the host network. The TCP proxy is bound to the host IP address and ports. 

To deploy the shared proxy by running the proxy pod:

  1. Set hostNetwork: true in the proxy pod.
  2. Set the APPDYNAMICS_TCP_COMM_HOST to the host IP address in the Python Agent pods.