I'd like to configure Kubernetes on a private machine to play around with Gitlab CI/CD tools. The purpose is merely experimenting with Gitlab for a few days.
Using this setup for production is out of question. I'd like your help to secure Kubernetes API. I don't need an hacker-proof solution, but at least I'd like the API not to be exposed to even naive malicious user. The machine is connected to a dedicated network so I can't imagine anything to be hacked other than an old just-reset machine which will be shutdown in a few days.
So far I have been able to setup Minikube, create a kube proxy and expose it to Gitlab. The integration has been successful.
However, I noticed that the Kubernetes API are exposed to anyone. For instance anyone can access https://my-ip.com:port/api/v1/namespaces/default/pods . How should I secure the APIs so that gitlab can connect to the cluster (following this method) but no one else without certificate nor token can access the cluster? I setup Gitlab with the CA Certificate and the Service Token but I guess it wouldn't have been needed since the Kubernetes API look public.