跳到主要内容

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
必填
StringThe type of the action. Should be set to KUBERNETES_CLI.
auth_type
必填
StringAuthorization type. Can be one of BASIC, TOKEN or CERTS.
server
必填
StringThe host for the connection.
execute_commands
必填
String[]The commands that will be executed.
loginStringThe username required when auth_type is set to BASIC.
passwordStringThe password required when auth_type is set to BASIC.
tokenStringThe token required when auth_type is set to TOKEN.
client_caStringThe certificate authority required when auth_type is set to CERTS.
client_certStringThe client certificate required when auth_type is set to CERTS.
client_keyStringThe client key required when auth_type is set to CERTS.
kubectl_versionStringVersion of the kubectl used in the action. Default is “latest”.
shellStringThe 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
必填
StringThe type of the action. Should be set to KUBERNETES_CLI.
execute_commands
必填
String[]The commands that will be executed.
integration_hash
必填
StringThe ID of the Google or Amazon integration.
zone_id
必填
StringThe ID of the GKE zone.
cluster
必填
StringThe ID of the GKE and Amazon EKS cluster.
application_id
必填
StringThe ID of the GKE application.
gke_auth_type
必填
StringAuthorization type. Set to SERVICE_ACCOUNT.
kubectl_versionStringVersion of the kubectl used in the action. Default is “latest”.
shellStringThe 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
必填
StringThe type of the action. Should be set to KUBERNETES_CLI.
execute_commands
必填
String[]The commands that will be executed.
integration_hash
必填
StringThe ID of the Google or Amazon integration.
cluster
必填
StringThe ID of the GKE and Amazon EKS cluster.
region
必填
StringThe Amazon region. Required when Amazon EKS cluster is set.
role_arn
必填
StringContains information about an IAM role. Can be set for Amazon EKS cluster.
kubectl_versionStringVersion of the kubectl used in the action. Default is “latest”.
shellStringThe 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"