7

What is the correct way to install addons with Kubernetes 1.1? The docs aren't as clear as I'd like on this subject; they seem to imply that one should copy addons' yaml files to /etc/kubernetes/addons on master nodes, but I have tried this and nothing happens.

Additionally, for added confusion, the docs imply that addons are bundled with Kubernetes:

So the only persistent way to make changes in add-ons is to update the manifests on the master server. But still, 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.

So, how should I really install addons, f.ex. cluster-loadbalancing, with Kubernetes 1.1?

aknuds1
  • 65,625
  • 67
  • 195
  • 317

1 Answers1

4

... they seem to imply that one should copy addons' yaml files to /etc/kubernetes/addons on master nodes, but I have tried this and nothing happens.

This is only true if you are using one of the salt-based installation mechanisms.

So, how should I really install addons, f.ex. cluster-loadbalancing, with Kubernetes 1.1?

Most of the add-ons can be installed by just running kubectl create -f against the replication controller and service files for the add-on. You need to create the kube-system namespace first if you haven't already, and some of the add-ons (like dns) require you to fill in a few values in a jinja template that would otherwise be handled by salt.

Robert Bailey
  • 17,866
  • 3
  • 50
  • 58
  • A few example commands/scripts would be helpful. This is too high level, and still doesn't show me how to do it. Run `kubectl create -f` plus what? What do I need to run, install, download, copy, etc... before I run `kubectl create -f`? Docs and search results are not clear. – l p Apr 01 '17 at 01:50
  • Are you still using Kubernetes 1.1? ;) – Robert Bailey Apr 01 '17 at 05:37
  • Client 1.3.0. Server 1.4.3. According to `kubectl version` – l p Apr 01 '17 at 06:10
  • The addons can be found in directories underneath https://github.com/kubernetes/kubernetes/tree/master/cluster/saltbase/salt. As I said in the answer, some of them are templated (like https://github.com/kubernetes/kubernetes/blob/master/cluster/saltbase/salt/etcd/etcd.manifest) and others can just be run as-is. – Robert Bailey Apr 01 '17 at 07:19
  • By the way, we will be working on better add-on management as part of the cluster lifecycle work for the upcoming Kubernetes 1.7 release. So this should be much better in a few months. – Robert Bailey Apr 01 '17 at 07:20