Block ICMP trafic on kubernetes cluster GCP

Viewed 303

Hi everyone I need to block ICMP protocol in my kubernetes cluster in GCP, but there is no way to do that. Someone could helpme

1 Answers

GKE creates firewall rules automatically when creating the following resources:

GKE clusters, GKE Services, GKE Ingresses

Below firewall rules are automatically created for clusters.

gke-[cluster-name]-[cluster-hash]-master (Only for private clusters), gke-[cluster-name]-[cluster-hash]-ssh (Only for public clusters), gke-[cluster-name]-[cluster-hash]-vms, gke-[cluster-name]-[cluster-hash]-all.

To block ICMP protocol for cluster, Goto Console->VPC network->Firewall->Select your cluster related firewall rules which are allowing ICMP. Click on Edit and go to protocols and ports. Under Specified protocols and ports, Deselect other protocols or delete icmp from the list of other protocols.

You can also create custom firewall rules with high priority than automatically created firewall rules. Configuration data of custom firewall rules should be same as automatically created firewall rules except priority.

First method is easy compared to the second one.

Related