arm 端配置k8s
第一步需要安装 kubelet、kubeadm 和 kubectl(所有节点执行)sudo vi /etc/apt/sources.listdeb https://mirrors.aliyun.com/kubernetes/apt/ kubernetes-xenial maindeb http://mirrors.ustc.edu.cn/kubernetes/apt kubernetes-xeni
第一步需要安装 kubelet、kubeadm 和 kubectl(所有节点执行)
sudo vi /etc/apt/sources.list
deb https://mirrors.aliyun.com/kubernetes/apt/ kubernetes-xenial main
deb http://mirrors.ustc.edu.cn/kubernetes/apt kubernetes-xenial main
sudo curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
sudo curl https://mirrors.aliyun.com/kubernetes/apt/doc/apt-key.gpg | sudo apt-key add -
安装kubelet、kubeadm 和 kubectl 最新版本
sudo apt-get install -y kubelet kubeadm kubectl --allow-unauthenticated
安装kubelet、kubeadm 和 kubectl 指定版本
sudo apt-get install -y kubelet=1.18.1-00 kubeadm=1.18.1-00 kubectl=1.18.1-00
启动 kubelet 服务
sudo systemctl enable kubelet.service
arm 节点需要自己手动下载相关镜像
sudo docker pull mirrorgcrio/kube-apiserver-arm64:v1.18.1
sudo docker pull mirrorgcrio/kube-controller-manager-arm64:v1.18.1
sudo docker pull mirrorgcrio/kube-scheduler-arm64:v1.18.1
sudo docker pull mirrorgcrio/kube-proxy-arm64:v1.18.1
sudo docker pull mirrorgcrio/etcd-arm64:3.4.3-0
sudo docker pull mirrorgcrio/pause-arm64:3.2
sudo docker pull coredns/coredns:coredns-arm64
sudo docker pull registry.cn-shanghai.aliyuncs.com/leozhanggg/flannel:v0.12.0-amd64
sudo docker pull registry.cn-shanghai.aliyuncs.com/leozhanggg/flannel:v0.12.0-arm64
sudo docker tag mirrorgcrio/kube-apiserver-arm64:v1.18.1 registry.aliyuncs.com/google_containers/kube-apiserver:v1.18.1
sudo docker tag mirrorgcrio/kube-scheduler-arm64:v1.18.1 registry.aliyuncs.com/google_containers/kube-scheduler:v1.18.1
sudo docker tag mirrorgcrio/kube-controller-manager-arm64:v1.18.1 registry.aliyuncs.com/google_containers/kube-controller-manager:v1.18.1
sudo docker tag mirrorgcrio/kube-proxy-arm64:v1.18.1 registry.aliyuncs.com/google_containers/kube-proxy:v1.18.1
sudo docker tag mirrorgcrio/etcd-arm64:3.4.3-0 registry.aliyuncs.com/google_containers/etcd:3.4.3-0
sudo docker tag mirrorgcrio/pause-arm64:3.2 registry.aliyuncs.com/google_containers/pause:3.2
sudo docker tag coredns/coredns:coredns-arm64 registry.aliyuncs.com/google_containers/coredns:1.6.7
sudo docker tag registry.cn-shanghai.aliyuncs.com/leozhanggg/flannel:v0.12.0-amd64 quay.io/coreos/flannel:v0.12.0-amd64
sudo docker tag registry.cn-shanghai.aliyuncs.com/leozhanggg/flannel:v0.12.0-arm64 quay.io/coreos/flannel:v0.12.0-arm64
初始化主节点
sudo kubeadm init --kubernetes-version=1.18.1 --apiserver-advertise-address=192.168.192.33 --image-repository registry.aliyuncs.com/google_containers --service-cidr=10.10.0.0/16 --pod-network-cidr=10.122.0.0/16 --ignore-preflight-errors=Swap
sudo mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
配置网络
sudo kubectl apply -f https://docs.projectcalico.org/manifests/calico.yaml
主节点安装管理界面
https://www.kuboard.cn/install/install-dashboard.html#%E5%AE%89%E8%A3%85
更多推荐
所有评论(0)