本文介绍在龙芯架构上,以 loongnix-server 系统为基础,利用 kubeadm 快速部署 kubernetes 1.20.0 的操作步骤。
loongnix-server 操作系统
docker
yum install loongnix-release-kubernetes -yyum makecacheyum install cri-tools kubectl kubelet kubernetes-cni kubeadm docker-ce -y
修改 docker 默认仓库,指向龙芯容器镜像仓库https://cr.loongnix.cn
,可参考龙芯容器镜像仓库使用手册。
swapoff -asystemctl restart dockeriptables -Fiptables -Xiptables -Ziptables -t nat -Fiptables -t nat -Xiptables -t nat -Z
kubeadm init --image-repository cr.loongnix.cn/kubernetes --kubernetes-version 1.20.0 -v=5
[root@k8s-master1 ~]# kubectl get pods -ANAMESPACE NAME READY STATUS RESTARTS AGEkube-system coredns-7cb7cc6b47-fz245 0/1 ContainerCreating 0 12mkube-system coredns-7cb7cc6b47-xgzhj 0/1 ContainerCreating 0 12mkube-system etcd-k8s-master1 1/1 Running 0 12mkube-system kube-apiserver-k8s-master1 1/1 Running 0 12mkube-system kube-controller-manager-k8s-master1 1/1 Running 0 12mkube-system kube-proxy-pmg9d 1/1 Running 0 12mkube-system kube-scheduler-k8s-master1 1/1 Running 0 12m[root@k8s-master1 ~]# kubectl get nodesNAME STATUS ROLES AGE VERSIONk8s-master1 Ready control-plane,master 12m v1.20.0