github.com/KyaXTeam/consul@v1.4.5/website/source/docs/commands/connect/ca.html.md.erb (about)

     1  ---
     2  layout: "docs"
     3  page_title: "Commands: Connect CA"
     4  sidebar_current: "docs-commands-connect-ca"
     5  description: >
     6    The connect CA subcommand is used to view and modify the Connect Certificate
     7    Authority (CA) configuration.
     8  ---
     9  
    10  # Consul Connect Certificate Authority (CA)
    11  
    12  Command: `consul connect ca`
    13  
    14  The CA connect command is used to interact with Consul Connect's Certificate Authority
    15  subsystem. The command can be used to view or modify the current CA configuration. See the
    16  [Connect CA documentation](/docs/connect/ca.html) for more information.
    17  
    18  ```text
    19  Usage: consul connect ca <subcommand> [options] [args]
    20  
    21    This command has subcommands for interacting with Consul Connect's
    22    Certificate Authority (CA).
    23  
    24    Here are some simple examples, and more detailed examples are available
    25    in the subcommands or the documentation.
    26  
    27    Get the configuration:
    28  
    29        $ consul connect ca get-config
    30  
    31    Update the configuration:
    32  
    33        $ consul connect ca set-config -config-file ca.json
    34  
    35    For more examples, ask for subcommand help or view the documentation.
    36  
    37  Subcommands:
    38      get-config    Display the current Connect Certificate Authority (CA) configuration
    39      set-config    Modify the current Connect CA configuration
    40  ```
    41  
    42  ## get-config
    43  
    44  This command displays the current CA configuration.
    45  
    46  Usage: `consul connect ca get-config [options]`
    47  
    48  #### API Options
    49  
    50  <%= partial "docs/commands/http_api_options_client" %>
    51  <%= partial "docs/commands/http_api_options_server" %>
    52  
    53  The output looks like this:
    54  
    55  ```
    56  {
    57  	"Provider": "consul",
    58  	"Config": {},
    59  	"CreateIndex": 5,
    60  	"ModifyIndex": 197
    61  }
    62  ```
    63  
    64  ## set-config
    65  
    66  Modifies the current CA configuration. If this results in a new root certificate
    67  being used, the [Root Rotation](/docs/connect/ca.html#root-certificate-rotation) process
    68  will be triggered.
    69  
    70  Usage: `consul connect ca set-config [options]`
    71  
    72  #### API Options
    73  
    74  <%= partial "docs/commands/http_api_options_client" %>
    75  <%= partial "docs/commands/http_api_options_server" %>
    76  
    77  #### Command Options
    78  
    79  * `-config-file` - (required) Specifies a JSON-formatted file to use for the new configuration.
    80  
    81  The output looks like this:
    82  
    83  ```
    84  Configuration updated!
    85  ```
    86  
    87  The return code will indicate success or failure.