GKE network policies can be used to manage the communication between cluster workloads such as Pods and Services. The network policy can be considered a pod-level firewall. For more information on GKE network policies, see the GCP documentation.
References:
https://cloud.google.com/kubernetes-engine/docs/how-to/network-policy
In GCP Console -
In Terraform -
References:
https://registry.terraform.io/providers/hashicorp/google/3.78.0/docs/resources/container_cluster