I want to integrate Kubernetes cluster configured in on-premises environment with gitlab.
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.
kubectl cluster-info | grep 'Kubernetes master' | awk '/http/ {print $NF}'
https://10.0.0.xxx:6443
However, it did not proceed with the error "platform kubernetes api url is blocked: requests to the local network are not allowed".
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.
https://edenmal.moe/post/2019/GitLab-Kubernetes-Using-GitLab-CIs-Kubernetes-Cluster-feature/
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.
So I tried to install helm on a Kubernetes cluster manually, but gitlab does not recognize helm.
What is the difference between the two API URLs above??
How can i solve it ??
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 kubernetes
that is created automatically. However that would only work if you have set up something that supports LoadBalancer services like MetalLB.