Creating a broker

    You can create a broker by using the CLI or by applying YAML files using kubectl.

    knkubectl

    1. You can create a broker in current namespace by entering the following command:

      Note

    2. Optional: Verify that the broker was created by listing existing brokers. Enter the following command:

      1. kn broker list

    The YAML in the following example creates a broker named default in the current namespace.

    1. Create a broker in the current namespace by creating a YAML file using the following template:

      1. kind: Broker
      2. name: <broker-name>
    2. Where is the name of the file you created in the previous step.

    3. Optional: Verify that the broker is working correctly, by entering the following command:

        This shows information about your broker. If the broker is working correctly, it shows a READY status of True:

        If the status is False, wait a few moments and then run the command again.