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

Setting up Kubernetes Network Policies

Setting up Kubernetes Network Policies

The container orchestrator war is over, and Kubernetes has won. With companies large and small rapidly adopting the platform, security has emerged as an important concern — partly because of the learning curve inherent in understanding any new infrastructure, and partly because of recently announced vulnerabilities. Kubernetes brings another security dynamic to the table — its defaults are geared towards making it easy for users to get up and running quickly, as well as being backward compatible with earlier releases of Kubernetes that lacked important security features.

Read More