I'm learning how to use Kubernetes and Gitlab CI/CD so I installed a Gitlab agent into my Kubernetes cluster by following the documentation. I wrote a simple hello world pipeline to see if it works
image: "docker.io/ubuntu"
stages:
- build
build-contabo:
stage: build
script:
- echo "hello world"
But the pipeline won't run and complains about missing configuration:
Running with gitlab-runner 14.6.0 (5316d4ac)
on vmi769777 NWjdRisx
Preparing the "kubernetes" executor 00:09
WARNING: Namespace is empty, therefore assuming 'default'.
Using Kubernetes namespace: default
ERROR: Preparation failed: getting Kubernetes config: invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable
I read on how to configure an agent, but could not find anything addressed this error. I also deployed a hello world kubernetes deployment to check if my cluster does not work, but it ran successfully.
How can I provide configurations so that my pipeline runs? And is this a problem with the Kubernetes Cluster or the Gitlab configuration?