Last active
July 16, 2018 11:36
-
-
Save gangliao/3989b216c083cabe7b4d3340945ff587 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/bin/sh | |
set -x | |
sudo systemctl stop docker | |
sudo ip link delete docker0 | |
sudo /usr/bin/cat > /usr/lib/systemd/system/docker.service << EOF | |
[Unit] | |
Description=Docker Application Container Engine | |
Documentation=http://docs.docker.io | |
[Service] | |
Environment="HTTP_PROXY=http://10.130.14.129:8080/" "NO_PROXY=localhost,127.0.0.1,10.142.104.73" | |
Environment="PATH=/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin" | |
EnvironmentFile=-/run/flannel/docker | |
ExecStart=/usr/bin/dockerd --insecure-registry=10.142.104.73:8043 --log-level=error \$DOCKER_NETWORK_OPTIONS | |
ExecReload=/bin/kill -s HUP \$MAINPID | |
Restart=on-failure | |
RestartSec=5 | |
LimitNOFILE=infinity | |
LimitNPROC=infinity | |
LimitCORE=infinity | |
Delegate=yes | |
KillMode=process | |
[Install] | |
WantedBy=multi-user.target | |
EOF | |
sudo systemctl enable docker | |
sudo systemctl daemon-reload | |
sudo systemctl start docker | |
sudo systemctl daemon-reload | |
sudo systemctl enable kubelet | |
sudo systemctl start kubelet | |
sudo systemctl status kubelet | |
sudo systemctl daemon-reload | |
sudo systemctl enable kube-proxy | |
sudo systemctl start kube-proxy | |
sudo systemctl status kube-proxy | |
ifconfig docker0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment