Access kubernetes API remotely

5/18/2020

I have a k8s cluster mounted in a Amazon EC2 instance, and i want configure the CI with GitLab. To do that, GitLab requested me the Kubernetes API URL.

I ran kubectl cluster-info to get the requested information and i can see 3 rows:

I suppose that need the Kubernetes master URL but, is a private IP. How i can expose the API correctly ?

Any ideas ?

-- ramiromd
gitlab
kubernetes
kubernetes-apiserver

1 Answer

5/18/2020

For better security keep the IPs of the kubernetes master nodes private and use LoadBalancer provided by AWS to expose the Kubernetes API Server. You could also configure TLS termination at the LoadBalancer.

-- Arghya Sadhu
Source: StackOverflow