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

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
Kyma – extend and build on Kubernetes with ease

Kyma – extend and build on Kubernetes with ease

According to this recently completed CNCF Survey, the adoption rate of Cloud Native technologies in production is growing rapidly. Kubernetes is at the heart of this technological revolution. Naturally, the growth of cloud native technologies has been accompanied by the growth of the ecosystem that surrounds it.

Read More