All Projects → Sh4d1 → drone-kubernetes

Sh4d1 / drone-kubernetes

Licence: other
Drone Plugin for Kubernetes

Programming Languages

go
31211 projects - #10 most used programming language
Dockerfile
14818 projects

Projects that are alternatives of or similar to drone-kubernetes

drone-manifest
Drone plugin to push Docker manifests
Stars: ✭ 14 (-54.84%)
Mutual labels:  drone-plugin
drone-volume-cache
Drone plugin to cache directories within the build workspace
Stars: ✭ 15 (-51.61%)
Mutual labels:  drone-plugin
drone-ansible
Drone plugin to provision via Ansible
Stars: ✭ 24 (-22.58%)
Mutual labels:  drone-plugin
drone-s3-cache
Caches build artifacts to S3 compatible storage backends
Stars: ✭ 27 (-12.9%)
Mutual labels:  drone-plugin
drone-irc
Drone plugin for sending IRC messages
Stars: ✭ 12 (-61.29%)
Mutual labels:  drone-plugin
drone-webhook
Drone plugin for triggering webhook notifications
Stars: ✭ 40 (+29.03%)
Mutual labels:  drone-plugin
drone-hugo
Drone plugin to publish Hugo generated websites
Stars: ✭ 26 (-16.13%)
Mutual labels:  drone-plugin
drone-gitlab-ci
Drone plugin for trigger gitlab-ci jobs.
Stars: ✭ 18 (-41.94%)
Mutual labels:  drone-plugin
drone-facebook
Drone plugin for sending Facebook notifications
Stars: ✭ 15 (-51.61%)
Mutual labels:  drone-plugin
drone-git-push
Drone plugin for deploying code using git push
Stars: ✭ 49 (+58.06%)
Mutual labels:  drone-plugin
drone-jenkins
Drone plugin for trigger Jenkins jobs.
Stars: ✭ 35 (+12.9%)
Mutual labels:  drone-plugin
drone-gh-pages
Drone plugin for publishing to GitHub Pages
Stars: ✭ 14 (-54.84%)
Mutual labels:  drone-plugin
drone-s3
Drone plugin for publishing artifacts to Amazon S3
Stars: ✭ 30 (-3.23%)
Mutual labels:  drone-plugin
drone-ftps
Deploy to FTPS server from Drone CI build
Stars: ✭ 18 (-41.94%)
Mutual labels:  drone-plugin
drone-discord
Drone plugin for sending message to Discord channel using Webhook
Stars: ✭ 34 (+9.68%)
Mutual labels:  drone-plugin
drone-npm
Drone plugin for publishing packages to NPM
Stars: ✭ 21 (-32.26%)
Mutual labels:  drone-plugin

Drone Kubernetes

Build Status

Drone plugin to create/update Kubernetes resources.

It uses the latest k8s go api, so it is intened to use on Kubernetes 1.9+. I can't guarantee it will work for previous versions.

You can directly pull the image from sh4d1/drone-kubernetes

Supported resources

Currently, this plugin supports:

  • apps/v1
    • DaemonSet
    • Deployment
    • ReplicaSet
    • StatefulSet
  • apps/v1beta1
    • Deployment
    • StatefulSet
  • apps/v1beta2
    • DaemonSet
    • Deployment
    • ReplicaSet
    • StatefulSet
  • v1
    • ConfigMap
    • PersistentVolume
    • PersistentVolumeClaim
    • Pod
    • ReplicationController
    • Service
  • extensions/v1beta1
    • DaemonSet
    • Deployment
    • Ingress
    • ReplicaSet

Inspiration

It is inspired by vallard and his plugin drone-kube.

Usage

Here is how you can use this plugin:

pipeline:
  deploy:
    image: sh4d1/drone-kubernetes
    kubernetes_template: deployment.yml
    kubernetes_namespace: default
    secrets: [kubernetes_server, kubernetes_cert, kubernetes_token]

Secrets

You need to define these secrets before.

$ drone secret add --image=sh4d1/drone-kubernetes -repository <your-repo> -name KUBERNETES_SERVER -value <your API server>
$ drone secret add --image=sh4d1/drone-kubernetes -repository <your repo> -name KUBERNETES_CERT -value <your base64 encoded cert>
$ drone secret add --image=sh4d1/drone-kubernetes -repository <your repo> -name KUBERNETES_TOKEN -value <your token>

How to get values of KUBERNETES_CERT and KUBERNETES_TOKEN

List secrets of default namespace

$ kubectl get -n <namespace of secret> default secret

Show the ca.crt and token from secret

$ kubectl get secret -n <namespace of secret> <name of your drone secret> -o yaml | egrep 'ca.crt:|token:'

You can copy/paste the encoded certificate to the KUBERNETES_CERT value. For the KUBERNETES_TOKEN, you need to decode it:

  • echo "<encoded token>" | base64 -d
  • kubectl describe secret -n <your namespace> <drone secret name> | grep 'token:'

TODO

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].