标签:admin pad precise add hostname check cert node rop
reference kubernetes添加不了google apt-key
deb http://us.archive.ubuntu.com/ubuntu/ xenial main restricted
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
deb http://us.archive.ubuntu.com/ubuntu/ xenial universe
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe
deb http://us.archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
deb http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu xenial-security main restricted
deb http://security.ubuntu.com/ubuntu xenial-security universe
deb http://security.ubuntu.com/ubuntu xenial-security multiverse
deb http://ppa.launchpad.net/tbfr/zabbix/ubuntu precise main
deb-src http://ppa.launchpad.net/tbfr/zabbix/ubuntu precise main
deb [arch=amd64] https://mirrors.ustc.edu.cn/kubernetes/apt kubernetes-xenial main
deb [arch=amd64] https://mirrors.ustc.edu.cn/kubernetes/apt kubernetes-xenial main
deb http://mirrors.aliyuncs.com/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.aliyuncs.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://mirrors.aliyuncs.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.aliyuncs.com/ubuntu/ xenial-proposed main restricted universe multiverse
deb http://mirrors.aliyuncs.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.aliyuncs.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://mirrors.aliyuncs.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://mirrors.aliyuncs.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://mirrors.aliyuncs.com/ubuntu/ xenial-proposed main restricted universe multiverse
deb-src http://mirrors.aliyuncs.com/ubuntu/ xenial-backports main restricted universe multiverse
reference kubeadm 搭建 kubernetes 集群
echo "192-168-43-134.master" > /etc/hostname
echo "127.0.0.1 192-168-43-134.master" >> /etc/hosts
sysctl kernel.hostname=192-168-43-134.master
images=(kube-proxy-amd64:v1.11.0 coredns:1.1.3 pause:3.1 kubedns-amd64:1.7 kube-scheduler-amd64:v1.11.0 kube-controller-manager-amd64:v1.11.0 kube-apiserver-amd64:v1.11.0 etcd-amd64:3.2.18 pause-amd64:3.1)
for imageName in ${images[@]} ; do
docker pull vickeywu/$imageName
docker tag vickeywu/$imageName k8s.gcr.io/$imageName
docker rmi vickeywu/$imageName
done
kubeadm reset
sudo swapoff -a
systemctl stop kubelet
systemctl enable kubelet
systemctl start kubelet
apt-get update
apt-get install -y kubelet kubeadm kubectl
kubeadm init --kubernetes-version=v1.11.0 --apiserver-advertise-address 192.168.43.131 --pod-network-cidr=10.244.0.0/16 --skip-preflight-checks
kubeadm join 192.168.43.131:6443 --token yepdrb.7le3m7v0lrzuqkbj --discovery-token-ca-cert-hash sha256:6594be2785a7e216fda80ccf5560924aa0c802f08afdc187006a711fb75b40eb
su vickey/root
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
echo "source <(kubectl completion bash)" >> ~/.bashrc
kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
kubeadm join 192.168.43.131:6443 --token yepdrb.7le3m7v0lrzuqkbj --discovery-token-ca-cert-hash sha256:6594be2785a7e216fda80ccf5560924aa0c802f08afdc187006a711fb75b40eb
docker pull vickeywu/flannel:v0.10.0-amd64
docker tag vickeywu/flannel:v0.10.0-amd64 quay.io/coreos/flannel:v0.10.0-amd64
docker rmi vickeywu/flannel:v0.10.0-amd64
标签:admin pad precise add hostname check cert node rop
原文地址:https://www.cnblogs.com/vickey-wu/p/9329135.html