OpenShift Get Labels Applied to a Node: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(Created page with "=Internal= * OpenShift Operations =Overview= Get the node description with: oc describe node ''<node-name>'' The node's labels are li...")
 
No edit summary
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Internal=
=Internal=


* [[OpenShift Operations#Procedures|OpenShift Operations]]
* [[OpenShift Operations#Subjects|OpenShift Operations]]
* [[OpenShift_Node_Operations#Update_Labels_on_a_Node|Update Labels on a Node]]


=Overview=
=Overview=
Line 7: Line 8:
Get the node description with:
Get the node description with:


  oc describe node ''<node-name>''
  [[oc_describe#node|oc describe]] node ''<node-name>''


The node's labels are listed in the "Labels:" section:
The node's labels are listed in the "Labels:" section:


  Labels: beta.kubernetes.io/arch=amd64
  '''Labels''': beta.kubernetes.io/arch=amd64
  beta.kubernetes.io/os=linux
  beta.kubernetes.io/os=linux
  cluster=noper430
  cluster=noper430
Line 18: Line 19:
  logging=true
  logging=true
  logging-infra-fluentd=true
  logging-infra-fluentd=true
An alternative method is to use
[[oc_get#node|oc get node]] ''<node-name>'' -o yaml
and look in the "metadata.labels" section:
metadata:
  creationTimestamp: 2017-07-04T22:34:30Z
  '''labels''':
    beta.kubernetes.io/arch: amd64
    beta.kubernetes.io/os: linux
    cluster: noper430
    env: infra
    kubernetes.io/hostname: infranode1
    logging: "true"
    logging-infra-fluentd: "true"

Latest revision as of 05:11, 6 July 2017

Internal

Overview

Get the node description with:

oc describe node <node-name>

The node's labels are listed in the "Labels:" section:

Labels:			beta.kubernetes.io/arch=amd64
			beta.kubernetes.io/os=linux
			cluster=noper430
			env=infra
			kubernetes.io/hostname=infranode1
			logging=true
			logging-infra-fluentd=true

An alternative method is to use

oc get node <node-name> -o yaml

and look in the "metadata.labels" section:

metadata:
  creationTimestamp: 2017-07-04T22:34:30Z
  labels:
    beta.kubernetes.io/arch: amd64
    beta.kubernetes.io/os: linux
    cluster: noper430
    env: infra
    kubernetes.io/hostname: infranode1
    logging: "true"
    logging-infra-fluentd: "true"