Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding iptables fix for issue with kube-proxy requiring a chain creat…
…ed by kubelet. This is intended to be a stop-gap until we can do the necessary work to run kubelet on the masters.
- Loading branch information
1 parent
a565726
commit b84aeae
Showing
3 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/sh | ||
|
||
# add the chain, note that adding twice is ok as it will just error. | ||
/sbin/iptables -t nat -N KUBE-MARK-DROP | ||
|
||
# need to check the creation of the rule to ensure we only create it once. | ||
if ! /sbin/iptables -t nat -C KUBE-MARK-DROP -j MARK --set-xmark 0x8000/0x8000 &> /dev/null; then | ||
/sbin/iptables -t nat -A KUBE-MARK-DROP -j MARK --set-xmark 0x8000/0x8000 | ||
fi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[Unit] | ||
Description=Apply iptables rule for KUBE-MARK-DROP | ||
After=network.target | ||
|
||
[Service] | ||
Type=oneshot | ||
ExecStart=/usr/local/bin/kube-proxy-iptables-fix.sh | ||
RemainAfterExit=true | ||
|
||
[Install] | ||
WantedBy=multi-user.target |