Skip to content

Commit

Permalink
Adding new directory and file for 1.14 and above by removing --allow-…
Browse files Browse the repository at this point in the history
…privileged=true flag (#327)
  • Loading branch information
bhks authored and M00nF1sh committed Sep 5, 2019
1 parent 5335ea8 commit c1ae2f3
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
21 changes: 21 additions & 0 deletions files/1.14/kubelet.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[Unit]
Description=Kubernetes Kubelet
Documentation=https://github.com/kubernetes/kubernetes
After=docker.service
Requires=docker.service

[Service]
ExecStartPre=/sbin/iptables -P FORWARD ACCEPT
ExecStart=/usr/bin/kubelet --cloud-provider aws \
--config /etc/kubernetes/kubelet/kubelet-config.json \
--kubeconfig /var/lib/kubelet/kubeconfig \
--container-runtime docker \
--network-plugin cni $KUBELET_ARGS $KUBELET_EXTRA_ARGS

Restart=on-failure
RestartForceExitStatus=SIGPIPE
RestartSec=5
KillMode=process

[Install]
WantedBy=multi-user.target
6 changes: 5 additions & 1 deletion install-worker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,11 @@ sudo mkdir -p /etc/kubernetes/kubelet
sudo mkdir -p /etc/systemd/system/kubelet.service.d
sudo mv $TEMPLATE_DIR/kubelet-kubeconfig /var/lib/kubelet/kubeconfig
sudo chown root:root /var/lib/kubelet/kubeconfig
sudo mv $TEMPLATE_DIR/kubelet.service /etc/systemd/system/kubelet.service
if [ "$KUBERNETES_MINOR_VERSION" = "1.14" ]; then
sudo mv $TEMPLATE_DIR/1.14/kubelet.service /etc/systemd/system/kubelet.service
else
sudo mv $TEMPLATE_DIR/kubelet.service /etc/systemd/system/kubelet.service
fi
sudo chown root:root /etc/systemd/system/kubelet.service
sudo mv $TEMPLATE_DIR/$KUBELET_CONFIG /etc/kubernetes/kubelet/kubelet-config.json
sudo chown root:root /etc/kubernetes/kubelet/kubelet-config.json
Expand Down

0 comments on commit c1ae2f3

Please sign in to comment.