Difference between revisions of "Kubernetes"

From Wikitech-static
Jump to navigation Jump to search
imported>Muehlenhoff
(Add some initial docs)
 
imported>BryanDavis
(link to other Kubernetes related pages; formatting; lead paragraph)
Line 1: Line 1:
This page collects some notes/docs on the Kubernetes setup in production.
'''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.


= Administration =
== Administration ==


== 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.
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.


<nowiki>
<source lang="shell-session">
# kubectl drain kubernetes1001.eqiad.wmnet
# kubectl drain kubernetes1001.eqiad.wmnet
# kubectl describe pods | grep Node
# kubectl describe pods | grep Node
Line 15: Line 15:
Node:          kubernetes1003.eqiad.wmnet/10.64.32.23
Node:          kubernetes1003.eqiad.wmnet/10.64.32.23
Node:          kubernetes1004.eqiad.wmnet/10.64.48.52
Node:          kubernetes1004.eqiad.wmnet/10.64.48.52
</nowiki>
</source>


When the node has been rebooted, it can be configured to reaccept pods using '''kubectl uncordon''', e.g.
When the node has been rebooted, it can be configured to reaccept pods using '''kubectl uncordon''', e.g.
<nowiki>
<source lang="shell-session">
# kubectl uncordon kubernetes1001.eqiad.wmnet
# kubectl uncordon kubernetes1001.eqiad.wmnet
</nowiki>
</source>


The pods are not rebalanced automatically, i.e. the rebooted node is free of pods initially.
The pods are not rebalanced automatically, i.e. the rebooted node is free of pods initially.
== See also ==
* [[Tools Kubernetes|Tool Labs Kubernetes]]
* [[Help:Tool_Labs/Web/Kubernetes|Tool Labs Kubernetes webservices help]]

Revision as of 03:23, 9 May 2017

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.

Administration

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/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