<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                [TOC] 轉載:[https://jimmysong.io/kubernetes-handbook/practice/coredns.html](https://jimmysong.io/kubernetes-handbook/practice/coredns.html) ## 概述 CoreDNS可以在具有標準的Kube-DNS的Kubernetes集群中運行。作為Kubernetes 的插件使用,CoreDNS將從 Kubernetes集群中讀取區(zone)數據。它實現了為Kubernetes的DNS服務發現定義的規范:[Kubernetes DNS-Based Service Discovery](https://github.com/kubernetes/dns/blob/master/docs/specification.md)。 ## 部署CoreDNS 部署 CoreDNS 需要使用到官方提供的兩個文件[deploy.sh](https://github.com/coredns/deployment/blob/master/kubernetes/deploy.sh)和[coredns.yaml.sed](https://github.com/coredns/deployment/blob/master/kubernetes/coredns.yaml.sed)(這兩個文件已經放入manifest的coredns目錄中) `deploy.sh`是一個用于在已經運行kube-dns的集群中生成運行CoreDNS部署文件(manifest)的工具腳本。它使用`coredns.yaml.sed`文件作為模板,創建一個ConfigMap和CoreDNS的deployment,然后更新集群中已有的kube-dns 服務的selector使用CoreDNS的deployment。重用已有的服務并不會在服務的請求中發生沖突。 `deploy.sh`文件并不會刪除kube-dns的deployment或者replication controller。如果要刪除kube-dns,你必須在部署CoreDNS后手動的刪除kube-dns。 你需要仔細測試manifest文件,以確保它能夠對你的集群正常運行。這依賴于你的怎樣構建你的集群以及你正在運行的集群版本。 對manifest文件做一些修改是有比要的。 在最佳的案例場景中,使用CoreDNS替換Kube-DNS只需要使用下面的兩個命令: ``` $ ./deploy.sh | kubectl apply -f - $ kubectl delete --namespace=kube-system deployment kube-dns ``` 注意:我們建議在部署CoreDNS后刪除kube-dns。否則如果CoreDNS和kube-dns同時運行,服務查詢可能會隨機的在CoreDNS和kube-dns之間產生。 對于非RBAC部署,你需要編輯生成的結果yaml文件: 1. 從yaml文件的`Deployment`部分刪除`serviceAccountName: coredns` 2. 刪除`ServiceAccount`、`ClusterRole`和`ClusterRoleBinding`部分
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看