Quantcast
Viewing all articles
Browse latest Browse all 49

Listing Kubernetes nodes by label

When you support large Kubernetes clusters, you need efficient methods to list pods, nodes, and deployments when you are troubleshooting issues. Kubectl has a number of built-in methods to do this. You can use jsonpath, selectors and sort-by statements to return the exact data you need. In addition, you can use the kubectl “-l” option to list objects that contain (or don’t contain) a label. To illustrate this, lets assign the label “env=staging” to a node:

Viewing all articles
Browse latest Browse all 49

Trending Articles