Adam
Adam

Reputation: 69

Installing coredns on GKE

New Amazon EKS clusters created with Kubernetes version 1.11 ship with CoreDNS as the default DNS. I was wondering if:

  1. GKE plans to do the same
  2. Has anyone posted instructions on how to install coredns in GKE

Upvotes: 1

Views: 4164

Answers (2)

j4ys0n
j4ys0n

Reputation: 730

coredns has an auto generating deployment script.

to install coredns and disable kube-dns, try this:

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

and then you can test it with this:

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

Upvotes: 0

Cristian Sanchez
Cristian Sanchez

Reputation: 131

If you want to changing it, there are several guide, for example this one.

Also, in this official page of Kubernetes you can find how to install CoreDNS instead of kube-dns.

TL:DR:

In Kubernetes version 1.10 and later:

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

In Kubernetes version 1.13 and later the CoreDNS feature gate is removed and CoreDNS is used by default

Upvotes: 1

Related Questions