Skip to content

Commit

Permalink
Add usage and basic command options
Browse files Browse the repository at this point in the history
  • Loading branch information
nathancoleman committed Aug 9, 2023
1 parent 8b1398a commit 47b9c12
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion website/content/commands/services/export.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,33 @@ description: |
The `consul services export` command exports a service from one peer or admin partition to another.
---

# Consul Agent Service Export
# Consul Services Export

Command: `consul services export`

The services export subcommand is used to export a service from one admin partition
or cluster peer to another.

```text
Usage: consul services export [options] -name <service name> -consumer-peers <other cluster name>
Export a service to a peered cluster.
$ consul services export -name=web -consumer-peers=other-cluster
Use the -consumer-partitions flag instead of -consumer-peers to export to a different partition in the same cluster.
$ consul services export -name=web -consumer-partitions=other-partition
Additional flags and more advanced use cases are detailed below.
```

#### Command Options

- `-name` - (Required) The name of the service to export.

- `-consumer-peers` - (Required) A comma-separated list of cluster peers to export the service to.
In Consul Enterprise, this flag is optional if -consumer-partitions is specified.

- `-consumer-partitions` - (Enterprise only) A comma-separated list of admin partitions within the
same datacenter to export the service to. This flag is optional if -consumer-peers is specified.

0 comments on commit 47b9c12

Please sign in to comment.