======= kubectl ======= nodes ^^^^^ Nodes are the systems that run the kubernetes stuff. **get nodes** List the nodes and some basic information about them: .. code-block:: console $ kubectl get nodes NAME STATUS ROLES AGE VERSION node0 Ready control-plane,master 90m v1.23.3 node1 Ready 83m v1.23.3 node2 Ready 69m v1.23.3 salusa Ready 78s v1.23.3 **describe nodes** Get more detailed information about a node. .. code-block:: console $ kubectl describe node NODE_NAME namespaces ^^^^^^^^^^ Used for separating the different applications. *wat?* **get namespaces** .. code-block:: console $ kubectl get namespaces NAME STATUS AGE default Active 100m kube-node-lease Active 100m kube-public Active 100m kube-system Active 100m kubernetes-dashboard Active 93m **use namespace** The `kubectl` `-n NAMESPACE` flag can be used to specify a namespace. .. code-block:: console $ kubectl -n kubernetes-dashboard get pods pods ^^^^ Applications get run in pods. **get pods** Get a list of the pods in a namespace. The `default` namespace is used if not specified. .. code-block:: console $ kubectl -n kubernetes-dashboard get pods NAME READY STATUS RESTARTS AGE dashboard-metrics-scraper-799d786dbf-7hqnk 1/1 Running 0 95m kubernetes-dashboard-6b6b86c4c5-dph98 1/1 Running 0 95m **describe pod** Get more information about a pod. .. code-block:: console $ kubectl -n kubernetes-dashboard describe POD_NAME