• 华为鲲鹏麒麟安装K8S


    增加网络源

    [root@ecs-arm-ky-002 ~]# vim /etc/yum.repos.d/kubernetes.repo
    [kubernetes] name
    =Kubernetes Repo baseurl=https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-aarch64/ gpgcheck=0 gpgkey=https://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg enabled=1

    安装K8S

     yum install -y kubelet-1.18.2 kubeadm-1.18.2 kubectl-1.18.2 kubernetes-cni
     
    systemctl enable kubelet && sudo systemctl start kubelet

    也可以生成相应的离线文件

    yumdownloader kubelet-1.18.2 kubeadm-1.18.2 kubectl-1.18.2 kubernetes-cni --resolve --destdir=/root/k8s/

    安装:
    rpm -Uvh *.rpm

    sudo kubeadm init --image-repository registry.aliyuncs.com/google_containers --kubernetes-version v1.18.2 --apiserver-advertise-address 192.168.0.206 --pod-network-cidr=10.244.0.0/16 --token-ttl 0

    安装完成之后安装相应的日志操作

    部署网络:

    自己选择相应的CNI插件

    flannel git地址:https://github.com/flannel-io/flannel

    For Kubernetes v1.17+ kubectl apply -f https://raw.githubusercontent.com/flannel-io/flannel/master/Documentation/kube-flannel.yml

    wget https://kuboard.cn/install-script/calico/calico-3.13.1.yaml
    
    wget https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml  

    wget https://raw.githubusercontent.com/flannel-io/flannel/master/Documentation/kube-flannel.yml
    kubectl apply -f 相应的CNI插件

    查看K8S集群状态

    [root@ecs-arm-ky-001 ~]# kubectl get pod --all-namespaces
    NAMESPACE     NAME                                       READY   STATUS    RESTARTS   AGE
    kube-system   calico-kube-controllers-5b8b769fcd-glgpf   1/1     Running   0          9m50s
    kube-system   calico-node-llskl                          1/1     Running   0          9m50s
    kube-system   calico-node-rkhqh                          1/1     Running   0          9m50s
    kube-system   coredns-7ff77c879f-8pq6p                   1/1     Running   0          19m
    kube-system   coredns-7ff77c879f-mt9n6                   1/1     Running   0          76m
    kube-system   etcd-ecs-arm-ky-001                        1/1     Running   0          76m
    kube-system   kube-apiserver-ecs-arm-ky-001              1/1     Running   0          76m
    kube-system   kube-controller-manager-ecs-arm-ky-001     1/1     Running   0          76m
    kube-system   kube-proxy-5mwrs                           1/1     Running   0          76m
    kube-system   kube-proxy-wg4w7                           1/1     Running   0          37m
    kube-system   kube-scheduler-ecs-arm-ky-001              1/1     Running   0          76m
    [root@ecs-arm-ky-001 ~]# kubectl get nodes -o wide
    NAME             STATUS   ROLES    AGE   VERSION   INTERNAL-IP     EXTERNAL-IP   OS-IMAGE                                   KERNEL-VERSION              CONTAINER-RUNTIME
    ecs-arm-ky-001   Ready    master   76m   v1.18.2   192.168.0.206   <none>        Kylin Linux Advanced Server V10 (Tercel)   4.19.90-17.5.ky10.aarch64   docker://20.10.9
    ecs-arm-ky-002   Ready    <none>   37m   v1.18.2   192.168.0.208   <none>        Kylin Linux Advanced Server V10 (Tercel)   4.19.90-17.5.ky10.aarch64   docker://20.10.9
    [root@ecs-arm-ky-001 ~]#
  • 相关阅读:
    nginx 禁止访问某个目录
    ssh 无法链接的解决思路
    linux 时间修改(同步到时间服务器)
    BitNami Gitlab的重启问题
    gitlab push时报错
    VirtualBox 安装centos后无法上网
    VirtualBox 创建64位系统的问题
    NOIP2010 题解
    NOIP2011 题解
    NOIP2012 题解
  • 原文地址:https://www.cnblogs.com/tian880820/p/16057258.html
Copyright © 2020-2023  润新知