Skip to content

Commit

Permalink
Disable firewalld/ufw in setup-k8s.sh
Browse files Browse the repository at this point in the history
Change-Id: I14a4ec3c6dc4c6a0ebb8170af0c96ab9fe9d419c
Partial-Bug: #1766035
  • Loading branch information
alexey-mr committed Apr 27, 2018
1 parent f2c1dd1 commit f284542
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
1 change: 1 addition & 0 deletions containers/setup-for-build.sh
Expand Up @@ -63,5 +63,6 @@ else
chkconfig firewalld off || echo 'WARNING: failed to disable firewall'
fi
iptables -F || echo 'WARNING: failed to flush iptables rules'
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
EOS
15 changes: 11 additions & 4 deletions kubernetes/setup-k8s.sh
Expand Up @@ -46,8 +46,12 @@ function disable_swap() {
}
function install_for_ubuntu() {
service ufw stop
iptables -F
service ufw stop || echo 'WARNING: failed to stop firewall service'
systemctl disable ufw || echo 'WARNING: failed to disable firewall'
iptables -F || echo 'WARNING: failed to flush iptables rules'
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" >/etc/apt/sources.list.d/kubernetes.list
Expand All @@ -61,8 +65,11 @@ function install_for_ubuntu() {
}
function install_for_centos() {
service firewalld stop
iptables -F
service firewalld stop || echo 'WARNING: failed to stop firewall service'
chkconfig firewalld off || echo 'WARNING: failed to disable firewall'
iptables -F || echo 'WARNING: failed to flush iptables rules'
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
cat > /etc/yum.repos.d/kubernetes.repo << EOF
[kubernetes]
Expand Down

0 comments on commit f284542

Please sign in to comment.