1OC ADM(1)                          June 2016                         OC ADM(1)
2
3
4

NAME

6       oc adm manage-node - Manage nodes - list pods, evacuate, or mark ready
7
8
9

SYNOPSIS

11       oc adm manage-node [OPTIONS]
12
13
14

DESCRIPTION

16       Manage nodes
17
18
19       This command provides common operations on nodes for administrators.
20
21
22       schedulable: Marking node schedulable will allow pods to be schedulable
23       on the node and marking node unschedulable will block pods to be sched‐
24       uled on the node.
25
26
27       evacuate: Migrate all/selected pod on the provided nodes.
28
29
30       list-pods:  List all/selected pods on given/selected nodes. It can list
31       the output in json/yaml format.
32
33
34

OPTIONS

36       --allow-missing-template-keys=true
37           If true, ignore any errors in templates when a field or map key  is
38       missing  in  the  template.  Only applies to golang and jsonpath output
39       formats.
40
41
42       --dry-run=false
43           Show pods that will be migrated. Optional param for --evacuate
44
45
46       --force=false
47           Delete pods not backed by replication  controller.  Optional  param
48       for --evacuate
49
50
51       --grace-period=30
52           Grace period (seconds) for pods being deleted. Ignored if negative.
53       Optional param for --evacuate
54
55
56       --list-pods=false
57           List all/selected pods on the node. Printer  flags  --output,  etc.
58       are only valid for this option.
59
60
61       --no-headers=false
62           When  using the default or custom-column output format, don't print
63       headers (default print headers).
64
65
66       -o, --output=""
67           Output format. One of:  json|yaml|wide|name|custom-columns=...|cus‐
68       tom-columns-file=...|go-template=...|go-template-file=...|json‐
69       path=...|jsonpath-file=...  See   custom   columns   [   ⟨http://kuber
70       netes.io/docs/user-guide/kubectl-overview/#custom-columns⟩],     golang
71       template  [  ⟨http://golang.org/pkg/text/template/#pkg-overview⟩]   and
72       jsonpath template [ ⟨http://kubernetes.io/docs/user-guide/jsonpath⟩].
73
74
75       --pod-selector=""
76           Label  selector  to  filter  pods  on  the node. Optional param for
77       --evacuate or --list-pods
78
79
80       --schedulable=false
81           Control pod schedulability on the node.
82
83
84       --selector=""
85           Label selector to filter nodes. Either pass one/more nodes as argu‐
86       ments or use this node selector
87
88
89       --show-labels=false
90           When  printing,  show  all  labels as the last column (default hide
91       labels column)
92
93
94       --sort-by=""
95           If non-empty, sort list types using this field specification.   The
96       field  specification  is  expressed  as  a  JSONPath  expression  (e.g.
97       '{.metadata.name}'). The field in the API resource  specified  by  this
98       JSONPath expression must be an integer or a string.
99
100
101       --template=""
102           Template  string  or  path  to template file to use when -o=go-tem‐
103       plate, -o=go-template-file. The template format is golang  templates  [
104http://golang.org/pkg/text/template/#pkg-overview⟩].
105
106
107

OPTIONS INHERITED FROM PARENT COMMANDS

109       --allow_verification_with_non_compliant_keys=false
110           Allow  a  SignatureVerifier  to  use  keys  which  are  technically
111       non-compliant with RFC6962.
112
113
114       --alsologtostderr=false
115           log to standard error as well as files
116
117
118       --application_metrics_count_limit=100
119           Max number of application metrics to store (per container)
120
121
122       --as=""
123           Username to impersonate for the operation
124
125
126       --as-group=[]
127           Group to impersonate for the operation, this flag can  be  repeated
128       to specify multiple groups.
129
130
131       --azure-container-registry-config=""
132           Path  to the file containing Azure container registry configuration
133       information.
134
135
136       --boot_id_file="/proc/sys/kernel/random/boot_id"
137           Comma-separated list of files to check for boot-id. Use  the  first
138       one that exists.
139
140
141       --cache-dir="/builddir/.kube/http-cache"
142           Default HTTP cache directory
143
144
145       --certificate-authority=""
146           Path to a cert file for the certificate authority
147
148
149       --client-certificate=""
150           Path to a client certificate file for TLS
151
152
153       --client-key=""
154           Path to a client key file for TLS
155
156
157       --cloud-provider-gce-lb-src-cidrs=130.211.0.0/22,209.85.152.0/22,209.85.204.0/22,35.191.0.0/16
158           CIDRs opened in GCE firewall for LB traffic proxy  health checks
159
160
161       --cluster=""
162           The name of the kubeconfig cluster to use
163
164
165       --container_hints="/etc/cadvisor/container_hints.json"
166           location of the container hints file
167
168
169       --containerd="unix:///var/run/containerd.sock"
170           containerd endpoint
171
172
173       --context=""
174           The name of the kubeconfig context to use
175
176
177       --default-not-ready-toleration-seconds=300
178           Indicates   the   tolerationSeconds   of   the    toleration    for
179       notReady:NoExecute  that is added by default to every pod that does not
180       already have such a toleration.
181
182
183       --default-unreachable-toleration-seconds=300
184           Indicates the tolerationSeconds  of  the  toleration  for  unreach‐
185       able:NoExecute  that  is  added  by  default to every pod that does not
186       already have such a toleration.
187
188
189       --docker="unix:///var/run/docker.sock"
190           docker endpoint
191
192
193       --docker-tls=false
194           use TLS to connect to docker
195
196
197       --docker-tls-ca="ca.pem"
198           path to trusted CA
199
200
201       --docker-tls-cert="cert.pem"
202           path to client certificate
203
204
205       --docker-tls-key="key.pem"
206           path to private key
207
208
209       --docker_env_metadata_whitelist=""
210           a comma-separated list of environment variable keys that  needs  to
211       be collected for docker containers
212
213
214       --docker_only=false
215           Only report docker containers in addition to root stats
216
217
218       --docker_root="/var/lib/docker"
219           DEPRECATED:  docker  root is read from docker info (this is a fall‐
220       back, default: /var/lib/docker)
221
222
223       --enable_load_reader=false
224           Whether to enable cpu load reader
225
226
227       --event_storage_age_limit="default=24h"
228           Max length of time for which to store events (per type). Value is a
229       comma  separated  list  of  key  values, where the keys are event types
230       (e.g.: creation, oom) or "default" and the value is a duration. Default
231       is applied to all non-specified event types
232
233
234       --event_storage_event_limit="default=100000"
235           Max  number  of  events to store (per type). Value is a comma sepa‐
236       rated list of key values, where the keys are event  types  (e.g.:  cre‐
237       ation,  oom)  or  "default"  and  the  value  is an integer. Default is
238       applied to all non-specified event types
239
240
241       --global_housekeeping_interval=0
242           Interval between global housekeepings
243
244
245       --housekeeping_interval=0
246           Interval between container housekeepings
247
248
249       --insecure-skip-tls-verify=false
250           If true, the server's certificate will not be checked for validity.
251       This will make your HTTPS connections insecure
252
253
254       --kubeconfig=""
255           Path to the kubeconfig file to use for CLI requests.
256
257
258       --log-flush-frequency=0
259           Maximum number of seconds between log flushes
260
261
262       --log_backtrace_at=:0
263           when logging hits line file:N, emit a stack trace
264
265
266       --log_cadvisor_usage=false
267           Whether to log the usage of the cAdvisor container
268
269
270       --log_dir=""
271           If non-empty, write log files in this directory
272
273
274       --logtostderr=true
275           log to standard error instead of files
276
277
278       --machine_id_file="/etc/machine-id,/var/lib/dbus/machine-id"
279           Comma-separated  list  of  files  to  check for machine-id. Use the
280       first one that exists.
281
282
283       --match-server-version=false
284           Require server version to match client version
285
286
287       -n, --namespace=""
288           If present, the namespace scope for this CLI request
289
290
291       --request-timeout="0"
292           The length of time to wait before giving  up  on  a  single  server
293       request. Non-zero values should contain a corresponding time unit (e.g.
294       1s, 2m, 3h). A value of zero means don't timeout requests.
295
296
297       -s, --server=""
298           The address and port of the Kubernetes API server
299
300
301       --stderrthreshold=2
302           logs at or above this threshold go to stderr
303
304
305       --storage_driver_buffer_duration=0
306           Writes in the storage driver will be buffered  for  this  duration,
307       and committed to the non memory backends as a single transaction
308
309
310       --storage_driver_db="cadvisor"
311           database name
312
313
314       --storage_driver_host="localhost:8086"
315           database host:port
316
317
318       --storage_driver_password="root"
319           database password
320
321
322       --storage_driver_secure=false
323           use secure connection with database
324
325
326       --storage_driver_table="stats"
327           table name
328
329
330       --storage_driver_user="root"
331           database username
332
333
334       --token=""
335           Bearer token for authentication to the API server
336
337
338       --user=""
339           The name of the kubeconfig user to use
340
341
342       -v, --v=0
343           log level for V logs
344
345
346       --version=false
347           Print version information and quit
348
349
350       --vmodule=
351           comma-separated  list  of pattern=N settings for file-filtered log‐
352       ging
353
354
355

EXAMPLE

357                # Block accepting any pods on given nodes
358                oc adm manage-node <mynode> --schedulable=false
359
360                # Mark selected nodes as schedulable
361                oc adm manage-node --selector="<env=dev>" --schedulable=true
362
363                # Migrate selected pods
364                oc adm manage-node <mynode> --evacuate --pod-selector="<service=myapp>"
365
366                # Migrate selected pods, use a grace period of 60 seconds
367                oc adm manage-node <mynode> --evacuate --grace-period=60 --pod-selector="<service=myapp>"
368
369                # Migrate selected pods not backed by replication controller
370                oc adm manage-node <mynode> --evacuate --force --pod-selector="<service=myapp>"
371
372                # Show pods that will be migrated
373                oc adm manage-node <mynode> --evacuate --dry-run --pod-selector="<service=myapp>"
374
375                # List all pods on given nodes
376                oc adm manage-node <mynode1> <mynode2> --list-pods
377
378
379
380

SEE ALSO

382       oc-adm(1),
383
384
385

HISTORY

387       June 2016, Ported from the Kubernetes man-doc generator
388
389
390
391Openshift                  Openshift CLI User Manuals                OC ADM(1)
Impressum