Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
DevOps with Kubernetes

You're reading from   DevOps with Kubernetes Accelerating software delivery with container orchestrators

Arrow left icon
Product type Paperback
Published in Oct 2017
Publisher Packt
ISBN-13 9781788396646
Length 382 pages
Edition 1st Edition
Concepts
Arrow right icon
Authors (3):
Arrow left icon
Hui-Chuan Chloe Lee Hui-Chuan Chloe Lee
Author Profile Icon Hui-Chuan Chloe Lee
Hui-Chuan Chloe Lee
Hideto Saito Hideto Saito
Author Profile Icon Hideto Saito
Hideto Saito
Cheng-Yang Wu Cheng-Yang Wu
Author Profile Icon Cheng-Yang Wu
Cheng-Yang Wu
Arrow right icon
View More author details
Toc

Inspecting a container

Whenever our application behaves abnormally, we will definitely want to know what happened, using all means, such as checking logs, resource usage, processes watchdog, or even getting into the running host directly to dig problems out. In Kubernetes, we have kubectl get and kubectl describe that can query deployment states, which will help us determine if an application has crashed or works as desired.

Further, if we want to know what is going on from the outputs of an application, we also have kubectl logs that redirects a container's stdout to our Terminal. For CPU and memory usage stats, there's also a top-like command we can employ, kubectl top. kubectl top node, which gives an overview of the resource usages of nodes, and kubectl top pod <POD_NAME> which displays per-pod usage:

# kubectl top node
NAME        CPU(cores)   CPU%      MEMORY...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image