kubernetes: Can't upgrade to 1.16.0: [ERROR CoreDNSUnsupportedPlugins]: there are unsupported plugins in the CoreDNS

kubeadm upgrade plan
[upgrade/config] Making sure the configuration is correct:
[upgrade/config] Reading configuration from the cluster...
[upgrade/config] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -oyaml'
[preflight] Running pre-flight checks.
[preflight] Some fatal errors occurred:
        [ERROR CoreDNSUnsupportedPlugins]: there are unsupported plugins in the CoreDNS Corefile
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
To see the stack trace of this error execute with --v=5 or higher

Any ideas how to solve this?

kubectl get nodes -o wide
host1  Ready    master   207d   v1.16.0   10.10.0.10    <none>        Ubuntu 18.04.3 LTS   4.15.0-64-generic   docker://18.6.1

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 4
  • Comments: 34 (25 by maintainers)

Most upvoted comments

The preflight check is showing CoreDNSUnsupportedPlugins due to the presence of the proxy plugin, as it has been deprecated. The forward plugin is to be used in its place.

If the Corefile is the same as you’ve mentioned here, you can use the --ignore-preflight-errors=CoreDNSUnsupportedPlugins while upgrading. The proxy plugin will be replaced to use forward automatically.

Thanks, Just to summarize, there are two issues raised here:

  1. There is a bug in kubeadm’s CoreDNS configuration migration preflight check. When the proxy plugin is in use, the preflight check falsely alerts that the proxy plugin is not supported by the configuration migration when in fact it is - the migration will automatically replace proxy with the forward plugin. The workaround for this issue now is to ignore the false warning - i.e. skip the preflight check.
  2. For plugins that are actually not supported by the configuration migrator (e.g. hosts for now), the warning is cryptic and should be expanded/rephrased to more clearly convey the following:
    • The corefile contains plugins that kubeadm/CoreDNS does not know how to migrate. A list of those plugins should be provided in the preflight check message.
    • To be safe, each plugin listed should be manually verified for compatibility with the newer version of CoreDNS. Once ready, the upgrade can be initiated by skipping the preflight check. During the upgrade, kubeadm will migrate the configuration while leaving the listed plugin configs untouched, but cannot guarantee that they will work with the newer version of CoreDNS.
    • Perhaps a link to more detailed documentation if it gets too hard to succinctly explain this (could go in coredns/corefile-migration).

I think improving the message is fine or even enumerating which plugins.

I don’t think hosts plugin is unsupported by Coredns, unless I’m missing something.

Hosts is not currently supported by the corefile migration library. However, the presence of a plugin that is not supported by migration library should not be preventing the kubeadm upgrade from proceeding if you use the --ignore-preflight-errors=CoreDNSUnsupportedPlugins flag, per comment above.