mirror of https://github.com/dapr/docs.git
Update CLI reference
This commit is contained in:
parent
2c0933084c
commit
e1aad26640
|
@ -9,14 +9,13 @@ weight: 10
|
|||
The Dapr CLI allows you to setup Dapr on your local dev machine or on a Kubernetes cluster, provides debugging support, and launches and manages Dapr instances.
|
||||
|
||||
```bash
|
||||
|
||||
__
|
||||
|
||||
____/ /___ _____ _____
|
||||
/ __ / __ '/ __ \/ ___/
|
||||
/ /_/ / /_/ / /_/ / /
|
||||
\__,_/\__,_/ .___/_/
|
||||
/_/
|
||||
|
||||
/ /_/ / /_/ / /_/ / /
|
||||
\__,_/\__,_/ .___/_/
|
||||
/_/
|
||||
|
||||
===============================
|
||||
Distributed Application Runtime
|
||||
|
||||
|
@ -25,20 +24,20 @@ Usage:
|
|||
|
||||
Available Commands:
|
||||
completion Generates shell completion scripts
|
||||
components List all Dapr components
|
||||
configurations List all Dapr configurations
|
||||
dashboard Start Dapr dashboard
|
||||
components List all Dapr components. Supported platforms: Kubernetes
|
||||
configurations List all Dapr configurations. Supported platforms: Kubernetes
|
||||
dashboard Start Dapr dashboard. Supported platforms: Kubernetes and self-hosted
|
||||
help Help about any command
|
||||
init Install Dapr on supported hosting platforms, currently: Kubernetes and self-hosted
|
||||
invoke Invoke a method on a given Dapr application
|
||||
list List all Dapr instances
|
||||
logs Get Dapr sidecar logs for an application
|
||||
mtls Check if mTLS is enabled
|
||||
publish Publish a pub-sub event
|
||||
run Run Dapr and (optionally) your application side by side
|
||||
status Show the health status of Dapr services
|
||||
stop Stop Dapr instances and their associated apps in self-hosted mode
|
||||
uninstall Uninstall Dapr runtime
|
||||
init Install Dapr on supported hosting platforms. Supported platforms: Kubernetes and self-hosted
|
||||
invoke Invoke a method on a given Dapr application. Supported platforms: Self-hosted
|
||||
list List all Dapr instances. Supported platforms: Kubernetes and self-hosted
|
||||
logs Get Dapr sidecar logs for an application. Supported platforms: Kubernetes
|
||||
mtls Check if mTLS is enabled. Supported platforms: Kubernetes
|
||||
publish Publish a pub-sub event. Supported platforms: Self-hosted
|
||||
run Run Dapr and (optionally) your application side by side. Supported platforms: Self-hosted
|
||||
status Show the health status of Dapr services. Supported platforms: Kubernetes
|
||||
stop Stop Dapr instances and their associated apps. . Supported platforms: Self-hosted
|
||||
uninstall Uninstall Dapr runtime. Supported platforms: Kubernetes and self-hosted
|
||||
|
||||
Flags:
|
||||
-h, --help help for dapr
|
||||
|
|
|
@ -12,8 +12,8 @@ Generates shell completion scripts
|
|||
## Usage
|
||||
|
||||
```bash
|
||||
dapr completion [flags]
|
||||
dapr completion [command]
|
||||
dapr completion [flags]
|
||||
dapr completion [command]
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
|
|
@ -7,7 +7,7 @@ description: "Detailed information on the components CLI command"
|
|||
|
||||
## Description
|
||||
|
||||
List all Dapr components
|
||||
List all Dapr components. Supported platforms: Kubernetes
|
||||
|
||||
## Usage
|
||||
|
||||
|
@ -15,6 +15,13 @@ List all Dapr components
|
|||
dapr components [flags]
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
### List Kubernetes components
|
||||
```bash
|
||||
dapr components -k
|
||||
```
|
||||
|
||||
## Flags
|
||||
|
||||
| Name | Environment Variable | Default | Description
|
||||
|
|
|
@ -7,7 +7,7 @@ description: "Detailed information on the configurations CLI command"
|
|||
|
||||
## Description
|
||||
|
||||
List all Dapr configurations
|
||||
List all Dapr configurations. Supported platforms: Kubernetes
|
||||
|
||||
## Usage
|
||||
|
||||
|
@ -15,6 +15,13 @@ List all Dapr configurations
|
|||
dapr configurations [flags]
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
### List Kubernetes components
|
||||
```bash
|
||||
dapr components -k
|
||||
```
|
||||
|
||||
## Flags
|
||||
|
||||
| Name | Environment Variable | Default | Description
|
||||
|
|
|
@ -7,14 +7,35 @@ description: "Detailed information on the dashboard CLI command"
|
|||
|
||||
## Description
|
||||
|
||||
Start Dapr dashboard
|
||||
Start Dapr dashboard. Supported platforms: Kubernetes and self-hosted
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
dapr dashboard [flags]
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
### Start dashboard locally
|
||||
```bash
|
||||
dapr dashboard
|
||||
```
|
||||
|
||||
### Start dashboard locally in a specified port
|
||||
```bash
|
||||
dapr dashboard -p 9999
|
||||
```
|
||||
|
||||
### Port forward to dashboard in Kubernetes
|
||||
```bash
|
||||
dapr dashboard -k
|
||||
```
|
||||
|
||||
### Port forward to dashboard in Kubernetes using a port
|
||||
```bash
|
||||
dapr dashboard -k -p 9999
|
||||
```
|
||||
|
||||
## Flags
|
||||
|
||||
| Name | Environment Variable | Default | Description
|
||||
|
|
|
@ -7,14 +7,30 @@ description: "Detailed information on the init CLI command"
|
|||
|
||||
## Description
|
||||
|
||||
Install Dapr on supported hosting platforms, currently: Kubernetes and self-hosted
|
||||
Install Dapr on supported hosting platforms. Supported platforms: Kubernetes and self-hosted
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
dapr init [flags]
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
### Initialize Dapr in self-hosted mode
|
||||
```bash
|
||||
dapr init
|
||||
```
|
||||
|
||||
### Initialize Dapr in Kubernetes
|
||||
```bash
|
||||
dapr init -k
|
||||
```
|
||||
|
||||
### Initialize Dapr in slim self-hosted mode
|
||||
```bash
|
||||
dapr init -s
|
||||
```
|
||||
|
||||
## Flags
|
||||
|
||||
| Name | Environment Variable | Default | Description
|
||||
|
|
|
@ -7,14 +7,25 @@ description: "Detailed information on the invoke CLI command"
|
|||
|
||||
## Description
|
||||
|
||||
Invoke a method on a given Dapr application
|
||||
Invoke a method on a given Dapr application. Supported platforms: Self-hosted
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
dapr invoke [flags]
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
### Invoke a sample method on target app with POST Verb
|
||||
```bash
|
||||
dapr invoke --app-id target --method sample --data '{"key":"value"}'
|
||||
```
|
||||
|
||||
### Invoke a sample method on target app with GET Verb
|
||||
```bash
|
||||
dapr invoke --app-id target --method sample --verb GET
|
||||
```
|
||||
|
||||
## Flags
|
||||
|
||||
| Name | Environment Variable | Default | Description
|
||||
|
@ -22,5 +33,5 @@ dapr invoke [flags]
|
|||
| `--app-id`, `-a` | | | The application id to invoke |
|
||||
| `--help`, `-h` | | | Print this help message |
|
||||
| `--method`, `-m` | | | The method to invoke |
|
||||
| `--payload`, `-p` | | | The JSON payload (optional) |
|
||||
| `--data`, `-d` | | | The JSON serialized data string (optional) |
|
||||
| `--verb`, `-v` | | `POST` | The HTTP verb to use |
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
---
|
||||
type: docs
|
||||
title: "invokeGet CLI command reference"
|
||||
linkTitle: "invokeGet"
|
||||
description: "Detailed information on the invokeGet CLI command"
|
||||
---
|
||||
|
||||
## Description
|
||||
|
||||
Issue HTTP GET to Dapr app
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
dapr invokeGet [flags]
|
||||
```
|
||||
|
||||
## Flags
|
||||
|
||||
| Name | Environment Variable | Default | Description
|
||||
| --- | --- | --- | --- |
|
||||
| `--app-id`, `-a` | | | The app ID to invoke |
|
||||
| `--help`, `-h` | | | Help for invokeGet |
|
||||
| `--method`, `-m` | | | The method to invoke |
|
|
@ -1,25 +0,0 @@
|
|||
---
|
||||
type: docs
|
||||
title: "invokePost CLI command reference"
|
||||
linkTitle: "invokePost"
|
||||
description: "Detailed information on the invokePost CLI command"
|
||||
---
|
||||
|
||||
## Description
|
||||
|
||||
Issue HTTP POST to Dapr app with an optional payload
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
dapr invokePost [flags]
|
||||
```
|
||||
|
||||
## Flags
|
||||
|
||||
| Name | Environment Variable | Default | Description
|
||||
| --- | --- | --- | --- |
|
||||
| `--app-id`, `-a` | | | The app ID to invoke |
|
||||
| `--help`, `-h` | | | Help for invokePost |
|
||||
| `--method`, `-m` | | | The method to invoke |
|
||||
| `--payload`, `-p` | | | (optional) a json payload |
|
|
@ -7,14 +7,25 @@ description: "Detailed information on the list CLI command"
|
|||
|
||||
## Description
|
||||
|
||||
List all Dapr instances
|
||||
List all Dapr instances. Supported platforms: Kubernetes and self-hosted
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
dapr list [flags]
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
### List Dapr instances in self-hosted mode
|
||||
```bash
|
||||
dapr list
|
||||
```
|
||||
|
||||
### List Dapr instances in Kubernetes mode
|
||||
```bash
|
||||
dapr list -k
|
||||
```
|
||||
|
||||
## Flags
|
||||
|
||||
| Name | Environment Variable | Default | Description
|
||||
|
|
|
@ -7,14 +7,20 @@ description: "Detailed information on the logs CLI command"
|
|||
|
||||
## Description
|
||||
|
||||
Gets Dapr sidecar logs for an app in Kubernetes
|
||||
Get Dapr sidecar logs for an application. Supported platforms: Kubernetes
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
dapr logs [flags]
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
### Get logs of sample app from target pod in custom namespace
|
||||
```bash
|
||||
dapr logs -k --app-id sample --pod-name target --namespace custom
|
||||
```
|
||||
|
||||
## Flags
|
||||
|
||||
| Name | Environment Variable | Default | Description
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
type: docs
|
||||
title: "mtls export CLI command reference"
|
||||
linkTitle: "mtls export"
|
||||
description: "Detailed information on the mtls export CLI command"
|
||||
---
|
||||
|
||||
## Description
|
||||
|
||||
Export the root CA, issuer cert and key from Kubernetes to local files
|
||||
|
||||
## Usage
|
||||
```bash
|
||||
dapr mtls export [flags]
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
### Check expiry of Kubernetes certs
|
||||
```bash
|
||||
dapr mtls export -o ./certs
|
||||
```
|
||||
|
||||
## Flags
|
||||
|
||||
| Name | Environment Variable | Default | Description
|
||||
| --- | --- | --- | --- |
|
||||
| `--help`, `-h` | | | help for export |
|
||||
| `--out`, `-o` | | current directory | The output directory path to save the certs |
|
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
type: docs
|
||||
title: "mtls expiry CLI command reference"
|
||||
linkTitle: "mtls expiry"
|
||||
description: "Detailed information on the mtls expiry CLI command"
|
||||
---
|
||||
|
||||
## Description
|
||||
|
||||
Checks the expiry of the root certificate
|
||||
|
||||
## Usage
|
||||
```bash
|
||||
dapr mtls expiry [flags]
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
### Check expiry of Kubernetes certs
|
||||
```bash
|
||||
dapr mtls expiry
|
||||
```
|
||||
|
||||
## Flags
|
||||
|
||||
| Name | Environment Variable | Default | Description
|
||||
| --- | --- | --- | --- |
|
||||
| `--help`, `-h` | | | help for expiry |
|
|
@ -7,7 +7,7 @@ description: "Detailed information on the mtls CLI command"
|
|||
|
||||
## Description
|
||||
|
||||
Check if mTLS is enabled
|
||||
Check if mTLS is enabled. Supported platforms: Kubernetes
|
||||
|
||||
## Usage
|
||||
|
||||
|
@ -16,6 +16,13 @@ dapr mtls [flags]
|
|||
dapr mtls [command]
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
### Check if mTLS is enabled
|
||||
```bash
|
||||
dapr mtls -k
|
||||
```
|
||||
|
||||
## Available Commands
|
||||
|
||||
```txt
|
||||
|
@ -29,3 +36,10 @@ export Export the root CA, issuer cert and key from Kubernetes to local fil
|
|||
| --- | --- | --- | --- |
|
||||
| `--help`, `-h` | | | Print this help message |
|
||||
| `--kubernetes`, `-k` | | `false` | Check if mTLS is enabled in a Kubernetes cluster |
|
||||
|
||||
## Command Reference
|
||||
|
||||
You can learn more about each sub command from the links below.
|
||||
|
||||
- [`dapr mtls expiry`]({{< ref dapr-mtls-expiry.md >}})
|
||||
- [`dapr mtls export`]({{< ref dapr-mtls-export.md >}})
|
|
@ -7,7 +7,7 @@ description: "Detailed information on the publish CLI command"
|
|||
|
||||
## Description
|
||||
|
||||
Publish an event to multiple consumers
|
||||
Publish a pub-sub event. Supported platforms: Self-hosted
|
||||
|
||||
## Usage
|
||||
|
||||
|
@ -15,11 +15,19 @@ Publish an event to multiple consumers
|
|||
dapr publish [flags]
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
### Publish to sample topic in target pubsub
|
||||
```bash
|
||||
dapr publish --topic sample --pubsub target --data '{"key":"value"}'
|
||||
```
|
||||
|
||||
|
||||
## Flags
|
||||
|
||||
| Name | Environment Variable | Default | Description
|
||||
| --- | --- | --- | --- |
|
||||
| `--data`, `-d` | | | The JSON serialized string (optional) |
|
||||
| `--data`, `-d` | | | The JSON serialized data string (optional) |
|
||||
| `--help`, `-h` | | | Print this help message |
|
||||
| `--pubsub` | | | The name of the pub/sub component
|
||||
| `--pubsub`, `-p` | | | The name of the pub/sub component
|
||||
| `--topic`, `-t` | | | The topic to be published to |
|
||||
|
|
|
@ -7,7 +7,7 @@ description: "Detailed information on the run CLI command"
|
|||
|
||||
## Description
|
||||
|
||||
Run Dapr's sidecar and (optionally) an application.
|
||||
Run Dapr and (optionally) your application side by side. Supported platforms: Self-hosted
|
||||
|
||||
## Usage
|
||||
|
||||
|
@ -17,19 +17,26 @@ dapr run [flags] [command]
|
|||
|
||||
## Examples
|
||||
|
||||
Run a Java application:
|
||||
### Run a Java application
|
||||
|
||||
```bash
|
||||
dapr run --app-id myapp -- java -jar myapp.jar
|
||||
```
|
||||
Run a NodeJs application that listens to port 3000:
|
||||
|
||||
### Run a NodeJs application that listens to port 3000
|
||||
|
||||
```bash
|
||||
dapr run --app-id myapp --app-port 3000 -- node myapp.js
|
||||
```
|
||||
Run a Python application:
|
||||
|
||||
### Run a Python application
|
||||
|
||||
```bash
|
||||
dapr run --app-id myapp -- python myapp.py
|
||||
```
|
||||
Run sidecar only:
|
||||
|
||||
### Run sidecar only
|
||||
|
||||
```bash
|
||||
dapr run --app-id myapp
|
||||
```
|
||||
|
@ -38,7 +45,7 @@ dapr run --app-id myapp
|
|||
|
||||
| Name | Environment Variable | Default | Description
|
||||
| --- | --- | --- | --- |
|
||||
| `--app-id`, `-i` | | | The id for your application, used for service discovery |
|
||||
| `--app-id`, `-a` | | | The id for your application, used for service discovery |
|
||||
| `--app-max-concurrency` | | `unlimited` | The concurrency level of the application, otherwise is unlimited |
|
||||
| `--app-port`, `-p` | | | The port your application is listening on
|
||||
| `--app-protocol`, `-P` | | `http` | The protocol (gRPC or HTTP) Dapr uses to talk to the application. Valid values are: `http` or `grpc` |
|
||||
|
@ -49,7 +56,6 @@ dapr run --app-id myapp
|
|||
| `--dapr-http-port` | | `50001` | The HTTP port for Dapr to listen on |
|
||||
| `--enable-profiling` | | `false` | Enable `pprof` profiling via an HTTP endpoint
|
||||
| `--help`, `-h` | | | Print this help message |
|
||||
| `--image` | | | The image to build the code in. Input is: `repository/image` |
|
||||
| `--log-level` | | `info` | The log verbosity. Valid values are: `debug`, `info`, `warning`, `error`, `fatal`, or `panic` |
|
||||
| `--placement-host-address` | `DAPR_PLACEMENT_HOST` | `localhost` | The host on which the placement service resides |
|
||||
| `--profile-port` | | `7777` | The port for the profile server to listen on |
|
||||
|
|
|
@ -7,16 +7,22 @@ description: "Detailed information on the status CLI command"
|
|||
|
||||
## Description
|
||||
|
||||
Show the health status of Dapr services
|
||||
Show the health status of Dapr services. Supported platforms: Kubernetes
|
||||
|
||||
## Usage
|
||||
|
||||
This command only works for Kubernetes mode.
|
||||
|
||||
```bash
|
||||
dapr status -k
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
### Get status of Dapr services from Kubernetes
|
||||
```bash
|
||||
dapr status -k
|
||||
```
|
||||
|
||||
|
||||
## Flags
|
||||
|
||||
| Name | Environment Variable | Default | Description
|
||||
|
|
|
@ -7,7 +7,7 @@ description: "Detailed information on the stop CLI command"
|
|||
|
||||
## Description
|
||||
|
||||
Stop Dapr instances and their associated apps in self-hosted mode
|
||||
Stop Dapr instances and their associated apps. . Supported platforms: Self-hosted
|
||||
|
||||
## Usage
|
||||
|
||||
|
@ -15,9 +15,16 @@ Stop Dapr instances and their associated apps in self-hosted mode
|
|||
dapr stop [flags]
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
### Stop Dapr application
|
||||
```bash
|
||||
dapr stop --app-id <ID>
|
||||
```
|
||||
|
||||
## Flags
|
||||
|
||||
| Name | Environment Variable | Default | Description
|
||||
| --- | --- | --- | --- |
|
||||
| `--app-id` | | | The application id to be stopped |
|
||||
| `--app-id`, `-a` | | | The application id to be stopped |
|
||||
| `--help`, `-h` | | | Print this help message |
|
||||
|
|
|
@ -7,7 +7,7 @@ description: "Detailed information on the uninstall CLI command"
|
|||
|
||||
## Description
|
||||
|
||||
Uninstall Dapr runtime
|
||||
Uninstall Dapr runtime. Supported platforms: Kubernetes and self-hosted
|
||||
|
||||
## Usage
|
||||
|
||||
|
@ -15,6 +15,23 @@ Uninstall Dapr runtime
|
|||
dapr uninstall [flags]
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
### Uninstall from self-hosted mode
|
||||
```bash
|
||||
dapr uninstall
|
||||
```
|
||||
|
||||
### Uninstall from self-hosted mode and remove .dapr directory, Redis, Placement and Zipkin containers
|
||||
```bash
|
||||
dapr uninstall --all
|
||||
```
|
||||
|
||||
### Uninstall from Kubernetes
|
||||
```bash
|
||||
dapr uninstall -k
|
||||
```
|
||||
|
||||
## Flags
|
||||
|
||||
| Name | Environment Variable | Default | Description
|
||||
|
|
Loading…
Reference in New Issue