<p>I want to integrate Kubernetes cluster configured in on-premises environment with gitlab.</p>

<p>When adding a cluster, I clicked Add Existing Cluster and filled in all other spaces, and the API URL entered the IP output by the following command.</p>

<pre><code>kubectl cluster-info | grep 'Kubernetes master' | awk '/http/ {print $NF}'
</code></pre>

<pre><code>https://10.0.0.xxx:6443
</code></pre>

<p>However, it did not proceed with the error "platform kubernetes api url is blocked: requests to the local network are not allowed".</p>

<p>I saw an article in the admin area to do a webhook check, but I'm on the gitlab website, and no matter where I find it, I can't find the admin area. I'm guessing that it only comes with gitlab to install.</p>

<p><a href="https://edenmal.moe/post/2019/GitLab-Kubernetes-Using-GitLab-CIs-Kubernetes-Cluster-feature/" rel="nofollow noreferrer">https://edenmal.moe/post/2019/GitLab-Kubernetes-Using-GitLab-CIs-Kubernetes-Cluster-feature/</a></p>

<p>When I saw and followed the example, I entered the API URL as "https: //kubernetes.default.svc.cluster.local: 443" and the cluster connection was established. But helm won't install.</p>

<p>So I tried to install helm on a Kubernetes cluster manually, but gitlab does not recognize helm.</p>

<p>What is the difference between the two API URLs above??</p>

<p>How can i solve it ??</p>

<p>As mentioned in comments, you are running your CI job on someone else's network. As such, it cannot talk to your private IPs in your own network. You will need to expose your kube-apiserver to the internet somehow. This is usually done using a LoadBalancer service called <code>kubernetes</code> that is created automatically. However that would only work if you have set up something that supports LoadBalancer services like MetalLB.</p>
