Container runner installation (Kubernetes)
On This Page
This page describes how to install CircleCI’s container runner.
To install container runners and run jobs, you will need to have root access, and have the following set up and installed:
A Kubernetes namespace without any other workloads
The checkout step configures Git to checkout over SSH - ensure that your cluster is configured to allow outbound connections over
port 22if you wish to use it
The CircleCI CLI if you wish to install runners from the command line
Self-hosted runner terms agreement
1. Create namespace and resource class
2. Container runner installation
Add the container runner Helm repo by running the following command:
helm repo add container-agent https://packagecloud.io/circleci/container-agent/helm
Next, run the following:
helm repo update
Then, run the following command to create the
kubectl create namespace circleci
Create a file called
values.yamlfile containing the following:
agent: resourceClasses: namespace/my-rc: token: <resource_class_token>
Finally, run the following command:
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 container runners are:
Simple example of how you could set up a job (
cimg/base:2021.11 is a commonly used CircleCI 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
Refer to the Troubleshoot Container Runner section of the Troubleshoot Self-hosted Runner guide if you encounter issues installing or running container runner.
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.
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.