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.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Cloud Native DevOps with Kubernetes, 2nd Edition

Cloud Native DevOps with Kubernetes, 2nd Edition

Justin Domingus, John Arundel
Kubernetes Fundamentals

Kubernetes Fundamentals

Sébastien Goasguen
Kubernetes Microservices

Kubernetes Microservices

Richard Chesterwood

Publisher Resources

ISBN: 9781492040750Errata Page