Skip to content

Feature: Kubernetes: Add cluster node

Stef Walter edited this page May 12, 2015 · 13 revisions

Add a new node to a Kubernetes cluster.

Notes

Stories

Phillip J. Fry leads a small IT at a moderately sized firm. His company has a modest data center.

Phillip wants to run application 'Poppler.io'. In order to meet regulatory requirements he needs to run the application 'in house'. Kubernetes has become the primary mechanism with which to deploy these new containerized applications like 'Poppler.io'. He needs to increase the capacity of his cluster in order to accommodate the new application.

Hermes Conrad is the VP of engineering at a large corporation.

Hermes is exploring Kubernetes as a way to orchestrate containers. He has just setup a Kubernetes master, and wants to add further machines. Hermes has no deep knowledge of Kubernetes, but Docker was seemed easy to discover hands-on, and wants to do the same here.

Workflows

Phillip:

  • Opens the Kubernetes dashboard in Cockpit
  • Sees list of current nodes
  • Presses a button to add a new node to the list
  • Prompted for address. Phillip types in an Atomic Host address. Cockpit tries to connect.
  • If the fingerprint of the remote machine is not known to Cockpit, then this is displayed, confirmation required.
  • Prompted for credentials if his Cockpit credentials do not work on the new machine.
  • If cockpit-bridge is not installed on the machine -> stop.
  • Cockpit configures the relevant services on the machine, adds it to the cluster.
  • The new node is listed in the list of nodes on the dashboard.
  • Done

Hermes:

  • If no machines have yet been added to the cluster, an appropriate message is displayed in place of the list of nodes.
  • Work flow as above.

Implementation Notes and Technical Limitations

  • It is currently out of scope to install software via Cockpit.
  • The following software needs to be installed and available on the machine in question.
    • kubernetes (including kubelet, kube-proxy)
    • flannel
    • cockpit-bridge
  • Configure /etc/kubernetes/kubelet
    • KUBELET_ADDRESS field
    • Remove KUBELET_HOSTNAME
  • Configure FLANNEL_ETCD to point to master etcd.
  • The kubelet.service and kube-proxy.service and flanneld.service need to be started and enabled to run at boot.
    • systemctl enable kubelet kube-proxy flanneld
    • systemctl start kubelet kube-proxy flanneld
  • It is currently out of scope to setup certificates, or security for the cluster: later work.
  • Out of scope: Configuring backing mounts for persistent volume storage ...
  • We should be able to get the rough capacity information the Kubernetes wants in its JSON node definition: Memory, CPUs
  • To add a machine to the cluster the following JSON is needed:
  • https://github.com/scollier/SATraining/blob/master/configFlannel.md

Wireframes

Design wireframes go here. Usually these live in the cockpit-design repo, and are linked here.

Prior art

Links to screenshots or documentation of other places this problem has been solved.

Feedback

Please give feedback on the above! This is the place where those not working on the feature can provide insight, questions, limitations, notes etc.

  • If you are going to try to configure kubelet and kube-proxy, you make need to configure a networking controller as well (aka flannel on bare metal) (Eric Paris)

    • Thanks, added. Flannel seems to pull configuration from etcd. Does such configuration come by default? Part of cluster setup (separate workflow)? (Stef)
  • Run cAdvisor on the node? (Federico)

    • cAdvisor is now part of kubelet. Yay. (Stef)
  • ... (sign name)

Clone this wiki locally