Skip to content

Commit 85def9c

Browse files
committed
Fix worker node ips
1 parent 66e3822 commit 85def9c

File tree

3 files changed

+112
-56
lines changed

3 files changed

+112
-56
lines changed

templates/test/ci/cluster-template-prow-azl3.yaml

Lines changed: 33 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

templates/test/ci/cluster-template-prow-ci-version-azl3.yaml

Lines changed: 33 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

templates/test/ci/prow-azl3/patches/kubeadm-config-template-azl3.yaml

Lines changed: 46 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,37 +8,65 @@
88
set -o pipefail
99
set -o errexit
1010
11-
# Install ca-certificates packages for Azure Linux
12-
tdnf install -y ca-certificates ca-certificates-legacy
13-
update-ca-trust
14-
1511
# Allow Azure service IP addresses (required for Azure resources)
1612
iptables -A INPUT -s 168.63.129.16 -j ACCEPT
1713
iptables -A OUTPUT -d 168.63.129.16 -j ACCEPT
1814
19-
# Kubernetes API Server (port 6443) - bound to all IPv6 interfaces, needs external access
20-
iptables -A INPUT -p tcp --dport 6443 -j ACCEPT
15+
# Allow localhost traffic (required for many localhost-bound services)
16+
iptables -A INPUT -i lo -j ACCEPT
17+
iptables -A OUTPUT -o lo -j ACCEPT
18+
19+
# Allow established and related connections
20+
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
21+
iptables -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
22+
23+
# SSH (port 22) - bound to all interfaces, needs external access
24+
# iptables -A INPUT -p tcp --dport 22 -j ACCEPT
25+
26+
# Kubelet API (port 10250) - bound to all IPv6 interfaces, needs cluster access
27+
iptables -A INPUT -p tcp --dport 10250 -j ACCEPT
28+
29+
# kube-proxy (port 10256) - bound to all IPv6 interfaces, needs cluster access
30+
# iptables -A INPUT -p tcp --dport 10256 -j ACCEPT
31+
32+
# Calico networking requirements
33+
# Calico Typha (port 5473) - bound to all IPv6 interfaces, needs cluster access
34+
iptables -A INPUT -p tcp --dport 5473 -j ACCEPT
35+
36+
# VXLAN for overlay networking (port 4789 UDP) - bound to all interfaces
37+
iptables -A INPUT -p udp --dport 4789 -j ACCEPT
2138
22-
# etcd server communication - external access needed for cluster communication
23-
# Port 2379 is bound to node IP (10.0.0.5), needs cluster access
24-
iptables -A INPUT -p tcp --dport 2379 -j ACCEPT
25-
# Port 2380 is bound to node IP (10.0.0.5), needs cluster access
26-
iptables -A INPUT -p tcp --dport 2380 -j ACCEPT
27-
# Port 2381 is localhost only, no external rule needed
39+
# Calico metrics ports (29603, 29605) - bound to all IPv6 interfaces
40+
# iptables -A INPUT -p tcp --dport 29603 -j ACCEPT
41+
# iptables -A INPUT -p tcp --dport 29605 -j ACCEPT
42+
43+
# BGP for node-to-node communication (port 179) - not in netstat but needed for Calico
44+
iptables -A INPUT -p tcp --dport 179 -j ACCEPT
45+
46+
# IP-in-IP protocol for Calico
47+
# iptables -A INPUT -p 4 -j ACCEPT
2848
29-
# Allow traffic to Kubernetes service network (10.96.0.0/12) - CRITICAL: required for pod-to-service communication
49+
# DHCP client (port 68 UDP) - for IP assignment
50+
# iptables -A INPUT -p udp --dport 68 -j ACCEPT
51+
52+
# NTP (port 323 UDP) - for time synchronization
53+
# iptables -A INPUT -p udp --dport 323 -j ACCEPT
54+
55+
# Allow ICMP for connectivity checks
56+
# iptables -A INPUT -p icmp -j ACCEPT
57+
58+
# Allow traffic to Kubernetes service network (10.96.0.0/12) - required for pod-to-service communication
3059
iptables -A OUTPUT -d 10.96.0.0/12 -j ACCEPT
3160
iptables -A INPUT -s 10.96.0.0/12 -j ACCEPT
3261
62+
# Allow traffic to/from Calico pod network (192.168.0.0/16) - required for pod-to-pod communication
63+
iptables -A OUTPUT -d 192.168.0.0/16 -j ACCEPT
64+
iptables -A INPUT -s 192.168.0.0/16 -j ACCEPT
65+
3366
# Allow traffic to/from node network (10.1.0.0/24) - required for node-to-node communication
3467
iptables -A OUTPUT -d 10.1.0.0/24 -j ACCEPT
3568
iptables -A INPUT -s 10.1.0.0/24 -j ACCEPT
3669
37-
# Allow traffic to/from Calico pod network - more restrictive than full 192.168.0.0/16
38-
# Only allow the specific pod CIDR ranges that Calico actually uses
39-
iptables -A OUTPUT -d 192.168.0.0/24 -j ACCEPT
40-
iptables -A INPUT -s 192.168.0.0/24 -j ACCEPT
41-
4270
# Save the rules following Azure Linux 3 approach
4371
iptables-save > /etc/systemd/scripts/ip4save
4472
path: /tmp/azl3-setup.sh

0 commit comments

Comments
 (0)