Created
August 11, 2023 09:30
-
-
Save kkbruce/ada5a05c5776ab4bddeba3282c724d98 to your computer and use it in GitHub Desktop.
Set Windows Firewall for Windows Node for Kubernetes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Reference: https://kubernetes.io/docs/reference/networking/ports-and-protocols/ | |
# Control plane Firewall rules | |
New-NetFirewallRule -DisplayName "Kubernetes API server" -Direction Inbound -Action Allow -Protocol TCP -LocalPort 6443 | |
New-NetFirewallRule -DisplayName "etcd server client API" -Direction Inbound -Action Allow -Protocol TCP -LocalPort 2379-2380 | |
New-NetFirewallRule -DisplayName "Kubelet API" -Direction Inbound -Action Allow -Protocol TCP -LocalPort 10250 | |
New-NetFirewallRule -DisplayName "kube-scheduler" -Direction Inbound -Action Allow -Protocol TCP -LocalPort 10259 | |
New-NetFirewallRule -DisplayName "kube-controller-manager" -Direction Inbound -Action Allow -Protocol TCP -LocalPort 10257 | |
# Worker node Firewall rules | |
New-NetFirewallRule -DisplayName "Kubelet API" -Direction Inbound -Action Allow -Protocol TCP -LocalPort 10250 | |
New-NetFirewallRule -DisplayName "NodePort Services" -Direction Inbound -Action Allow -Protocol TCP -LocalPort 30000-32767 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment