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       --httptest.serve=""
250           if non-empty, httptest.NewServer serves on this address and blocks
251
252
253       --insecure-skip-tls-verify=false
254           If true, the server's certificate will not be checked for validity.
255       This will make your HTTPS connections insecure
256
257
258       --kubeconfig=""
259           Path to the kubeconfig file to use for CLI requests.
260
261
262       --log-flush-frequency=0
263           Maximum number of seconds between log flushes
264
265
266       --log_backtrace_at=:0
267           when logging hits line file:N, emit a stack trace
268
269
270       --log_cadvisor_usage=false
271           Whether to log the usage of the cAdvisor container
272
273
274       --log_dir=""
275           If non-empty, write log files in this directory
276
277
278       --logtostderr=true
279           log to standard error instead of files
280
281
282       --machine_id_file="/etc/machine-id,/var/lib/dbus/machine-id"
283           Comma-separated  list  of  files  to  check for machine-id. Use the
284       first one that exists.
285
286
287       --match-server-version=false
288           Require server version to match client version
289
290
291       -n, --namespace=""
292           If present, the namespace scope for this CLI request
293
294
295       --request-timeout="0"
296           The length of time to wait before giving  up  on  a  single  server
297       request. Non-zero values should contain a corresponding time unit (e.g.
298       1s, 2m, 3h). A value of zero means don't timeout requests.
299
300
301       -s, --server=""
302           The address and port of the Kubernetes API server
303
304
305       --stderrthreshold=2
306           logs at or above this threshold go to stderr
307
308
309       --storage_driver_buffer_duration=0
310           Writes in the storage driver will be buffered  for  this  duration,
311       and committed to the non memory backends as a single transaction
312
313
314       --storage_driver_db="cadvisor"
315           database name
316
317
318       --storage_driver_host="localhost:8086"
319           database host:port
320
321
322       --storage_driver_password="root"
323           database password
324
325
326       --storage_driver_secure=false
327           use secure connection with database
328
329
330       --storage_driver_table="stats"
331           table name
332
333
334       --storage_driver_user="root"
335           database username
336
337
338       --token=""
339           Bearer token for authentication to the API server
340
341
342       --user=""
343           The name of the kubeconfig user to use
344
345
346       -v, --v=0
347           log level for V logs
348
349
350       --version=false
351           Print version information and quit
352
353
354       --vmodule=
355           comma-separated  list  of pattern=N settings for file-filtered log‐
356       ging
357
358
359

EXAMPLE

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

SEE ALSO

386       oc-adm(1),
387
388
389

HISTORY

391       June 2016, Ported from the Kubernetes man-doc generator
392
393
394
395Openshift                  Openshift CLI User Manuals                OC ADM(1)
Impressum