Recently I’ve deployed a fresh two-nodes Kubernetes cluster (using kubespray), and then I’ve configured a gitlab-ci runner to run on it using the “Set up a specific Runner automatically” option on Gitlab UI available on CI/CD Settings page.
The runner was successfully deployed inside the k8s cluster, and I’m able to run build Jobs using it and deploy environments.
But I’m unable to get shell access into a running environment using the “Interactive Web Terminal” feature. When I try to access a running environment -
Operations -> Environments -> Terminal - I get the error message " Connection failure ".
By editing the ConfigMap used in runner’s configuration I’ve specified the
[session_server] section as shown below:
bash-4.4$ cat /home/gitlab-runner/.gitlab-runner/config.toml listen_address = "[::]:9252" concurrent = 34 check_interval = 3 log_level = "info" [session_server] listen_address = "0.0.0.0:8093" session_timeout = 2000 [[runners]] name = "runner-gitlab-runner-7b9ccb6999-959cq" url = "https://<anonymised>.com/" token = <anonymised> executor = "kubernetes" [runners.cache] [runners.cache.s3] [runners.cache.gcs] [runners.kubernetes] host = "" bearer_token_overwrite_allowed = false image = "ubuntu:16.04" namespace = "gitlab-managed-apps" namespace_overwrite_allowed = "" privileged = true service_account_overwrite_allowed = "" pod_annotations_overwrite_allowed = "" [runners.kubernetes.volumes]
I can successfully Start and Stop the Environment through the Gitlab UI, and I can also use kubectl exec to get shell access into the deployment pod. But I’m unable to use Gitlab’s Interactive Web Terminal feature, which is something I desperately need.
Am I missing something in the configuration?
Please, help me solving this issue. Is there any step-by-step tutorial on how to properly configure gitlab runner on kubernetes?