Drone CI/CD Goes Kubernetes-Native

Today we’re announcing official support for Kubernetes. While many organizations have already been combining Drone and Kubernetes for their deployments, today we’re delivering a native integration for a better user experience. Now your CI/CD Pipelines are translated into native Pods, Secrets, and Services.

We’ve been at the forefront of the containerization movement; we started support for Linux containers, and when Docker came around we fully embraced their container runtime. Since then we’ve seen the hyper growth of Kubernetes platforms and users like eBay, Reddit and The New York Times adopting Drone and Kubernetes together. We’ve heard from many of you, wanting a simpler, better experience with Kubernetes, we’ve listened and believe you’ll love the new service.

We’re happy to fully support Kubernetes today, and wherever this movement and users needs are in the future. We look forward to hearing your feedback.

What is Drone?

If you are learning about Drone for the first time …

Drone is a modern CI/CD platform built with a containers-first architecture. Pipelines are configured using a special YAML file that you check-in to your git repository. The syntax is designed to be easy to read and expressive so that anyone using the repository can understand the continuous delivery process.

---
kind: pipeline
name: default

steps:
- name: backend
  image: golang
  commands:
  - go build
  - go test

- name: frontend
  image: node
  commands:
  - npm install
  - npm test

...

How does Drone integrate with Kubernetes?

Drone integrates seamlessly with your version control system to receive a notification any time a user opens a pull request, pushes code, creates a tag and more. Upon notification, Drone creates a Kubernetes Job to execute your Pipeline.

This Kubernetes Job spawns a Pipeline Controller container. This container is responsible for orchestrating your Pipeline steps, collecting the results, and reporting back to the Drone server.

Kubernetes Jobs are not automatically purged from the system. This ends up being a really nice side-effect. If you are a Drone operator and are responsible for managing Drone as a shared service in your company, this gives you the ability to inspect the Job for troubleshooting purposes. For automated cleanup enable the TTLAfterFinished feature gate.

kubernetes jobs

As previously mentioned, the Pipeline Controller is responsible for orchestrating your Pipeline steps. The Controller creates a new Namespace for your Pipeline, and creates all Pipeline objects within this namespace. This ensures your Pipeline is isolated from other Pods and Services running on your cluster, and allows for easy cleanup when execution is complete (credit to Kelsey Hightower for this suggestion). You can explore the namespace and watch your Pipeline running in real-time.

In the screenshot below we can see the log output of a Pipeline step in both Drone and the Kubernetes Dashboard.

kubernetes jobs

How is this different from Drone for Docker?

There is no visible difference from an end-user perspective! The YAML configuration file is portable across container and orchestration engines. You can use the exact same Pipeline configuration with Kubernetes and with Docker runtimes.

From an administrator perspective, if you are running Drone on Kubernetes today, this will significantly simplify your deployment. Perhaps the biggest improvement is you no longer have to install, upgrade and manage agents. Drone for Kubernetes is agentless! It also means no more mounting the host machine Docker socket or running Docker in Docker.

Is Drone for Kubernetes Production Ready?

The Kubernetes Runtime is still considered experiment, however, initial testing has been very positive. There are some known issues and areas of improvement, however, I expect rapid progress over the coming weeks. If you are interested in contributing to our Kubernetes Runtime, I have put together a small guide to help you get started.


Take Drone for a spin! We recently launched Drone Cloud which is free for the open source community, thanks to Packet who donated blazing fast x86, Arm32 and Arm64 bare metal servers.

Drone.io has been at the forefront of how to deploy with containers and the first to deliver a container CI/CD model. Drone.io has a robust ecosystem of plug-ins such as Kubernetes, Helm, GitHub and more, to help developers with their pipelines. With 16,000 GitHub stars and a passionate community, Drone.io is empowering developers to quickly fix bugs and deliver new applications to market faster. Drone.io is pluggable, repeatable and portable by nature, putting the power of deployment in developers hands. Follow us on Twitter @droneio.