{"id":25083966,"url":"https://github.com/sh4d1/drone-kubernetes","last_synced_at":"2025-08-26T16:07:28.025Z","repository":{"id":103510487,"uuid":"118469002","full_name":"Sh4d1/drone-kubernetes","owner":"Sh4d1","description":"Drone Plugin for Kubernetes","archived":false,"fork":false,"pushed_at":"2018-11-22T06:54:48.000Z","size":23609,"stargazers_count":31,"open_issues_count":2,"forks_count":14,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-15T10:45:18.245Z","etag":null,"topics":["deployment","drone-kubernetes","drone-plugin","golang","kubernetes"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Sh4d1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-22T14:36:08.000Z","updated_at":"2023-01-30T15:59:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"ac6b39db-cb5a-4da0-be76-23ab733b5375","html_url":"https://github.com/Sh4d1/drone-kubernetes","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Sh4d1/drone-kubernetes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sh4d1%2Fdrone-kubernetes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sh4d1%2Fdrone-kubernetes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sh4d1%2Fdrone-kubernetes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sh4d1%2Fdrone-kubernetes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sh4d1","download_url":"https://codeload.github.com/Sh4d1/drone-kubernetes/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sh4d1%2Fdrone-kubernetes/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272235299,"owners_count":24897182,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-26T02:00:07.904Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deployment","drone-kubernetes","drone-plugin","golang","kubernetes"],"created_at":"2025-02-07T06:29:44.577Z","updated_at":"2025-08-26T16:07:27.997Z","avatar_url":"https://github.com/Sh4d1.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Drone Kubernetes \n[![Build Status](https://cloud.drone.io/api/badges/Sh4d1/drone-kubernetes/status.svg)](https://cloud.drone.io/Sh4d1/drone-kubernetes) [![](https://images.microbadger.com/badges/image/sh4d1/drone-kubernetes.svg)](https://hub.docker.com/r/sh4d1/drone-kubernetes/ \"Get your own image badge on microbadger.com\")\n\nDrone plugin to create/update Kubernetes resources.\n\nIt 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.\n\nYou can directly pull the image from [sh4d1/drone-kubernetes](https://hub.docker.com/r/sh4d1/drone-kubernetes/)\n## Supported resources\nCurrently, this plugin supports:\n* apps/v1\n  * DaemonSet\n  * Deployment\n  * ReplicaSet\n  * StatefulSet\n* apps/v1beta1\n  * Deployment\n  * StatefulSet\n* apps/v1beta2\n  * DaemonSet\n  * Deployment\n  * ReplicaSet\n  * StatefulSet\n* v1\n  * ConfigMap \n  * PersistentVolume \n  * PersistentVolumeClaim \n  * Pod \n  * ReplicationController \n  * Service \n* extensions/v1beta1\n  * DaemonSet\n  * Deployment\n  * Ingress\n  * ReplicaSet\n\n## Inspiration \n\nIt is inspired by [vallard](https://github.com/vallard) and his plugin [drone-kube](https://github.com/vallard/drone-kube).\n\n\n## Usage\n\nHere is how you can use this plugin:\n```\npipeline:\n  deploy:\n    image: sh4d1/drone-kubernetes\n    kubernetes_template: deployment.yml\n    kubernetes_namespace: default\n    secrets: [kubernetes_server, kubernetes_cert, kubernetes_token]\n```\n\n## Secrets\n\nYou need to define these secrets before.\n```\n$ drone secret add --image=sh4d1/drone-kubernetes -repository \u003cyour-repo\u003e -name KUBERNETES_SERVER -value \u003cyour API server\u003e\n```\n```\n$ drone secret add --image=sh4d1/drone-kubernetes -repository \u003cyour repo\u003e -name KUBERNETES_CERT -value \u003cyour base64 encoded cert\u003e\n```\n```\n$ drone secret add --image=sh4d1/drone-kubernetes -repository \u003cyour repo\u003e -name KUBERNETES_TOKEN -value \u003cyour token\u003e\n```\n\n### How to get values of `KUBERNETES_CERT` and `KUBERNETES_TOKEN`\n\nList secrets of `default` namespace\n\n```\n$ kubectl get -n \u003cnamespace of secret\u003e default secret\n```\n\nShow the `ca.crt` and `token` from secret\n\n```\n$ kubectl get secret -n \u003cnamespace of secret\u003e \u003cname of your drone secret\u003e -o yaml | egrep 'ca.crt:|token:'\n```\n\nYou can copy/paste the encoded certificate to the `KUBERNETES_CERT` value.\nFor the `KUBERNETES_TOKEN`, you need to decode it:\n\n* `echo \"\u003cencoded token\u003e\" | base64 -d`\n* `kubectl describe secret -n \u003cyour namespace\u003e \u003cdrone secret name\u003e | grep 'token:'`\n\n\nTODO\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsh4d1%2Fdrone-kubernetes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsh4d1%2Fdrone-kubernetes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsh4d1%2Fdrone-kubernetes/lists"}