This article explains how to install the Kubernetes runner on Linux. The Kubernetes runner is packaged as a minimal Docker image distributed on DockerHub.
Step 1 - Configure
The Kubernetes runner is configured using environment variables. This article references the below configuration options. See Configuration for a complete list of configuration options.
- provides the hostname (and optional port) of your Drone server. The runner connects to the server at the host address to receive pipelines for execution.
- provides the protocol used to connect to your Drone server. The value must be either http or https.
- provides the shared secret used to authenticate with your Drone server. This must match the secret defined in your Drone server configuration.
Step 2 - Authenticate
The Kubernetes runner uses in-cluster authentication to communicate with the Kubernetes API. Please ensure the Kubernetes runner is associated with a service account when deployed to your cluster.
Step 3 - Install
The following is a rudimentary manifest file used to configure and install the Kubernetes runner. Remember to replace the environment variables below with the correct values.
Here are the sample rbac rules:
And here is the example deployment:
Step 4 - Verify
kubectl logs drone -c runner command to view the logs and verify the runner successfully established a connection with the Drone server.
$ kubectl logs drone -c runner INFO starting the server INFO successfully pinged the remote server
If you are migrating from the legacy Kubernetes runtime to the new Kubernetes runner please unset the following server environment variables: