This Drone plugin allows you to use kubectl
without messing around with the authentication
The docker image is also scanned by Clair.
You can use all the Drone env reference variables in your yaml files. They will be replaced before the deployment.
# drone 1.x syntax
kind: pipeline
name: deploy
steps:
- name: deploy
image: sybex/drone-kubectl
settings:
kubernetes_server:
from_secret: k8s_server
kubernetes_cert:
from_secret: k8s_cert
kubernetes_token:
from_secret: k8s_token
commands:
- kubectl create -f job_foo.yaml
- kubectl wait --for=condition=complete -f job_foo.yaml
Inspired by drone-kubernetes.