Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Enable iptables forward for kubernetes #2139

Merged
merged 1 commit into from
Jan 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions parts/k8s/kubernetesagentcustomdata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ write_files:
{{if .IsCoreOS}}
ExecStartPre=/bin/mv /tmp/kubectldir/hyperkube /opt/kubectl
ExecStart=/bin/chmod a+x /opt/kubectl
{{else}}
{{else}}
ExecStartPre=/bin/mv /tmp/kubectldir/hyperkube /usr/local/bin/kubectl
ExecStart=/bin/chmod a+x /usr/local/bin/kubectl
{{end}}
Expand Down Expand Up @@ -158,20 +158,20 @@ coreos:
command: "start"
content: |
# Note: Initiated as a service since there is no runcmd within CoreOS on cloud-config/Ignition
[Unit]
[Unit]
Description=Start provision setup service

[Service]
ExecStart=/opt/azure/containers/provision-setup.sh
{{else}}
runcmd:
- echo `date`,`hostname`, startruncmd>>/opt/m
- echo `date`,`hostname`, startruncmd>>/opt/m
- apt-mark hold walinuxagent{{GetKubernetesAgentPreprovisionYaml .}}
- echo `date`,`hostname`, preaptupdate>>/opt/m
- echo `date`,`hostname`, preaptupdate>>/opt/m
- apt-get update
- echo `date`,`hostname`, postaptupdate>>/opt/m
- echo `date`,`hostname`, postaptupdate>>/opt/m
- apt-get install -y apt-transport-https ca-certificates nfs-common
- echo `date`,`hostname`, aptinstall>>/opt/m
- echo `date`,`hostname`, aptinstall>>/opt/m
- systemctl enable rpcbind
- systemctl enable rpc-statd
- systemctl start rpcbind
Expand All @@ -183,6 +183,8 @@ runcmd:
- apt-get update
- apt-get install -y ebtables
- apt-get install -y docker-engine
- echo "ExecStartPost=/sbin/iptables -P FORWARD ACCEPT" >> /etc/systemd/system/docker.service.d/exec_start.conf
- systemctl daemon-reload
- echo `date`,`hostname`, postdockerinstall>>/opt/m
- systemctl restart docker
- mkdir -p /etc/kubernetes/manifests
Expand All @@ -193,5 +195,5 @@ runcmd:
- echo `date`,`hostname`, POST-APT-SYSTEMD-DAILY>>/opt/m
- apt-mark unhold walinuxagent
- mkdir -p /opt/azure/containers && touch /opt/azure/containers/runcmd.complete
- echo `date`,`hostname`, endruncmd>>/opt/m
- echo `date`,`hostname`, endruncmd>>/opt/m
{{end}}
2 changes: 2 additions & 0 deletions parts/k8s/kubernetesmastercustomdata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,8 @@ runcmd:
- retrycmd_if_failure apt-get update
- retrycmd_if_failure apt-get install -y ebtables
- retrycmd_if_failure apt-get install -y docker-engine
- echo "ExecStartPost=/sbin/iptables -P FORWARD ACCEPT" >> /etc/systemd/system/docker.service.d/exec_start.conf
- systemctl daemon-reload
- systemctl restart docker
- mkdir -p /etc/kubernetes/manifests
- usermod -aG docker {{WrapAsVariable "username"}}
Expand Down