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
Introducing kube-iptables-tailer: Better Networking Visibility in Kubernetes Clusters

Introducing kube-iptables-tailer: Better Networking Visibility in Kubernetes Clusters

At Box, we use Kubernetes to empower our engineers to own the whole lifecycle of their microservices. When it comes to networking, our engineers use Tigera’s Project Calico to declaratively manage network policies for their apps running in our Kubernetes clusters. App owners define a Calico policy in order to enable their Pods to send/receive network traffic, which is instantiated as iptables rules.

Read More
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