简体   繁体   中英

How to create firewall for kubernetes cluster in google container engine

This may be an extremely simple question, but I can't seem to figure out how to only allow my kubernetes cluster to be accessible ONLY from my office IP.

In my firewall rules I see my rules for the gke nodes to be 2 internal ips and my office ip.

I also see a firewall rule for an external ip range that I don't see in my external IP addresses. That IP address also doesn't appear in my load balancer IPs...

Finally I have a loadbalancing firewall rule that allows the external IP ranges from the load balancing tab, which are my kubernetes ingress rules.

Long story short, how do I only allow my kubernetes cluster to be only accessible from my office IP?

This isn't currently possible in Google Container Engine.

You don't see any firewall rules for your cluster control plane because it isn't running inside your cloud project. Therefore the endpoint for your cluster won't show up in your networking views and you cannot add firewall rules to restrict access to it.

This is a shortcoming that the team is aware of and we hope to be able to provide a solution for you in the future.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM