Kubernetes kubectl with YAML

YAML parameters for Kubernetes kubectl

You can find the list with common parameters for all Buddy actions here.

NameTypeDescription
action
Required
StringThe name of the action.
type
Required
StringThe type of the action. Should be set to KUBERNETES_CLI.
auth_type
Required
StringAuthorization type. Can be one of BASIC, TOKEN or CERTS.
server
Required
StringThe host for the connection.
execute_commands
Required
String[]The commands that will be executed.
integration_id
Required
IntegerThe ID of the Google integration.
zone_id
Required
StringThe ID of the GKE zone.
cluster
Required
StringThe ID of the GKE cluster.
application_id
Required
StringThe ID of the GKE application.
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”.

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"
execute_commands:
- "kubectl --namespace=buddy-tests get pods"
variables:
- key: "serverAddress"
value: "https://123.45.56.89:6443"
actions:
- action: "Run kubectl"
type: "KUBERNETES_CLI"
trigger_time: "ON_EVERY_EXECUTION"
zone_id: "europe-west1-c"
cluster: "cluster-1"
application_id: "tokyo-house-138923"
kubectl_version: "1.11.1"
execute_commands:
- "kubectl --namespace=buddy-tests get pods"
integration_id: 2