kubekey/docs/zh/modules/command.md
liujian e3f2372ee0
feat: docs for modules (#2623)
Signed-off-by: joyceliu <joyceliu@yunify.com>
2025-06-17 09:40:31 +00:00

593 B

command(shell) 模块

command或shell模块允许用户执行特定命令。执行何种命令由相关的connector实现

参数

参数 说明 类型 必填 默认值
command 执行的命令.可使用模板语法 字符串 -

使用示例

  1. 执行shell命令 connector.type 为 localssh
- name: execute shell command
  command: echo "aaa"
  1. 执行kubernetes命令 connector.type 为 kubernetes
- name: executor kubernetes command
  command: kubectl get pod