8.2. Connectivity mapping using the roxctl netpol connectivity map command


Connectivity mapping provides details on the allowed connections between different workloads based on network policies defined in Kubernetes manifests. You can visualize and understand how different workloads in your Kubernetes environment are allowed to communicate with each other according to the network policies you set up.

To retrieve connectivity mapping information, the roxctl netpol connectivity map command requires a directory path. This directory must contain your Kubernetes network policy, ANP, and BANP manifests. The command’s output details the connectivity within the analyzed Kubernetes resources.

8.2.1. Retrieving connectivity mapping information from a Kubernetes manifest directory

Retrieve connectivity mapping information from a Kubernetes manifest directory by using the roxctl netpol connectivity map command.

Procedure

  1. To retrieve the connectivity mapping information, run the following command:

    roxctl netpol connectivity map <folder_path> [flags]

    where:

    <folder_path>
    Specifies the path to the folder, which can include sub-folders that contain YAML resources and network policies for analysis, for example, netpol-analysis-example-minimal/. The command scans the entire sub-folder tree. Optionally, you can also specify parameters to modify the behavior of the command.
    Expand
    표 8.2. Example output
    srcdstconn

    0.0.0.0-255.255.255.255

    default/frontend[Deployment]

    TCP 8080

    default/frontend[Deployment]

    0.0.0.0-255.255.255.255

    UDP 53

    default/frontend[Deployment]

    default/backend[Deployment]

    TCP 9090

    The output displays a table listing the allowed connectivity lines. Each line is composed of the following elements:

    src
    Represents the source endpoint.
    dst
    Represents the destination endpoint.
    conn
    Represents the permissible connectivity attributes.

    An endpoint follows the format namespace/name[Kind]. For example, default/backend[Deployment].

  2. Optional: To see which policies and rules are responsible for allowing or denying specific connections, you can use the --explain option with the roxctl netpol connectivity map command. You can use the output to debug network policy configurations. For more information about understanding the explanation output, see "Retriving explanations".

8.2.2. Connectivity map output formats and visualizations

You can use various output formats, including txt, md, csv, json, and dot. The dot format is ideal for visualizing the output as a connectivity graph. It can be viewed using graph visualization software such as Graphviz tool, and extensions to VSCode. You can convert the dot output to formats such as svg, jpeg, or png using Graphviz, whether it is installed locally or through an online viewer.

8.2.3. Generating svg graphs from the dot output using Graphviz

Follow these steps to create a graph in svg format from the dot output.

Prerequisites

  • Graphviz is installed on your local system.

Procedure

Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 문서 정보

Legal Notice

Theme

© 2026 Red Hat
맨 위로 이동