Container runner installation (Kubernetes)
This page describes how to install CircleCI’s container runner.
This page is a continuation of installing self-hosted runners. You will need to have an existing CircleCI namespace and resource class to continue below. You can do this on the CircleCI web app by navigating to Self-Hosted Runners (see the documentation for the Web app installation). You can also use the CLI. |
Installation instructions
-
Add the container runner Helm repo by running
helm repo add container-agent https://packagecloud.io/circleci/container-agent/helm
-
Run
helm repo update
-
Run
kubectl create namespace circleci
to create thecircleci
Kubernetes namespace -
Create a file called
values.yaml
file containing the following:agent: resourceClasses: namespace/my-rc: token: <resource_class_token>
-
Run
helm install container-agent container-agent/container-agent -n circleci -f values.yaml
Container runner configuration example
Once you have installed the container runner within your cluster, create and trigger a CircleCI job that uses the Docker executor to validate the installation. The fields you must set for a specific job to run using your self-hosted runners are:
-
image:
-
resource_class: <namespace>/<resource-class>
Simple example of how you could set up a job (cimg/base:2021.11
is a commonly used CirlceCI Docker image):
version: 2.1
jobs:
build:
docker:
- image: cimg/base:2021.11
resource_class: <namespace>/<resource-class>
steps:
- checkout
- run: echo "Hi I'm on Runners!"
workflows:
build-workflow:
jobs:
- build
Do not use an existing job that uses setup_remote_docker (see Building container images for more information). |
Troubleshooting
Refer to the Troubleshoot Container Runner section of the Troubleshoot Self-hosted Runner guide if you encounter issues installing or running container runner.
Additional resources
Help make this document better
This guide, as well as the rest of our docs, are open source and available on GitHub. We welcome your contributions.
- Suggest an edit to this page (please read the contributing guide first).
- To report a problem in the documentation, or to submit feedback and comments, please open an issue on GitHub.
- CircleCI is always seeking ways to improve your experience with our platform. If you would like to share feedback, please join our research community.
Need support?
Our support engineers are available to help with service issues, billing, or account related questions, and can help troubleshoot build configurations. Contact our support engineers by opening a ticket.
You can also visit our support site to find support articles, community forums, and training resources.
CircleCI Documentation by CircleCI is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.