Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add section on upgrading CoreDNS #12909

Merged
merged 1 commit into from
Mar 19, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions content/en/docs/tasks/administer-cluster/coredns.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ deployment, or by using tools like kubeadm that will deploy and upgrade the clus
For manual deployment or replacement of kube-dns, see the documentation at the
[CoreDNS GitHub project.](https://github.com/coredns/deployment/tree/master/kubernetes)

## Upgrading an existing cluster with kubeadm
## Migrating to CoreDNS

### Upgrading an existing cluster with kubeadm

In Kubernetes version 1.10 and later, you can also move to CoreDNS when you use `kubeadm` to upgrade
a cluster that is using `kube-dns`. In this case, `kubeadm` will generate the CoreDNS configuration
Expand All @@ -53,7 +55,8 @@ customizations after the new ConfigMap is up and running.
If you are running CoreDNS in Kubernetes version 1.11 and later, during upgrade,
your existing Corefile will be retained.

## Installing kube-dns instead of CoreDNS with kubeadm

### Installing kube-dns instead of CoreDNS with kubeadm

{{< note >}}
In Kubernetes 1.11, CoreDNS has graduated to General Availability (GA)
Expand All @@ -69,6 +72,14 @@ kubeadm init --feature-gates=CoreDNS=false

For versions 1.13 and later, follow the guide outlined [here](/docs/reference/setup-tools/kubeadm/kubeadm-init-phase#cmd-phase-addon).

## Upgrading CoreDNS

CoreDNS is available in Kubernetes since v1.9.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this use a feature-state shortcode?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you suggesting something like this @sftim ?

{{< feature-state for_k8s_version="v1.9" state="stable" >}}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's an option, yeah. It's not always appropriate; do you think it's the right fit here @rajansandeep?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sftim I'm sorry, I don't understand the significance of the change suggested. What does it mean?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, sorry @rajansandeep. Here's the style guide topic on using feature-state shortcodes.

It's a snag; we could merge this as-is if we want and then tidy up in a later PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sftim Thank you for the link. I guess that it wouldn't make sense to add it here as CoreDNS has progressed from alpha in 1.9 to default in 1.13. Anyways, we can clean up later if it is required.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd still call out stable features, especially if they're newly stable in the last release or the one before it.
(There's no clear process for dropping those markers later though).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And, to be clear, I'm fine with this PR getting merged.

You can check the version of CoreDNS shipped with Kubernetes and the changes made to CoreDNS [here](https://github.com/coredns/deployment/blob/master/kubernetes/CoreDNS-k8s_version.md).

CoreDNS can be upgraded manually in case you want to only upgrade CoreDNS or use your own custom image.
There is a helpful [guideline and walkthrough](https://github.com/coredns/deployment/blob/master/kubernetes/Upgrading_CoreDNS.md) available to ensure a smooth upgrade.

## Tuning CoreDNS

When resource utilisation is a concern, it may be useful to tune the configuration of CoreDNS. For more details, check out the
Expand Down