Adding a listener to a load balancer

    To add a listener to a network load balancer:

    1. Open the Load Balancer section in the folder where you want to add a new listener to the load balancer.
    2. Click image in the line of the load balancer to add a listener for.
    3. In the menu that opens, click Add listener.
    4. Enter a port for the listener.
    5. Click Add.

    If you don't have the Yandex.Cloud command line interface yet, install it.

    The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name or --folder-id parameter.

    To add a listener to a load balancer:

    1. Get the list of load balancers:

      $ yc load-balancer network-load-balancer list
      +----------------------+--------------------+-------------+----------+----------------+------------------------+----------+
      |          ID          |        NAME        |  REGION ID  |   TYPE   | LISTENER COUNT | ATTACHED TARGET GROUPS |  STATUS  |
      +----------------------+--------------------+-------------+----------+----------------+------------------------+----------+
      | c58r8boim8qfkcqtuioj | test-load-balancer | ru-central1 | EXTERNAL |              0 |                        | INACTIVE |
      +----------------------+--------------------+-------------+----------+----------------+------------------------+----------+
      
    2. Add the listener by entering the name, port, and IP address version:

      $ yc load-balancer network-load-balancer add-listener c580id04kvumgn7ssfh1 \
           --listener name=test-listener,port=80,external-ip-version=ipv4
      .....done
      id: c58r8boim8qfkcqtuioj
      folder_id: aoerb349v3h4bupphtaf
      created_at: "2019-04-01T09:29:25Z"
      name: test-load-balancer
      region_id: ru-central1
      status: INACTIVE
      type: EXTERNAL
      listeners:
      - name: test-listener
        address: <listener IP address>
        port: "80"
        protocol: TCP
      

    You can add a listener using the addListener API method.