mirror of
https://github.com/status-im/consul.git
synced 2025-01-11 14:24:39 +00:00
Add docs for expose command
This commit is contained in:
parent
b874c8ef0c
commit
ada9e2b3ab
@ -61,7 +61,7 @@ export default [
|
|||||||
'agent',
|
'agent',
|
||||||
{ category: 'catalog', content: ['datacenters', 'nodes', 'services'] },
|
{ category: 'catalog', content: ['datacenters', 'nodes', 'services'] },
|
||||||
{ category: 'config', content: ['delete', 'list', 'read', 'write'] },
|
{ category: 'config', content: ['delete', 'list', 'read', 'write'] },
|
||||||
{ category: 'connect', content: ['ca', 'proxy', 'envoy'] },
|
{ category: 'connect', content: ['ca', 'proxy', 'envoy', 'expose'] },
|
||||||
'debug',
|
'debug',
|
||||||
'event',
|
'event',
|
||||||
'exec',
|
'exec',
|
||||||
|
64
website/pages/docs/commands/connect/expose.mdx
Normal file
64
website/pages/docs/commands/connect/expose.mdx
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
---
|
||||||
|
layout: docs
|
||||||
|
page_title: 'Commands: Connect Expose'
|
||||||
|
sidebar_title: expose
|
||||||
|
description: >
|
||||||
|
The connect expose subcommand is used to expose a Connect-enabled service
|
||||||
|
through an Ingress gateway by modifying the gateway's configuration and adding
|
||||||
|
an intention to allow traffic from the gateway to the service.
|
||||||
|
---
|
||||||
|
|
||||||
|
# Consul Connect Expose
|
||||||
|
|
||||||
|
Command: `consul connect expose`
|
||||||
|
|
||||||
|
The connect expose subcommand is used to expose a Connect-enabled service
|
||||||
|
through an Ingress gateway by modifying the gateway's configuration and adding
|
||||||
|
an intention to allow traffic from the gateway to the service. See the
|
||||||
|
[Ingress gateway documentation](/docs/connect/ingress-gateway) for more information
|
||||||
|
about Ingress gateways.
|
||||||
|
|
||||||
|
```text
|
||||||
|
Usage: consul connect expose [options]
|
||||||
|
|
||||||
|
Exposes a Connect-enabled service through the given ingress gateway, using the
|
||||||
|
given protocol and port.
|
||||||
|
```
|
||||||
|
|
||||||
|
#### API Options
|
||||||
|
|
||||||
|
@include 'http_api_options_client.mdx'
|
||||||
|
|
||||||
|
@include 'http_api_options_server.mdx'
|
||||||
|
|
||||||
|
#### Expose Options
|
||||||
|
|
||||||
|
- `-ingress-gateway` - The name of the ingress gateway service to use. Required.
|
||||||
|
|
||||||
|
- `-port` - The listener port to use for the service on the Ingress gateway.
|
||||||
|
Required.
|
||||||
|
|
||||||
|
- `-protocol` - The protocol for the service. Defaults to 'tcp'. Optional.
|
||||||
|
|
||||||
|
- `-service` - The name of destination service to expose. Required.
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
The example below shows using the `expose` command to make the `foo` service available
|
||||||
|
through the Ingress gateway service `ingress`. The protocol argument is optional and
|
||||||
|
defaults to `tcp` if not provided.
|
||||||
|
|
||||||
|
```shell-session
|
||||||
|
$ consul connect expose -service=foo -ingress-gateway=ingress -port 8888 -protocol=tcp
|
||||||
|
Successfully updated config entry for ingress service "ingress"
|
||||||
|
Successfully set up intention for "ingress" -> "foo"
|
||||||
|
```
|
||||||
|
|
||||||
|
Running the command again when the config entry/intention are already set up will result
|
||||||
|
in a no-op:
|
||||||
|
|
||||||
|
```shell-session
|
||||||
|
$ consul connect expose -service=foo -ingress-gateway=ingress -port 8888 -protocol=tcp
|
||||||
|
Service "foo" already exposed through listener with port 8888
|
||||||
|
Intention already exists for "ingress" -> "foo"
|
||||||
|
```
|
@ -35,8 +35,10 @@ Usage: consul connect <subcommand> [options] [args]
|
|||||||
For more examples, ask for subcommand help or view the documentation.
|
For more examples, ask for subcommand help or view the documentation.
|
||||||
|
|
||||||
Subcommands:
|
Subcommands:
|
||||||
ca Interact with the Consul Connect Certificate Authority (CA)
|
ca Interact with the Consul Connect Certificate Authority (CA)
|
||||||
proxy Runs a Consul Connect proxy
|
envoy Runs or Configures Envoy as a Connect proxy
|
||||||
|
expose Expose a Connect-enabled service through an Ingress gateway
|
||||||
|
proxy Runs a Consul Connect proxy
|
||||||
```
|
```
|
||||||
|
|
||||||
For more information, examples, and usage about a subcommand, click on the name
|
For more information, examples, and usage about a subcommand, click on the name
|
||||||
|
Loading…
x
Reference in New Issue
Block a user