Kubernetes二进制部署CoreDNS遇到报错

DNS解析遇到If you don’t see a command prompt, try pressing enter.

Error attaching, falling back to logs: unable to upgrade connection: Forbidden (user=system:anonymous, verb=create, resource=nodes, subresource=proxy)

1、出现的报错问题

在这里插入图片描述

2、解决办法

为 system:anonymous 临时绑定一个 cluster-admin 的权限,即可解决报错。

[root@master01 k8s]#kubectl create clusterrolebinding system:anonymous --clusterrole=cluster-admin --user=system:anonymous

在这里插入图片描述