2018-12-19 08:22:49 +00:00
|
|
|
---
|
2020-04-07 18:55:19 +00:00
|
|
|
layout: docs
|
2020-04-06 20:27:35 +00:00
|
|
|
page_title: 'Commands: TLS'
|
2020-04-13 18:40:26 +00:00
|
|
|
sidebar_title: tls
|
2018-12-19 08:22:49 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
# Consul TLS
|
|
|
|
|
|
|
|
Command: `consul tls`
|
|
|
|
|
|
|
|
The `tls` command is used to help with setting up a CA and certificates for Consul TLS.
|
|
|
|
|
|
|
|
## Basic Examples
|
|
|
|
|
|
|
|
Create a CA:
|
|
|
|
|
2020-05-19 18:32:38 +00:00
|
|
|
```shell-session
|
2018-12-19 08:22:49 +00:00
|
|
|
$ consul tls ca create
|
|
|
|
==> Saved consul-agent-ca.pem
|
|
|
|
==> Saved consul-agent-ca-key.pem
|
|
|
|
```
|
|
|
|
|
|
|
|
Create a client certificate:
|
|
|
|
|
2020-05-19 18:32:38 +00:00
|
|
|
```shell-session
|
2018-12-19 08:22:49 +00:00
|
|
|
$ consul tls cert create -client
|
|
|
|
==> Using consul-agent-ca.pem and consul-agent-ca-key.pem
|
2020-03-17 20:00:45 +00:00
|
|
|
==> Saved dc1-client-consul-0.pem
|
|
|
|
==> Saved dc1-client-consul-0-key.pem
|
2018-12-19 08:22:49 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
For more examples, ask for subcommand help or view the subcommand documentation
|
|
|
|
by clicking on one of the links in the sidebar.
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
Usage: `consul tls <subcommand> <subcommand> [options]`
|
|
|
|
|
|
|
|
For the exact documentation for your Consul version, run `consul tls -h` to
|
|
|
|
view the complete list of subcommands.
|
|
|
|
|
|
|
|
```text
|
|
|
|
Usage: consul tls <subcommand> <subcommand> [options]
|
|
|
|
|
|
|
|
# ...
|
|
|
|
|
|
|
|
Subcommands:
|
|
|
|
ca Helpers for CAs
|
|
|
|
cert Helpers for certificates
|
|
|
|
```
|
|
|
|
|
|
|
|
For more information, examples, and usage about a subcommand, click on the name
|
|
|
|
of the subcommand in the sidebar or one of the links below:
|