Command-line tools for Kubernetes: kubectl, stern, kubectx, kubens

Command-line tools for Kubernetes: kubectl, stern, kubectx, kubens

  • June 8, 2019
Table of Contents

Command-line tools for Kubernetes: kubectl, stern, kubectx, kubens

If you’ve ever worked with your hands, you know that you can’t do the job right without the right tools. That adage carries over quite well to software development as well. The right tools can make the difference between success or failure, regardless of the underlying technology.

In the Kubernetes ecosystem, more and more tools are being introduced as folks find ways to solve a common problem. This article looks are four of those tools. The standard command-line tool for Kubernetes, you can perform all the operations of Kubernetes that are required.

This is the starting point for any Kubernetes administration. kubectl is the command-line tool for Kubernetes and is under the stewardship of the Cloud Native Computing Foundation, which brings us Kubernetes. Kubectx is helpful for multi-cluster installations, where you need to switch context between one cluster and another.

Rather than type a series of lengthy kubectl command, kubectx works it magic in one short command. It also allows you to alias a lengthy cluster name into an alias. For example (taken directly from the kubectx website), kubectx eu=gke_ahmetb-samples-playground_europe-west1-b_dublin allows you to switch to that cluster by running kubectx eu.

Another slick trick is that kubectx remembers your previous context—much like the “Previous” button on a television remote—and allows you to switch back by running kubectx -.

Source: redhat.com

Share :
comments powered by Disqus

Related Posts

Pod Priority and Preemption in Kubernetes

Pod Priority and Preemption in Kubernetes

Kubernetes is well-known for running scalable workloads. It scales your workloads based on their resource usage. When a workload is scaled up, more instances of the application get created.

Read More
Kubernetes Ingress Past, Present, and Future

Kubernetes Ingress Past, Present, and Future

This post was inspired by listening to the February 19, 2019, Kubernetes Podcast, “Ingress, with Tim Hockin.” The Kubernetes Podcast is turning out to be a very well done podcast overall, and well worth the listen. In the Ingress episode, the podcasters interview Tim Hockin who’s one of the original Kubernetes co-founders, a team lead on the Kubernetes predecessor Borg/Omega, and is still very active within the Kubernetes community such as chairing the Kubernetes Network Special Interest Group that currently own the Ingress resource specification.

Read More
The Future of Cloud Providers in Kubernetes

The Future of Cloud Providers in Kubernetes

Approximately 9 months ago, the Kubernetes community agreed to form the Cloud Provider Special Interest Group (SIG). The justification was to have a single governing SIG to own and shape the integration points between Kubernetes and the many cloud providers it supported. A lot has been in motion since then and we’re here to share with you what has been accomplished so far and what we hope to see in the future.

Read More