如何在 Kubernetes 的裸机安装上激活插件?

How to activate an Addon on a bare-metal installation of Kubernetes?

来自documentation

Cluster add-ons are Services and Replication Controllers (with pods) that are shipped with the Kubernetes binaries and are considered an inherent part of the Kubernetes clusters. [...] On the cluster, the add-ons are kept in /etc/kubernetes/addons on the master node, in yaml files (json is not supported at the moment). [...] users are discouraged to do it on their own - they should rather wait for a new release of Kubernetes that will also contain new versions of add-ons.

我的 kubernetes 安装程序是 fedeora 上的 运行,它是通过 yum 安装的。版本是

Client Version: version.Info{Major:"1", Minor:"1+", GitVersion:"v1.1.0-alpha.0.2175+b6f18c7ce08714", GitCommit:"b6f18c7ce08714c8d4f6019463879a164a41750e", GitTreeState:"clean"}
Server Version: version.Info{Major:"1", Minor:"1+", GitVersion:"v1.1.0-alpha.0.2175+b6f18c7ce08714", GitCommit:"b6f18c7ce08714c8d4f6019463879a164a41750e", GitTreeState:"clean"}

奇怪的是,文件夹 /etc/kubernetes/addons/ 不存在。

我想激活 sky-dns 插件。我已经尝试阅读所有可用的文档,但我仍然不清楚:

如何正确安装和激活插件?最好是这样它将来会收到自动更新?

首先,从版本号上看不出你的版本是什么运行。 Github shows a v1.1.0-alpha.1 release and a v1.1.0-alpha.0 tag but nothing named v1.1.0-alpha. Also note that neither of those releases were ever marked as "latest" or "released" meaning that they are not suitable for running in production and may contain egregious bugs (they are alpha quality after all). The latest stable release is v1.1.3 如果您想安装它。

其次,在裸机安装中,集群附加组件不会自动添加。如果您按照 getting started guides, the turn-key solutions will deploy the cluster add-ons automatically. The most important cluster add-on is DNS, and you can follow the manual instructions 之一将其安装在您的集群上。