Voiced by Amazon Polly |
Introduction
Managing Kubernetes clusters can often feel overwhelming, especially when dealing with multiple pods, containers, and deployments. However, with the right tools, you can simplify the entire process and make cluster management much more efficient. In this blog, we’ll explore some of the top Kubernetes tools, like K9s for cluster management and Stern for real-time log monitoring, that will help you interact with your Kubernetes setup effortlessly from your local machine. Whether you’re a developer or an operator, these tools are essential for streamlining navigation, troubleshooting, and monitoring, making Kubernetes management feel like a breeze.
Pioneers in Cloud Consulting & Migration Services
- Reduced infrastructural costs
- Accelerated application deployment
Cluster Management
K9s
K9s is a terminal-based UI designed to simplify interaction with Kubernetes clusters. This tool streamlines the real-time navigation, observation, and management of deployed applications. Continuously monitoring Kubernetes for changes, K9s provides intuitive commands to help you efficiently manage and interact with your cluster resources. Perfect for developers and operators, K9s enhance productivity by offering a smooth and accessible way to handle complex Kubernetes environments.
Installation:
- Via Webi for Linux and macOS
1 |
curl -sS https://webinstall.dev/k9s | bash |
- For other ways, visit documentation – GitHub – derailed/k9s: 🐶 Kubernetes CLI To Manage Your Clusters In Style!
Few useful commands:
- Launching k9s
Simply type k9s in your terminal and hit Enter.
2. Example Commands with k9s.
- Example 1: Press enter on the pod name to retrieve Pod details
- Example 2: Press enter on the container name to view the logs of Pod
- Example 3: To view Daemonset, press: and type daemonsets
- To quit the Terminal, press: and type q
Log monitoring
Stern
Stern is an open-source tool for real-time log aggregation from multiple Kubernetes pods and containers. It provides a powerful way to tail and search logs across all or selected pods in a Kubernetes cluster, making it much easier to troubleshoot, monitor, and debug applications. Stern allows you to filter logs based on namespace, pod, container, and even specific labels, giving you flexibility when dealing with multiple workloads.
Installation:
- Linux and macOS
brew install stern
- For other ways, visit documentation – GitHub – stern/stern: ⎈ Multi pod and container log tailing for Kubernetes — Friendly fork of https://github.com/wercker/stern
Few useful commands:
Get all logs in a given namespace
Example: stern . -n <namespace>
Filter logs for a specific deployment
Example: stern -l app=<deployment-name> –include “<search-string>”
Security
kubesec
KubeSec is a tool designed to assess the security of Kubernetes manifests. It helps detect potential security risks by analyzing YAML files that define Kubernetes resources such as Pods, Deployments, or Services. The primary goal of KubeSec is to ensure that the Kubernetes clusters and applications running on them follow best security practices.
Installation:
- On Linux – download the latest release: https://github.com/controlplaneio/kubesec/releases/download/v2.14.1/kubesec_linux_amd64.tar.gz
- tar -xvf kubesec_linux_amd64.tar.gz
- mv kubesec /usr/local/bin/
Few useful commands:
Kubesec scan <manifest.yaml>
kubent
Kubent (Kubernetes Event Notifier) is a tool designed to detect deprecated Kubernetes APIs in your cluster, ensuring that your applications and resources are compatible with the version of Kubernetes you are running. As Kubernetes evolves, certain APIs and features get deprecated or removed, so keeping track of deprecated resources before upgrading is important to avoid breaking changes.
Installation:
- On Linux – sh -c “$(curl -sSL https://git.io/install-kubent)”
Few useful commands:
- Simply type kubent to see the results in case of having the kubeconfig in different location use the below command
kubent -k < kubeconfig file path>
Local Kubernetes tool
K3s
K3s is a lightweight, fully certified Kubernetes distribution designed for resource-constrained environments. Developed by Rancher Labs, K3s is designed to provide a simple, easy-to-install, low-resource solution for running Kubernetes clusters in edge computing, IoT devices, and development setups. K3s is optimized for minimal CPU, memory, and storage footprints, making it ideal for small-scale clusters, embedded devices, and development purposes.
Installation:
- On Linux – curl -sfL https://get.k3s.io | sh –
Few useful commands:
- sudo k3s kubectl get node
- sudo k3s kubectl create deploy nginx –image=nginx
- sudo k3s kubectl get pods
Conclusion
Managing Kubernetes clusters doesn’t have to be overwhelming. Tools like K9s, Stern, Kubesec, Kubent, and K3s simplify cluster management, real-time log monitoring, security assessment, and deprecated API detection.
By incorporating these powerful tools into your workflow, you can make Kubernetes management hassle-free and more efficient.
Drop a query if you have any questions regarding Kubernetes and we will get back to you quickly.
Empowering organizations to become ‘data driven’ enterprises with our Cloud experts.
- Reduced infrastructure costs
- Timely data-driven decisions
About CloudThat
CloudThat is an award-winning company and the first in India to offer cloud training and consulting services worldwide. As a Microsoft Solutions Partner, AWS Advanced Tier Training Partner, and Google Cloud Platform Partner, CloudThat has empowered over 850,000 professionals through 600+ cloud certifications winning global recognition for its training excellence including 20 MCT Trainers in Microsoft’s Global Top 100 and an impressive 12 awards in the last 8 years. CloudThat specializes in Cloud Migration, Data Platforms, DevOps, IoT, and cutting-edge technologies like Gen AI & AI/ML. It has delivered over 500 consulting projects for 250+ organizations in 30+ countries as it continues to empower professionals and enterprises to thrive in the digital-first world.
FAQs
1. Can K9s be used with multiple Kubernetes clusters?
ANS: – Yes, K9s can be configured to switch between multiple Kubernetes clusters. You can use K9s with different kubeconfig
contexts to manage multiple clusters from a single interface. Simply switch contexts within K9s or use kubectl config use-context
before launching K9s.
2. Does Stern support log coloring to differentiate between pods or containers?
ANS: – Yes, Stern supports color-coded output, making it easier to differentiate between logs from different pods or containers. Each pod/container gets its color in the terminal, making the logs more visually distinct and easier to track.

WRITTEN BY Aishwarya M
Aishwarya M works as a Cloud Solutions Architect – DevOps & Kubernetes at CloudThat. She is a proficient DevOps professional with expertise in designing scalable, secure, and automated infrastructure solutions across multi-cloud environments. Aishwarya specializes in leveraging tools like Kubernetes, Terraform, CI/CD pipelines, and monitoring stacks to streamline software delivery and ensure high system availability. She has a deep understanding of cloud-native architectures and focuses on delivering efficient, reliable, and maintainable solutions. Outside of work, Aishwarya enjoys traveling and cooking, exploring new places and cuisines while staying updated with the latest trends in cloud and DevOps technologies.
Comments