Drone plugins > Kubernetes
kubernetes.svg

Kubernetes

by danielgormly


Updates Kubernetes deployments from templates & configMaps from files. This plugin will either create or update existing resources dependent on their presence. It will wait for deployments before it progresses.

Example

kind: pipeline
name: default

steps:
- name: Deploy app
  image: danielgormly/drone-plugin-kube:0.0.1
  settings:
    template: path/to/deployment.yaml # relative to repo root
    ca: LS0tLS1... # BASE64 encoded string of the K8s CA cert
    server: https://10.0.0.20:6443 # K8s master node address
    token:
      from_secret: kubernetes_token # Service account token to a service account that can manage deployments

Properties

  • ca

    stringoptional

    Base-64 encoded string of the K8s CA cert.

    Secret recommended

    Default: none

  • server

    stringrequired

    Full url of Kubernetes API endpoint including protocol & port.

    Default: none

  • kubernetes_token

    stringrequired

    Kubernetes service account token (Not base64 encoded).

    Secret recommended

    Default: none

  • template

    stringoptional

    Path to Kubernetes yaml based definition file (Configmap or Deployment).

    Default: none

  • configmap_file

    stringoptional

    path to file containing data to inject in configmap (They configmap key that contains the data will be the filename).

    Default: none

  • Other_parameters

    stringoptional

    Other parameters will be made available for interpolation within yaml templates (upper-case will be converted to lower-case).

    Default: none