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

Difference between revisions of "Kubernetes"

From Wikitech-static
Jump to navigation Jump to search
imported>BryanDavis
(Link to w:Kubernetes)
imported>Alexandros Kosiaris
Line 1: Line 1:
'''[[w:Kubernetes|Kubernetes]]''' (often abbreviated '''k8s''') is an open-source system for automating deployment, and management of applications running in [[W:Operating-system-level virtualization|containers]]. This page collects some notes/docs on the Kubernetes setup in the Foundation production environment.
'''[[w:Kubernetes|Kubernetes]]''' (often abbreviated '''k8s''') is an open-source system for automating deployment, and management of applications running in [[W:Operating-system-level virtualization|containers]]. This page collects some notes/docs on the Kubernetes setup in the Foundation production environment.
== Debugging ==
For a quick intro into the debugging actions one can take during a problem in production look at [[Kubernetes/Helm]]. There will also be a guide posted under [[Kubernetes/Kubectl]]


== Administration ==
== Administration ==
Line 5: Line 9:
=== Rebooting a worker node ===
=== 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.
==== The unpolite way (recommended) ====
To reboot a worker node, you can just reboot it in our environment. The platform will understand the event and respawn the pods on other nodes. However the system does not automatically rebalance itself currently (pods are not rescheduled on the node after it has been rebooted)
 
==== The polite way ====
 
If you feel like being more polite, 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.


<source lang="shell-session">
<source lang="shell-session">

Revision as of 12:42, 25 April 2018

Kubernetes (often abbreviated k8s) is an open-source system for automating deployment, and management of applications running in containers. This page collects some notes/docs on the Kubernetes setup in the Foundation production environment.

Debugging

For a quick intro into the debugging actions one can take during a problem in production look at Kubernetes/Helm. There will also be a guide posted under Kubernetes/Kubectl

Administration

Rebooting a worker node

The unpolite way (recommended)

To reboot a worker node, you can just reboot it in our environment. The platform will understand the event and respawn the pods on other nodes. However the system does not automatically rebalance itself currently (pods are not rescheduled on the node after it has been rebooted)

The polite way

If you feel like being more polite, 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/10.64.16.75
Node:           kubernetes1002.eqiad.wmnet/10.64.16.75
Node:           kubernetes1003.eqiad.wmnet/10.64.32.23
Node:           kubernetes1003.eqiad.wmnet/10.64.32.23
Node:           kubernetes1004.eqiad.wmnet/10.64.48.52

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.

See also