Editing Kubectl get nodes

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
 
{{lowercase}}
 
{{lowercase}}
https://kubernetes.io/docs/tutorials/kubernetes-basics/explore/explore-intro/
+
[[kubectl get]] nodes
 +
[[kubectl get nodes -w]]
 +
[[kubectl get -h]]
  
* <code>[[kubectl get]] nodes</code>
 
* <code>[[kubectl get nodes -A]]</code>
 
* <code>[[kubectl get nodes -o yaml]]</code>
 
* <code>[[kubectl get nodes -A -o yaml]]</code>
 
* <code>[[kubectl get nodes -o wide]]</code>
 
* <code>[[kubectl get nodes -w]]</code>
 
* <code>[[kubectl get nodes --watch]]</code>
 
* <code>[[kubectl get nodes --label-columns]]</code>
 
* <code>[[kubectl get -h]]</code>
 
* <code>[[kubectl get nodes -A -o yaml]] | grep [[instance-type]]</code>
 
* <code>kubectl get nodes -A -o yaml | egrep "node.kubernetes.io/instances-type|name: ip|capacity-type" | grep -v address | grep -v hostname</code>
 
* <code>kubectl get nodes -A -o wide | awk '{print $6}' | grep -v [[INTERNAL-IP]]</code>
 
* <code>kubectl get nodes -o json | [[jq]] ".items[] | {name:.metadata.name} + [[.status.capacity]]"</code>
 
 
 
* [[ROLES]]: <code>[[control-plane]], [[master]]</code>
 
 
== Examples ==
 
 
  [[kubectl get]] [[nodes]]
 
  [[kubectl get]] [[nodes]]
  NAME          STATUS  [[ROLES]]   AGE  [[Kubectl version|VERSION]]
+
  NAME          STATUS  ROLES    AGE  [[Kubectl version|VERSION]]
 
  node2          Ready    <none>  23h  v1.14.3-docker-2
 
  node2          Ready    <none>  23h  v1.14.3-docker-2
 
  ubuntu1804-1  Ready    master  23h  v1.14.3-docker-2
 
  ubuntu1804-1  Ready    master  23h  v1.14.3-docker-2
Line 43: Line 27:
  
 
== [[EKS]] ==
 
== [[EKS]] ==
  [[kubectl get]] nodes
+
  kubectl get nodes
 
  NAME                                          STATUS  ROLES    AGE    VERSION
 
  NAME                                          STATUS  ROLES    AGE    VERSION
 
  ip-192-168-72-109.us-east-2.compute.internal  Ready    <none>  9m38s  v[[1.21]].5-eks-bc4871b
 
  ip-192-168-72-109.us-east-2.compute.internal  Ready    <none>  9m38s  v[[1.21]].5-eks-bc4871b
Line 54: Line 38:
 
  ip-10-0-1-85.us-east-2.compute.internal    Ready    <none>  33m  v1.20.11-eks-f17b81
 
  ip-10-0-1-85.us-east-2.compute.internal    Ready    <none>  33m  v1.20.11-eks-f17b81
 
  ip-10-0-3-153.us-east-2.compute.internal  Ready    <none>  32m  v1.20.11-eks-f17b81
 
  ip-10-0-3-153.us-east-2.compute.internal  Ready    <none>  32m  v1.20.11-eks-f17b81
 
kubectl get nodes
 
NAME                                      STATUS  ROLES    AGE    VERSION
 
ip-10-0-1-149.us-east-2.compute.internal  Ready    <none>  5h40m  [[v1.20]].11-eks-f17b81
 
ip-10-0-2-121.us-east-2.compute.internal  Ready    <none>  5h40m  v1.20.11-eks-f17b81
 
 
== [[GKE]] ==
 
 
kubectl get nodes
 
NAME                                          STATUS                    ROLES    AGE    VERSION
 
[[gke]]-your-pool-1-040c69dc-gq56                  Ready                      <none>  30h    [[v1.21.11]]-gke.1900
 
