Dapr 命令行接口 (CLI) 参考

Dapr CLI 命令的详细信息

Dapr CLI 允许您在本地开发机或Kubernetes集群上安装Dapr。 提供调试支持,启动和管理 Dapr 实例。

  1. __
  2. ____/ /___ _____ _____
  3. / __ / __ '/ __ \/ ___/
  4. / /_/ / /_/ / /_/ / /
  5. \__,_/\__,_/ .___/_/
  6. /_/
  7. ===============================
  8. Distributed Application Runtime
  9. Usage:
  10. dapr [command]
  11. Available Commands:
  12. completion Generates shell completion scripts
  13. components List all Dapr components. Supported platforms: Kubernetes
  14. configurations List all Dapr configurations. Supported platforms: Kubernetes
  15. dashboard Start Dapr dashboard. Supported platforms: Kubernetes and self-hosted
  16. help Help about any command
  17. init Install Dapr on supported hosting platforms. Supported platforms: Kubernetes and self-hosted
  18. invoke Invoke a method on a given Dapr application. Supported platforms: Self-hosted
  19. list List all Dapr instances. Supported platforms: Kubernetes and self-hosted
  20. logs Get Dapr sidecar logs for an application. Supported platforms: Kubernetes
  21. mtls Check if mTLS is enabled. Supported platforms: Kubernetes
  22. publish Publish a pub-sub event. Supported platforms: Self-hosted
  23. run Run Dapr and (optionally) your application side by side. Supported platforms: Self-hosted
  24. status Show the health status of Dapr services. Supported platforms: Kubernetes
  25. stop Stop Dapr instances and their associated apps. . Supported platforms: Self-hosted
  26. uninstall Uninstall Dapr runtime. Supported platforms: Kubernetes and self-hosted
  27. upgrade Upgrades a Dapr control plane installation in a cluster. Supported platforms: Kubernetes
  28. Flags:
  29. -h, --help help for dapr
  30. -v, --version version for dapr
  31. Use "dapr [command] --help" for more information about a command.

命令参考

您可以通过以下链接了解有关每个 Dapr 命令的详细信息。

环境变量

一些 Dapr 参数可以通过环境变量进行设置(例如 DAPR_NETWORK 自动用在 dapr init 命令的 --network 参数上)。 请注意,在命令行上指定标志将覆盖环境变量。