Create a topic.

Synopsis 🔗︎

Create a topic.

supertubes cluster topic create [flags]

Examples 🔗︎

# Create a Kafka topic from file in the 'my-cluster' Kafka cluster running in 'my-namespace' namespace
$ supertubes cluster topic create -n my-namespace --kafka-cluster my-cluster  -c <path-to-kubeconfig-file> -f my-kafka-topic.yaml

# Create a Kafka topic from sdtin in the 'my-cluster' Kafka cluster running in 'my-namespace' namespace
$ supertubes cluster topic create -n my-namespace --kafka-cluster my-cluster  -c <path-to-kubeconfig-file> -f - <<EOF
apiVersion: kafka.banzaicloud.io/v1alpha1
kind: KafkaTopic
metadata:
  name: example-topic-heredoc
  namespace: kafka
spec:
  clusterRef:
    name: kafka
  name: __exampleHeredoc
  partitions: 3
  replicationFactor: 2
EOF

Options 🔗︎

  -f, --file string            File containing the topic definition.
  -h, --help                   help for create
  -i, --interval int           Interval in seconds for polling the status of the operation. (default 5)
      --kafka-cluster string   Name of the Kafka cluster.
  -n, --namespace string       Namespace the Kafka cluster belongs to. (default "kafka")
  -t, --timeout int            Timeout in seconds to wait for the create topic operation to complete. (default 150)
  -w, --wait                   Wait for create topic operation to complete.

Options inherited from parent commands 🔗︎

      --accept-license                  Accept the license: https://banzaicloud.com/docs/supertubes/evaluation-license
      --color                           use colors on non-tty outputs (default true)
      --context string                  name of the kubeconfig context to use
      --formatting.force-color          force color even when non in a terminal
      --interactive                     ask questions interactively even if stdin or stdout is non-tty
  -c, --kubeconfig string               path to the kubeconfig file to use for CLI requests
      --non-interactive                 never ask questions interactively
  -o, --output string                   output format (table|yaml|json) (default "table")
      --persistent-config-file string   Supertubes persistent config file to use instead of the default at ~/.banzai/supertubes/
  -v, --verbose                         turn on debug logging

SEE ALSO 🔗︎