gke-your-pool-2-040c69dc-ncj5                  Ready                      <none>  30h    v1.21.11-gke.1900
 
gke-your-pool-2-040c69dc-rkj2                  Ready                      <none>  30h    v1.21.11-gke.1900
 
gke-your-pool-3-737b2f5f-tbu5                  Ready,[[SchedulingDisabled]]  <none>  28h    v1.21.11-gke.1900
 
  
  
== Errors ==
 
 
  [[kubectl get]] nodes
 
  [[kubectl get]] nodes
 
  [[Unable to connect to the server]]: dial tcp: lookup 00A50xxxx.gr7.us-east-2.eks.amazonaws.com: [[no such host]]
 
  [[Unable to connect to the server]]: dial tcp: lookup 00A50xxxx.gr7.us-east-2.eks.amazonaws.com: [[no such host]]
Line 81: Line 50:
 
  kubectl get nodes
 
  kubectl get nodes
 
  Unable to connect to the server: EOF
 
  Unable to connect to the server: EOF
 
[[kubectl get]] nodes
 
error: [[exec plugin]]: [[invalid apiVersion]] "[[client.authentication.k8s.io]]/[[v1alpha1]]"
 
  
 
== [[Minikube]] ==
 
== [[Minikube]] ==
 
kubectl get nodes
 
NAME      STATUS  ROLES          AGE  VERSION
 
minikube  Ready    [[control-plane]]  38d  [[v1.27.4]]
 
  
 
  kubectl get nodes
 
  kubectl get nodes
Line 99: Line 61:
 
  minikube  Ready    master  12m  v1.18.0
 
  minikube  Ready    master  12m  v1.18.0
  
* Related: <code>[[minikube start]] --nodes 2 -p my-multinode-demo</code>
+
== [[kind]] ==
 
 
== [[KinD (Kubernetes in Docker)|kind]] ==
 
 
 
k get no
 
NAME                STATUS  ROLES          AGE    VERSION
 
kind-control-plane  Ready    [[control-plane]]  4m44s  v1.29.2
 
 
 
 
  kubectl get nodes
 
  kubectl get nodes
 
  NAME                STATUS  ROLES                  AGE  VERSION
 
  NAME                STATUS  ROLES                  AGE  VERSION
 
  kind-control-plane  Ready    control-plane,master  10m  v1.20.2
 
  kind-control-plane  Ready    control-plane,master  10m  v1.20.2
  
== KillerCoda ==
 
kubectl get nodes
 
NAME          STATUS  ROLES          AGE  VERSION
 
controlplane  Ready    [[control-plane]]  23d  v1.25.3
 
node01        Ready    <none>          23d  v1.25.3
 
  
  
Line 128: Line 78:
 
  [[error: You must be logged in to the server (Unauthorized)]]
 
  [[error: You must be logged in to the server (Unauthorized)]]
  
== Related ==
+
== Related commands ==
 
* <code>[[kubectl get pods]]</code>
 
* <code>[[kubectl get pods]]</code>
 
* <code>[[kubectl get svc]]</code>
 
* <code>[[kubectl get svc]]</code>
Line 136: Line 86:
 
* <code>[[kubectl drain]]</code>
 
* <code>[[kubectl drain]]</code>
 
* <code>[[kubectl uncordon]]</code>
 
* <code>[[kubectl uncordon]]</code>
 
* [[Terraform]]: <code>[[cluster_version]]</code>, <code>[[worker_groups]]</code>
 
* <code>[[aws eks create-nodegroup]]</code>
 
* <code>[[Kubernetes node-problem-detector]]</code>
 
* <code>[[kubectl (alias)]]</code>
 
  
 
== See also ==
 
== See also ==
* {{kubectl get nodes}}
+
* {{kubectl get}}
* {{kubectl nodes}}
+
* {{kubectl info}}
* {{Kubernetes nodes}}
+
* {{kubectl}}
  
 
[[Category:Kubernetes]]
 
[[Category:Kubernetes]]

Please note that all contributions to wikieduonline may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Wikieduonline:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)

Advertising: