<p>I'm new to Gitlab and Kubernetes and I'm wondering what the difference between a Gitlab runner and a Gitlab agent is.</p>
<p>On gitlab it says an agent is used to connect to the cluster, run pipelines, and deploy applications.<br />
But with a regular runner you could just have a pipeline that invokes <code>kubectl</code> to interact with the cluster.<br />
What is possible with an agent that isn't with a runner using <code>kubectl</code>?</p>

iaquobe
<p>The GitLab Agent (for Kubernetes) is the way GitLab interacts with the Kubernetes cluster (<a href="https://docs.gitlab.com/ee/user/clusters/agent/" rel="nofollow noreferrer">https://docs.gitlab.com/ee/user/clusters/agent/</a>) and is used to allow GitLab to generate GitLab runners which are like Jenkins agents (<a href="https://docs.gitlab.com/runner/install/" rel="nofollow noreferrer">https://docs.gitlab.com/runner/install/</a>). Consider it like a broker or manager in this case. The agent would spawn the runners inside the cluster with the configuration you have setup.</p>
<p>For example, in my case, I have a node-pool dedicated specifically for gitlab runners. These nodes are more expensive to run, since they're higher-spec than the standard nodes used by the rest of the cluster, so I want to make sure only the GitLab runners spawn on there. I configure the Runner to have a node selector and toleration pointing at that specific node pool so the cluster scales up that node pool to put the runner on it.</p>
<p>The agent itself provides way more functionality than just spawning runners, but your question only asks about the GitLab agent and Runner. You can review the pages I've linked if you would like to find out more.</p>
