Skip to Content
Cloud Native DevOps with Kubernetes
book

Cloud Native DevOps with Kubernetes

by John Arundel, Justin Domingus
March 2019
Intermediate to advanced
346 pages
8h 17m
English
O'Reilly Media, Inc.
Content preview from Cloud Native DevOps with Kubernetes

Chapter 7. Kubernetes Power Tools

My mechanic told me, “I couldn’t repair your brakes, so I made your horn louder.”

Steven Wright

People always ask us, “What about all these Kubernetes tools? Do I need them? If so, which ones? And what do they all do?”

In this chapter, we’ll explore a small part of the landscape of tools and utilities that help you work with Kubernetes. We’ll show you some advanced techniques with kubectl, and a few useful utilities such as jq, kubectx, kubens, kube-ps1, kube-shell, Click, kubed-sh, Stern, and BusyBox.

Mastering kubectl

We’ve already met kubectl, starting in Chapter 2, and as it’s the primary tool for interacting with Kubernetes, you may already be comfortable with the basics. Let’s look at some more advanced features of kubectl now, including some tips and tricks that may be new to you.

Shell Aliases

One of the first things that most Kubernetes users do to make their life easier is to create a shell alias for the kubectl command. For example, we have the following alias set up in our .bash_profile files:

alias k=kubectl

Now instead of having to type out kubectl in full for every command, we can just use k:

k get pods

If there are some kubectl commands that you use a lot, you might like to create aliases for them too. Here are some possible examples:

alias kg=kubectl get
alias kgdep=kubectl get deployment
alias ksys=kubectl --namespace=kube-system
alias kd=kubectl describe

Google engineer Ahmet Alp Balkan has worked out a logical system of ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Cloud Native DevOps with Kubernetes, 2nd Edition

Cloud Native DevOps with Kubernetes, 2nd Edition

Justin Domingus, John Arundel
Kubernetes Microservices

Kubernetes Microservices

Richard Chesterwood
Managing Cloud Native Data on Kubernetes

Managing Cloud Native Data on Kubernetes

Jeff Carpenter, Patrick McFadin
Kubernetes Fundamentals

Kubernetes Fundamentals

Sébastien Goasguen

Publisher Resources

ISBN: 9781492040750Errata PageSupplemental Content