EXPAND ALL
  • Home

ip_to_pod_id

Converts the IP address into a kubernetes pod ID for that IP address if it exists, otherwise returns an empty string. Converting to a pod ID means you can then extract the corresponding service name using px.pod_id_to_service_name. Note that this will not be able to convert IP addresses into DNS names generally as this is limited to internal Kubernetes state.

Returns: STRING

The Kubernetes ID of the pod if it exists, otherwise an empty string.

Arguments

VariableTypeDescription
pod_ipSTRINGThe IP of a pod to convert.

Examples:

# Convert to the Kubernetes pod ID.
df.pod_id = px.ip_to_pod_id(df.remote_addr)
# Convert the ID to a readable name.
df.service = px.pod_id_to_service_name(df.pod_id)
This site uses cookies to provide you with a better user experience. By using Pixie, you consent to our use of cookies.