GitHub runner setup in GKE

1k Views Asked by At

I am trying to create a GitHub actions self-host runner in GKE. For the I created the Docker with Ubuntu base image and downloaded the GitHub runner code.

curl -o actions-runner-linux-x64-2.288.1.tar.gz -L https://github.com/actions/runner/releases/download/v2.288.1/actions-runner-linux-x64-2.288.1.tar.gz

./config.sh 

Using the Kubernetes deployment.yaml file deployed the runner in the Kubernetes cluster, but in POD logs I am seeing the below error and the runner is unable to authenticate with the GitHub account.

--------------------------------------------------------------------------------
| ____ _ _ _ _ _ _ _ _ |
| / ___(_) |_| | | |_ _| |__ / \ ___| |_(_) ___ _ __ ___ |
| | | _| | __| |_| | | | | '_ \ / _ \ / __| __| |/ _ \| '_ \/ __| |
| | |_| | | |_| _ | |_| | |_) | / ___ \ (__| |_| | (_) | | | \__ \ |
| \____|_|\__|_| |_|\__,_|_.__/ /_/ \_\___|\__|_|\___/|_| |_|___/ |
| |
| Self-hosted runner registration |
| |
--------------------------------------------------------------------------------



# Authentication

The SSL connection could not be established, see inner exception.
An error occurred: Not configured

We are using Istio as a service mesh in our Kubernetes cluster.

2

There are 2 best solutions below

0
On

As I mentioned earlier I am using Istio, After whitelisting the below URL in Istio. My issue got resolved and I am able to create a runner in the Kubernetes cluster.

api.github.com

raw.githubusercontent.com

oauth2.googleapis.com

0
On

Based on this documentation before installation you should have had already installed cert-manager:

By default, actions-runner-controller uses cert-manager for certificate management of Admission Webhook. Make sure you have already installed cert-manager before you install. The installation instructions for cert-manager can be found below.

After that you have two ways for actions-runner-controller to authenticate with the GitHub API:

  1. Using a GitHub App (not supported for enterprise level runners due to lack of support from GitHub)
  2. Using a PAT

See here setup steps for GitHub App Authentication and here for PAT Authentication.