Skip to content

Instantly share code, notes, and snippets.

@gongzili456
Last active August 22, 2017 08:37
Show Gist options
  • Save gongzili456/37d1486f8a586493eb4d44185a686515 to your computer and use it in GitHub Desktop.
Save gongzili456/37d1486f8a586493eb4d44185a686515 to your computer and use it in GitHub Desktop.
# 1. install shadowsocks
sudo pip install shadowsocks
sslocal -s 服务器域名或IP -p 服务器端口号 -k “密码” -l 1080 -t 600 -m rc4-md5
# append proxy=socks5://127.0.0.1:1080 to /etc/yum.conf
# update iptables to 1.4.21
wget http://ftp.netfilter.org/pub/iptables/iptables-1.4.21.tar.bz2
tar -xjf iptables-1.4.21.tar.bz2
cd iptables-1.4.21
sudo yum -y install gcc gcc-c++
./configure
make & sudo make install
#先关闭iptables
service iptables stop
#进入相应目录,并覆盖相关文件
cd /usr/local/sbin
cp /usr/local/sbin/iptables /sbin/
cp /usr/local/sbin/iptables-restore /sbin/
cp /usr/local/sbin/iptables-save /sbin/
# --------------------
# config k8s mirro
sudo touch /etc/yum.repos.d/kubernetes.repo
cat <<EOF > /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg
https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
EOF
setenforce 0
yum install -y kubelet kubeadm
systemctl enable kubelet && systemctl start kubelet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment