-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Feature: Kubernetes: Add cluster node
Add a new node to a Kubernetes cluster.
- A "node" is the Kubernetes term for a "machine" (virtual or otherwise) that the Kubernetes master can run containers on.
- Trello: https://trello.com/c/SUOjupid/123-kubernetes-add-machine-to-cluster
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.
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.
- 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
andkube-proxy.service
andflanneld.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/cockpit-project/cockpit/blob/master/pkg/kubernetes/examples/node.json
- To test run
kubectl create -f node.json
- https://github.com/scollier/SATraining/blob/master/configFlannel.md
Design wireframes go here. Usually these live in the cockpit-design repo, and are linked here.
- Add node button on dashboard wireframe: https://raw.githubusercontent.com/cockpit-project/cockpit-design/master/kubernetes/dashboard.png
Links to screenshots or documentation of other places this problem has been solved.
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)