<p>Is there any way to limit the access to Kubernetes Service of type LoadBalancer from outside the cluster?</p>
<p>I would like to expose my database's pod to the Internet using the LoadBalancer service that would be accessible only for my external IP address.</p>
<p>My Kubernetes cluster runs on GKE.</p>

Mikolaj
<p>You can use <code>loadBalancerSourceRanges</code> to filter load balanced traffic as mentioned <a href="https://cloud.google.com/kubernetes-engine/docs/concepts/security-overview#filtering_load_balanced_traffic" rel="noreferrer">here</a>.</p>
<p>Here is the simple example of Service in front of Nginx Ingress controllers:</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  labels:
    app.kubernetes.io/component: controller
    app.kubernetes.io/instance: external
    app.kubernetes.io/name: ingress-nginx
  name: external-ingress-nginx-controller
  namespace: kube-ingress
spec:
  loadBalancerSourceRanges:
  - &lt;YOUR_IP_1&gt;
  - &lt;YOUR_IP_2&gt;
  - &lt;YOUR_IP_3&gt;
  ports:
  - name: https
    nodePort: 32293
    port: 443
    targetPort: https
  selector:
    app.kubernetes.io/component: controller
    app.kubernetes.io/instance: external
    app.kubernetes.io/name: ingress-nginx
  type: LoadBalancer
</code></pre>
