page_type: sample description: Learn how to deploy self-hosted GitHub Actions Runners on AKS (Azure Kubernetes Service) languages:
This repo will demo shortly how you can connect to your github account a self-hosted runner which deployed on Azure Kubernetes Service (AKS) with auto-scale option - which provide an ability to handle successfully many github action job requests in parallel. This project include the following:
After deployment, the outcome will be:
This project framework provides the following features:
Follow this instructions:
ghcr.io/yaronpri/githubrunneronaks:main
with the full image name from previous step, this step is necessary in order to use a GitHub runner image with Azure CLI and kubectl as part of the imageGithubRunnerOnAKS
with your repository nameWhen using private images, the RunnerDeployment
will not be able to pull your image.
To use a private registry (e.g ghcr.io with visibility set to private) add the following:
# When using private registry, we need to create a secret for that as well
kubectl create secret docker-registry runnersecret \
--docker-server=https://${{ env.REGISTRY }}/ \
--docker-username=${{ github.repository }} \
--docker-password=${{ secrets.RUNNER_TOKEN }}
spec:
repository: yaronpri/GithubRunnerOnAKS
#organization: <YOUR ORG NAME IF WANT TO WORK AT ORG LEVEL>
image: ghcr.io/yaronpri/GithubRunnerOnAKS:<tag>
imagePullSecrets:
- name: runnersecret
In order to test the auto-scale of the runners, execute several times the GitHub Action - Deploy Sample App You will notice that after a while, a new runners are being added and able to pull the newly created jobs and process all of them in parallel