이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 16. Exposing services on the application network using the CLI


After creating an application network by linking sites, you can expose services from one site using connectors and consume those services on other sites using listeners. A routing key is a string that matches one or more connectors with one or more listeners. For example, if you create a connector with the routing key backend, you need to create a listener with the routing key backend to consume that service.

This section assumes you have created and linked at least two sites.

16.1. Creating a connector using the CLI

A connector binds a local workload to listeners in remote sites. Listeners and connectors are matched using routing keys.

For more information about connectors see Connector concept

Prerequisites

  • The skupper CLI is installed.
  • The SKUPPER_PLATFORM environment variable is set to one of * podman,docker or linux.

Procedure

  1. Create a server that you want to expose on the network. For example, run a HTTP server on port 8080.
  2. Create a connector:

    skupper connector create <name> <port> [--routing-key <name>]
    Copy to Clipboard Toggle word wrap

    For example:

    skupper connector create my-server 8080 --host localhost
    Copy to Clipboard Toggle word wrap
  3. Check the connector status:

    skupper connector status
    Copy to Clipboard Toggle word wrap

    For example:

    $ skupper connector status
    NAME		STATUS	ROUTING-KEY	HOST		PORT
    my-server	Ok	my-server	localhost	8081
    Copy to Clipboard Toggle word wrap

    📌 NOTE By default, the routing key name is set to the name of the connector. If you want to use a custom routing key, set the --routing-key to your custom name.

    Apply the configuration using:

    skupper system reload
    Copy to Clipboard Toggle word wrap

There are many options to consider when creating connectors using the CLI, see CLI Reference, including frequently used options.

16.2. Creating a listener using the CLI

A listener binds a local connection endpoint to connectors in remote sites. Listeners and connectors are matched using routing keys.

Prerequisites

  • The skupper CLI is installed.
  • The SKUPPER_PLATFORM environment variable is set to one of * podman,docker or linux.

Procedure

  1. Identify a connector that you want to use. Note the routing key of that connector.
  2. Create a listener:

    skupper connector create <name> <port> [--routing-key <name>]
    Copy to Clipboard Toggle word wrap

    For example:

    $ skupper listener create my-server 8080
    File written to /home/user/.local/share/skupper/namespaces/default/input/resources/Listener-backend.yaml
    Copy to Clipboard Toggle word wrap

    Apply the configuration using:

    skupper system reload
    Copy to Clipboard Toggle word wrap
  3. Check the listener status:

    skupper listener status
    Copy to Clipboard Toggle word wrap

    For example:

    $ skupper listener status
    NAME		STATUS	ROUTING-KEY	HOST		PORT
    my-server	Ok	my-server	localhost	8081
    Copy to Clipboard Toggle word wrap

    📌 NOTE There must be a matching connector for the service to operate. By default, the routing key name is the listener name. If you want to use a custom routing key, set the --routing-key to your custom name.

There are many options to consider when creating connectors using the CLI, see CLI Reference, including frequently used options.

맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

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

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

Red Hat 소개

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

Theme

© 2025 Red Hat