You are browsing a read-only backup copy of Wikitech. The primary site can be found at


From Wikitech-static
Revision as of 11:55, 3 May 2017 by imported>Muehlenhoff (Add some initial docs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This page collects some notes/docs on the Kubernetes setup in production.


Rebooting a worker node

To reboot a worker node, use kubectl drain, it will configure the worker node to no longer create new pods and move the existing pods to other workers. Draining the node will take 30-60 seconds.

# kubectl drain kubernetes1001.eqiad.wmnet
# kubectl describe pods | grep Node
Node:           kubernetes1002.eqiad.wmnet/
Node:           kubernetes1002.eqiad.wmnet/
Node:           kubernetes1003.eqiad.wmnet/
Node:           kubernetes1003.eqiad.wmnet/
Node:           kubernetes1004.eqiad.wmnet/

When the node has been rebooted, it can be configured to reaccept pods using kubectl uncordon, e.g.

# kubectl uncordon kubernetes1001.eqiad.wmnet

The pods are not rebalanced automatically, i.e. the rebooted node is free of pods initially.