Kubernetes kubectl with YAML
List of YAML parameters and examples for the "Kubernetes Kubectl" action
提示
Kubernetes kubectl
YAML parameters for Kubernetes kubectl
名称 | 类型 | 描述 |
---|---|---|
action 必填 | String | 操作名称 |
type 必填 | String | The type of the action. Should be set to KUBERNETES_CLI . |
auth_type 必填 | String | Authorization type. Can be one of BASIC , TOKEN or CERTS . |
server 必填 | String | The host for the connection. |
execute_commands 必填 | String[] | The commands that will be executed. |
login | String | The username required when auth_type is set to BASIC . |
password | String | The password required when auth_type is set to BASIC . |
token | String | The token required when auth_type is set to TOKEN . |
client_ca | String | The certificate authority required when auth_type is set to CERTS . |
client_cert | String | The client certificate required when auth_type is set to CERTS . |
client_key | String | The client key required when auth_type is set to CERTS . |
kubectl_version | String | Version of the kubectl used in the action. Default is “latest”. |
shell | String | The name of the shell that will be used to execute commands. Can be one of SH (default) or BASH . |
YAML example for Kubernetes kubectl
actions:
- action: "Run kubectl"
type: "KUBERNETES_CLI"
trigger_time: "ON_EVERY_EXECUTION"
auth_type: "BASIC"
server: "$serverAddress"
login: "admin"
password: "qwerty"
kubectl_version: "1.11.1"
shell: "SH"
execute_commands:
- "kubectl --namespace=buddy-tests get pods"
variables:
- key: "serverAddress"
value: "https://123.45.56.89:6443"
GKE kubectl
YAML parameters for GKE kubectl
名称 | 类型 | 描述 |
---|---|---|
action 必填 | String | 操作名称 |
type 必填 | String | The type of the action. Should be set to KUBERNETES_CLI . |
execute_commands 必填 | String[] | The commands that will be executed. |
integration_hash 必填 | String | The ID of the Google or Amazon integration. |
zone_id 必填 | String | The ID of the GKE zone. |
cluster 必填 | String | The ID of the GKE and Amazon EKS cluster. |
application_id 必填 | String | The ID of the GKE application. |
gke_auth_type 必填 | String | Authorization type. Set to SERVICE_ACCOUNT . |
kubectl_version | String | Version of the kubectl used in the action. Default is “latest”. |
shell | String | The name of the shell that will be used to execute commands. Can be one of SH (default) or BASH . |
YAML example for GKE kubectl
actions:
- action: "Run kubectl"
type: "KUBERNETES_CLI"
cluster: "cluster-1"
application_id: "tokyo-house-138923"
execute_commands:
- "kubectl --namespace=buddy-tests get pods"
shell: "SH"
zone_id: "europe-west1-c"
gke_auth_type: "SERVICE_ACCOUNT"
integration_hash: "5ddb7c180fb38be67bd78a88a"
Amazon EKS
YAML parameters for Amazon EKS
名称 | 类型 | 描述 |
---|---|---|
action 必填 | String | 操作名称 |
type 必填 | String | The type of the action. Should be set to KUBERNETES_CLI . |
execute_commands 必填 | String[] | The commands that will be executed. |
integration_hash 必填 | String | The ID of the Google or Amazon integration. |
cluster 必填 | String | The ID of the GKE and Amazon EKS cluster. |
region 必填 | String | The Amazon region. Required when Amazon EKS cluster is set. |
role_arn 必填 | String | Contains information about an IAM role. Can be set for Amazon EKS cluster. |
kubectl_version | String | Version of the kubectl used in the action. Default is “latest”. |
shell | String | The name of the shell that will be used to execute commands. Can be one of SH (default) or BASH . |
YAML example for Amazon EKS
actions:
- action: "Run kubectl"
type: "KUBERNETES_CLI"
cluster: "cluster-1"
role_arn: "SERVICE_ACCOUNT"
region: "us-west-2"
execute_commands:
- "kubectl --namespace=buddy-tests get pods"
shell: "SH"
kubectl_version: "latest"
integration_hash: "5ddb7c180fb38be67bd78a88a"