【问题标题】:Installing coredns on GKE在 GKE 上安装 coredns
【发布时间】:2019-03-12 13:08:17
【问题描述】:

使用 Kubernetes 1.11 版创建的新 Amazon EKS 集群附带 CoreDNS 作为默认 DNS。我想知道是否:

  1. GKE 计划这样做
  2. 是否有人发布了有关如何在 GKE 中安装 coredns 的说明

【问题讨论】:

标签: google-cloud-platform google-kubernetes-engine coredns


【解决方案1】:

如果你想改变它,有几个指南,example this one

另外,在这个 Kubernetes 官方页面,你可以找到how to install CoreDNS instead of kube-dns

TL:DR:

在 Kubernetes 1.10 及更高版本中:

kubeadm upgrade apply v1.11.0 --feature-gates=CoreDNS=true

在 Kubernetes 1.13 及更高版本中,CoreDNS 功能门被移除,默认使用 CoreDNS

【讨论】:

【解决方案2】:

coredns 有一个自动生成的部署脚本。

要安装 coredns 并禁用 kube-dns,试试这个:

git clone https://github.com/coredns/deployment.git
cd deployment/kubernetes
./deploy.sh > corends-deployment.yaml
kubectl apply -f corends-deployment.yaml
kubectl scale --replicas=0 deployment/kube-dns-autoscaler --namespace=kube-system
kubectl scale --replicas=0 deployment/kube-dns --namespace=kube-system

然后你可以用这个来测试它:

kubectl create -f https://k8s.io/examples/admin/dns/busybox.yaml
kubectl exec -ti busybox -- nslookup kubernetes.default

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-08-23
    • 1970-01-01
    • 1970-01-01
    • 2019-12-12
    • 2020-12-25
    • 1970-01-01
    • 2021-05-07
    • 2019-01-14
    相关资源
    最近更新 更多