zoukankan      html  css  js  c++  java
  • 升级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 -
    
  • 相关阅读:
    图片垂直居中的方法(适合只有一行文字和图片)
    微信小程序 this.setData() 详解
    phpstorm 2017激活码(方法)
    WebSocket 协议 详解
    容器装不下内容时,显示滚动条
    Restore IP Addresses
    Reverse Linked List II
    Subsets II
    Decode Ways
    Gray Code
  • 原文地址:https://www.cnblogs.com/hsyw/p/14396073.html
Copyright © 2011-2022 走看看