Skip to Content
Learn OpenShift
book

Learn OpenShift

by Denis Zuev, Artemii Kropachev, Aleksey Usov
July 2018
Intermediate to advanced
504 pages
11h 34m
English
Packt Publishing
Content preview from Learn OpenShift

Using the kubectl get command

The first essential command to run is kubectl get nodes. It gives us the number of Kubernetes nodes available:

$ kubectl get nodesNAME      STATUS  ROLES   AGE   VERSIONminikube   Ready   <none> 2h    v1.9.0

In our case, the number of nodes will be equal to one, since we are using one VM for our practice. As we mentioned already, in order for different projects to coexist on the same or different nodes, namespaces are used. You may guess that the command we should use is kubectl get namespaces:

$ kubectl get namespacesNAME          STATUS   AGEdefault       Active   15hkube-public   Active   15hkube-system   Active   15h

It shows you that three default namespaces are available when you install Kubernetes with Minikube:

Name
Description

default ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Operating OpenShift

Operating OpenShift

Rick Rackow, Manuel Dewald
OpenShift for Developers, 2nd Edition

OpenShift for Developers, 2nd Edition

Joshua Wood, Brian Tannous
Kubernetes: Up and Running, 2nd Edition

Kubernetes: Up and Running, 2nd Edition

Brendan Burns, Joe Beda, Kelsey Hightower

Publisher Resources

ISBN: 9781788992329Supplemental Content