• 升级coredns


    一、查看当前coredns版本

    [root@k8s-master01 ~]# kubectl get pod -n kube-system coredns-6ccb5d565f-8fjrk -oyaml | grep image
        image: coredns/coredns:1.8.0
        imagePullPolicy: IfNotPresent
        image: coredns/coredns:1.8.0
    

    二、升级

    2.1、coredns介绍

    # coredns官网:https://github.com/coredns/coredns
    # 老版本用:kube-dns
    # 新版的都用:coredns3
    
    
    # 部署文档:https://github.com/coredns/deployment/tree/master/kubernetes
    

    2.2、备份原来的cm、deploy、clusterrole、clusterrolebinding

    [root@k8s-master01 ~]# kubectl get cm -n kube-system coredns -oyaml > coredns-config.yaml
    [root@k8s-master01 ~]# kubectl get deploy -n kube-system coredns -oyaml > coredns-controllers.yaml
    [root@k8s-master01 ~]# kubectl get clusterrole system:coredns -oyaml > coredns-clusterrole.yaml
    [root@k8s-master01 ~]# kubectl get clusterrolebinding  system:coredns -oyaml > coredns-clusterrolebinding.yaml
    

    2.3、升级

    # 1、下载文件
    [root@k8s-master01 ~]# git clone https://github.com/coredns/deployment.git
    
    # 2、升级
    [root@k8s-master01 ~]# cd deployment/kubernetes/
    [root@k8s-master01 kubernetes]# ./deploy.sh -s | kubectl apply -f -
    
  • 相关阅读:
    字串变换
    单词接龙
    二叉搜索树
    搜索专题(未完)
    单调栈
    单调队列练习(切蛋糕&好消息,坏消息)
    队列专题
    滑动窗口/【模板】单调队列
    Linux下如何查看硬件信息?
    Git 居然可以用来跟女神聊天?
  • 原文地址:https://www.cnblogs.com/hsyw/p/14396073.html
Copyright © 2020-2023  润新知