This step vendors the kubectl executable, and allows the user to execute a
command. Most options are passed along to the kubectl executable as is.
debug(optional, default:false) List the kubectl before running it. Warning, all environment variables are expanded, including the password.cmd(optional) The kubectl command which needs to be run.raw-global-args(optional) Arguments that are placed beforecmd.raw-args(optional) Arguments that are placed aftercmd.
The following options are available as wercker properties. The values are passed
directly to the kubectl command. See the kubectl for the documentation.
allcurrent-replicasdeployment-label-keyfilegrace-periodimageinsecure-skip-tls-verifyinteractiveoutputoverwritepasswordpatchpodpoll-intervalreplicasresource-versionrollbackselectorserverstdintemplatetimeouttokenttyupdate-periodusername
If a flag is not available, use the raw-global-args or the raw-args option.
deploy:
steps:
- kubectl:
server: $KUBERNETES_MASTER
username: $KUBERNETES_USERNAME
password: $KUBERNETES_PASSWORD
insecure-skip-tls-verify: true
command: create -f cities-controller.json
Passing the contents of a Google service account private key JSON file in optional parameter gcloud-key-json will
cause this step to use the gcloud SDK to authenticate kubectl for access to GKE with a Google service account.
You'll also need to pass:
gcloud-key-json:
type: string
required: false
gke-cluster-name:
type: string
required: false
gke-cluster-zone:
type: string
required: false
gke-cluster-project:
type: string
required: false
The MIT License (MIT)
- Add support for authenticating kubectl with GKE clusters with a Google service account.
- Update to kubectl to version
1.3.4
- Add
certificate-authority,client-certificate,client-key
- Update to kubectl to version
1.2.0
- Update to kubectl to version
1.1.3
- Initial release