<p>How do you restrict access to a domain when using ingress? I want <code>www.example.com</code> to be public but <code>test.example.com</code> to be accessible only for a certain IP. I'm guessing I'll have to use iptables on the pods instead? I'm using GKE cluster.</p>
<pre><code>apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: test-ingress-web
spec:
  tls:
  - hosts:
  rules:
  - host: www.example.com
  - host: test.example.com
</code></pre>

user630702
<p>If you're using Ingress, you can configure Cloud Armor on top of it, here you have a guide about how to do it.
<a href="https://cloud.google.com/kubernetes-engine/docs/how-to/ingress-features#cloud_armor" rel="nofollow noreferrer">https://cloud.google.com/kubernetes-engine/docs/how-to/ingress-features#cloud_armor</a></p>
<p>This will allow you to block/allow source IPs.</p>
